m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1203 lines
50 KiB

6 months ago
  1. """
  2. This code is automatically generated. Never edit it manually.
  3. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`.
  4. """
  5. from sympy.external import import_module
  6. matchpy = import_module("matchpy")
  7. if matchpy:
  8. from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match
  9. from sympy.integrals.rubi.utility_function import (
  10. Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ,
  11. ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ,
  12. PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ,
  13. ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ,
  14. NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart,
  15. FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest,
  16. SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient,
  17. Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart,
  18. IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan,
  19. ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec,
  20. ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less,
  21. Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ,
  22. PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ,
  23. ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ,
  24. Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ,
  25. SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator,
  26. NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ,
  27. InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ,
  28. EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree,
  29. PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts,
  30. TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ,
  31. NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll,
  32. ExpandLinearProduct, GCD, ContentFactor, NumericFactor,
  33. NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst,
  34. ExpandExpression, Apart, SmartApart, MatchQ,
  35. PolynomialQuotientRemainder, FreeFactors, NonfreeFactors,
  36. RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms,
  37. ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup,
  38. AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor,
  39. RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon,
  40. MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ,
  41. GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList,
  42. PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ,
  43. RationalFunctionFactors, NonrationalFunctionFactors, Reverse,
  44. RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand,
  45. SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree,
  46. CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree,
  47. GeneralizedBinomialParts, GeneralizedTrinomialDegree,
  48. GeneralizedTrinomialParts, MonomialQ, MonomialSumQ,
  49. MinimumMonomialExponent, MonomialExponent, LinearMatchQ,
  50. PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ,
  51. TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ,
  52. QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms,
  53. NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial,
  54. PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD,
  55. AlgebraicFunctionFactors, NonalgebraicFunctionFactors,
  56. QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ,
  57. Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors,
  58. NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop,
  59. CombineExponents, FactorInteger, FactorAbsurdNumber,
  60. SubstForInverseFunction, SubstForFractionalPower,
  61. SubstForFractionalPowerOfQuotientOfLinears,
  62. FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ,
  63. SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ,
  64. FractionalPowerSubexpressionQ, Apply, FactorNumericGcd,
  65. MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ,
  66. TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest,
  67. OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors,
  68. PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn,
  69. PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree,
  70. FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify,
  71. FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand,
  72. NormalizeIntegrandAux, NormalizeIntegrandFactor,
  73. NormalizeIntegrandFactorBase, NormalizeTogether,
  74. NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors,
  75. SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm,
  76. TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum,
  77. UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear,
  78. PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ,
  79. IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor,
  80. FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ,
  81. FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator,
  82. SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand,
  83. SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM,
  84. SubstForFractionalPowerOfLinear, FractionalPowerOfLinear,
  85. InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig,
  86. FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ,
  87. PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ,
  88. KnownTangentIntegrandQ, KnownCotangentIntegrandQ,
  89. KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst,
  90. AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand,
  91. ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp,
  92. ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ,
  93. FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ,
  94. PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ,
  95. FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ,
  96. FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ,
  97. FunctionOfLog, PowerVariableExpn, PowerVariableDegree,
  98. PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic,
  99. SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ,
  100. Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ,
  101. SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2,
  102. ConstantFactor, SameQ, ReplacePart, CommonFactors,
  103. MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential,
  104. FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux,
  105. FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev,
  106. rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent,
  107. RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct,
  108. SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma,
  109. FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ,
  110. _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify,
  111. _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum,
  112. _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux,
  113. TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor,
  114. PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral,
  115. CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial,
  116. Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant,
  117. Negative, Quotient
  118. )
  119. from sympy.core.add import Add
  120. from sympy.core.mod import Mod
  121. from sympy.core.mul import Mul
  122. from sympy.core import EulerGamma
  123. from sympy.core.numbers import (Float, I, Integer)
  124. from sympy.core.power import Pow
  125. from sympy.core.singleton import S
  126. from sympy.functions.elementary.complexes import (Abs, sign)
  127. from sympy.functions.elementary.miscellaneous import sqrt
  128. from sympy.integrals.integrals import Integral
  129. from sympy.logic.boolalg import (And, Or)
  130. from sympy.simplify.simplify import simplify
  131. from sympy.integrals.rubi.symbol import WC
  132. from sympy.core.symbol import symbols, Symbol
  133. from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf)
  134. from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch)
  135. from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2)
  136. from sympy.core.numbers import pi as Pi
  137. 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']
  138. 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']]
  139. i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u')
  140. _UseGamma = False
  141. ShowSteps = False
  142. StepCounter = None
  143. def miscellaneous_integration():
  144. 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
  145. 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)
  146. rule6934 = ReplacementRule(pattern6934, replacement6934)
  147. 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)
  148. rule6935 = ReplacementRule(pattern6935, replacement6935)
  149. 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)
  150. rule6936 = ReplacementRule(pattern6936, replacement6936)
  151. 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)
  152. rule6937 = ReplacementRule(pattern6937, replacement6937)
  153. 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)
  154. rule6938 = ReplacementRule(pattern6938, replacement6938)
  155. 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)
  156. rule6939 = ReplacementRule(pattern6939, replacement6939)
  157. 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)
  158. rule6940 = ReplacementRule(pattern6940, replacement6940)
  159. pattern6941 = Pattern(Integral(u_/y_, x_), CustomConstraint(With6941))
  160. rule6941 = ReplacementRule(pattern6941, replacement6941)
  161. pattern6942 = Pattern(Integral(u_/(w_*y_), x_), CustomConstraint(With6942))
  162. rule6942 = ReplacementRule(pattern6942, replacement6942)
  163. pattern6943 = Pattern(Integral(u_*y_**WC('m', S(1)), x_), cons19, cons68, CustomConstraint(With6943))
  164. rule6943 = ReplacementRule(pattern6943, replacement6943)
  165. pattern6944 = Pattern(Integral(u_*y_**WC('m', S(1))*z_**WC('n', S(1)), x_), cons19, cons4, cons68, CustomConstraint(With6944))
  166. rule6944 = ReplacementRule(pattern6944, replacement6944)
  167. pattern6945 = Pattern(Integral(u_, x_), CustomConstraint(With6945))
  168. rule6945 = ReplacementRule(pattern6945, replacement6945)
  169. 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)
  170. rule6946 = ReplacementRule(pattern6946, replacement6946)
  171. 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)
  172. rule6947 = ReplacementRule(pattern6947, replacement6947)
  173. 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)
  174. rule6948 = ReplacementRule(pattern6948, replacement6948)
  175. 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))
  176. rule6949 = ReplacementRule(pattern6949, replacement6949)
  177. 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))
  178. rule6950 = ReplacementRule(pattern6950, replacement6950)
  179. 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))
  180. rule6951 = ReplacementRule(pattern6951, replacement6951)
  181. pattern6952 = Pattern(Integral((a_ + y_**n_*WC('b', S(1)))*WC('u', S(1)), x_), cons2, cons3, cons4, cons1833, CustomConstraint(With6952))
  182. rule6952 = ReplacementRule(pattern6952, replacement6952)
  183. 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))
  184. rule6953 = ReplacementRule(pattern6953, replacement6953)
  185. 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))
  186. rule6954 = ReplacementRule(pattern6954, replacement6954)
  187. 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))
  188. rule6955 = ReplacementRule(pattern6955, replacement6955)
  189. 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))
  190. rule6956 = ReplacementRule(pattern6956, replacement6956)
  191. 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))
  192. rule6957 = ReplacementRule(pattern6957, replacement6957)
  193. 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))
  194. rule6958 = ReplacementRule(pattern6958, replacement6958)
  195. 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))
  196. rule6959 = ReplacementRule(pattern6959, replacement6959)
  197. 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))
  198. rule6960 = ReplacementRule(pattern6960, replacement6960)
  199. 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))
  200. rule6961 = ReplacementRule(pattern6961, replacement6961)
  201. 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))
  202. rule6962 = ReplacementRule(pattern6962, replacement6962)
  203. pattern6963 = Pattern(Integral(F_**v_*u_, x_), cons1101, cons1101, CustomConstraint(With6963))
  204. rule6963 = ReplacementRule(pattern6963, replacement6963)
  205. pattern6964 = Pattern(Integral(F_**v_*u_*w_**WC('m', S(1)), x_), cons1101, cons19, cons2015, CustomConstraint(With6964))
  206. rule6964 = ReplacementRule(pattern6964, replacement6964)
  207. 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))
  208. rule6965 = ReplacementRule(pattern6965, replacement6965)
  209. 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))
  210. rule6966 = ReplacementRule(pattern6966, replacement6966)
  211. 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))
  212. rule6967 = ReplacementRule(pattern6967, replacement6967)
  213. 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))
  214. rule6968 = ReplacementRule(pattern6968, replacement6968)
  215. 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))
  216. rule6969 = ReplacementRule(pattern6969, replacement6969)
  217. 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))
  218. rule6970 = ReplacementRule(pattern6970, replacement6970)
  219. 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))
  220. rule6971 = ReplacementRule(pattern6971, replacement6971)
  221. pattern6972 = Pattern(Integral(u_*x_**WC('m', S(1)), x_), cons19, cons68, cons2026)
  222. rule6972 = ReplacementRule(pattern6972, replacement6972)
  223. pattern6973 = Pattern(Integral(u_, x_), CustomConstraint(With6973))
  224. rule6973 = ReplacementRule(pattern6973, replacement6973)
  225. pattern6974 = Pattern(Integral(u_, x_), CustomConstraint(With6974))
  226. rule6974 = ReplacementRule(pattern6974, replacement6974)
  227. 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)
  228. rule6975 = ReplacementRule(pattern6975, replacement6975)
  229. 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)
  230. rule6976 = ReplacementRule(pattern6976, replacement6976)
  231. 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)
  232. rule6977 = ReplacementRule(pattern6977, replacement6977)
  233. 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)
  234. rule6978 = ReplacementRule(pattern6978, replacement6978)
  235. 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)
  236. rule6979 = ReplacementRule(pattern6979, replacement6979)
  237. 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)
  238. rule6980 = ReplacementRule(pattern6980, replacement6980)
  239. 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))
  240. rule6981 = ReplacementRule(pattern6981, replacement6981)
  241. pattern6982 = Pattern(Integral(u_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons150, CustomConstraint(With6982))
  242. rule6982 = ReplacementRule(pattern6982, replacement6982)
  243. 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)
  244. rule6983 = ReplacementRule(pattern6983, replacement6983)
  245. 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)
  246. rule6984 = ReplacementRule(pattern6984, replacement6984)
  247. 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))
  248. rule6985 = ReplacementRule(pattern6985, replacement6985)
  249. 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)
  250. rule6986 = ReplacementRule(pattern6986, replacement6986)
  251. pattern6987 = Pattern(Integral(u_, x_), CustomConstraint(With6987))
  252. rule6987 = ReplacementRule(pattern6987, replacement6987)
  253. pattern6988 = Pattern(Integral(u_/x_, x_), cons1249, cons2031, CustomConstraint(With6988))
  254. rule6988 = ReplacementRule(pattern6988, replacement6988)
  255. pattern6989 = Pattern(Integral(u_*x_**WC('m', S(1)), x_), cons20, cons263, cons1249, cons2035, CustomConstraint(With6989))
  256. rule6989 = ReplacementRule(pattern6989, replacement6989)
  257. pattern6990 = Pattern(Integral(u_*x_**m_, x_), cons369)
  258. rule6990 = ReplacementRule(pattern6990, With6990)
  259. pattern6991 = Pattern(Integral(u_, x_), cons2036, CustomConstraint(With6991))
  260. rule6991 = ReplacementRule(pattern6991, replacement6991)
  261. pattern6992 = Pattern(Integral(S(1)/(a_ + v_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons69)
  262. rule6992 = ReplacementRule(pattern6992, replacement6992)
  263. pattern6993 = Pattern(Integral(S(1)/(a_ + v_**n_*WC('b', S(1))), x_), cons2, cons3, cons1481, cons746)
  264. rule6993 = ReplacementRule(pattern6993, replacement6993)
  265. pattern6994 = Pattern(Integral(S(1)/(a_ + v_**n_*WC('b', S(1))), x_), cons2, cons3, cons1484, cons167)
  266. rule6994 = ReplacementRule(pattern6994, replacement6994)
  267. pattern6995 = Pattern(Integral(v_/(a_ + u_**WC('n', S(1))*WC('b', S(1))), x_), cons2, cons3, cons150, cons2037)
  268. rule6995 = ReplacementRule(pattern6995, replacement6995)
  269. pattern6996 = Pattern(Integral(u_, x_), CustomConstraint(With6996))
  270. rule6996 = ReplacementRule(pattern6996, replacement6996)
  271. pattern6997 = Pattern(Integral(u_, x_), CustomConstraint(With6997))
  272. rule6997 = ReplacementRule(pattern6997, replacement6997)
  273. 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)
  274. rule6998 = ReplacementRule(pattern6998, replacement6998)
  275. 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)
  276. rule6999 = ReplacementRule(pattern6999, replacement6999)
  277. pattern7000 = Pattern(Integral(u_, x_), CustomConstraint(With7000))
  278. rule7000 = ReplacementRule(pattern7000, replacement7000)
  279. pattern7001 = Pattern(Integral(u_, x_))
  280. rule7001 = ReplacementRule(pattern7001, replacement7001)
  281. 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, ]
  282. def replacement6934(a, b, c, n, p, u, x):
  283. 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)
  284. def replacement6935(a, b, c, d, p, q, u, x):
  285. return Dist((c*(d*(a + b*x))**p)**q*(a + b*x)**(-p*q), Int(u*(a + b*x)**(p*q), x), x)
  286. def replacement6936(a, b, c, d, n, p, q, u, x):
  287. 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)
  288. def replacement6937(A, B, C, F, a, b, c, d, e, f, g, n, x):
  289. return Dist(g/C, Subst(Int((a + b*F(c*x))**n/x, x), x, sqrt(d + e*x)/sqrt(f + g*x)), x)
  290. def replacement6938(A, C, F, a, b, c, e, g, n, x):
  291. 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)
  292. def replacement6939(A, B, C, F, a, b, c, d, e, f, g, n, x):
  293. return Dist(g/C, Subst(Int((F**(c*x)*b + a)**n/x, x), x, sqrt(d + e*x)/sqrt(f + g*x)), x)
  294. def replacement6940(A, C, F, a, b, c, e, g, n, x):
  295. 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)
  296. def With6941(u, x, y):
  297. if isinstance(x, (int, Integer, float, Float)):
  298. return False
  299. try:
  300. q = DerivativeDivides(y, u, x)
  301. res = Not(FalseQ(q))
  302. except (TypeError, AttributeError):
  303. return False
  304. if res:
  305. return True
  306. return False
  307. def replacement6941(u, x, y):
  308. q = DerivativeDivides(y, u, x)
  309. return Simp(q*log(RemoveContent(y, x)), x)
  310. def With6942(u, w, x, y):
  311. if isinstance(x, (int, Integer, float, Float)):
  312. return False
  313. try:
  314. q = DerivativeDivides(w*y, u, x)
  315. res = Not(FalseQ(q))
  316. except (TypeError, AttributeError):
  317. return False
  318. if res:
  319. return True
  320. return False
  321. def replacement6942(u, w, x, y):
  322. q = DerivativeDivides(w*y, u, x)
  323. return Simp(q*log(RemoveContent(w*y, x)), x)
  324. def With6943(m, u, x, y):
  325. if isinstance(x, (int, Integer, float, Float)):
  326. return False
  327. try:
  328. q = DerivativeDivides(y, u, x)
  329. res = Not(FalseQ(q))
  330. except (TypeError, AttributeError):
  331. return False
  332. if res:
  333. return True
  334. return False
  335. def replacement6943(m, u, x, y):
  336. q = DerivativeDivides(y, u, x)
  337. return Simp(q*y**(m + S(1))/(m + S(1)), x)
  338. def With6944(m, n, u, x, y, z):
  339. if isinstance(x, (int, Integer, float, Float)):
  340. return False
  341. try:
  342. q = DerivativeDivides(y*z, u*z**(-m + n), x)
  343. res = Not(FalseQ(q))
  344. except (TypeError, AttributeError):
  345. return False
  346. if res:
  347. return True
  348. return False
  349. def replacement6944(m, n, u, x, y, z):
  350. q = DerivativeDivides(y*z, u*z**(-m + n), x)
  351. return Simp(q*y**(m + S(1))*z**(m + S(1))/(m + S(1)), x)
  352. def With6945(u, x):
  353. if isinstance(x, (int, Integer, float, Float)):
  354. return False
  355. v = SimplifyIntegrand(u, x)
  356. if SimplerIntegrandQ(v, u, x):
  357. return True
  358. return False
  359. def replacement6945(u, x):
  360. v = SimplifyIntegrand(u, x)
  361. return Int(v, x)
  362. def replacement6946(a, b, c, d, e, f, m, n, u, x):
  363. 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)
  364. def replacement6947(a, b, c, d, e, f, m, n, u, x):
  365. 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)
  366. def replacement6948(a, m, n, p, u, v, w, x):
  367. return Int(u**(m + n*p)*w*(a + u**(-n)*v)**p, x)
  368. def With6949(a, b, c, d, m, n, u, v, x, y):
  369. if isinstance(x, (int, Integer, float, Float)):
  370. return False
  371. try:
  372. q = DerivativeDivides(y, u, x)
  373. res = Not(FalseQ(q))
  374. except (TypeError, AttributeError):
  375. return False
  376. if res:
  377. return True
  378. return False
  379. def replacement6949(a, b, c, d, m, n, u, v, x, y):
  380. q = DerivativeDivides(y, u, x)
  381. return Dist(q, Subst(Int((a + b*x)**m*(c + d*x)**n, x), x, y), x)
  382. def With6950(a, b, c, d, e, f, m, n, p, u, v, w, x, y):
  383. if isinstance(x, (int, Integer, float, Float)):
  384. return False
  385. try:
  386. q = DerivativeDivides(y, u, x)
  387. res = Not(FalseQ(q))
  388. except (TypeError, AttributeError):
  389. return False
  390. if res:
  391. return True
  392. return False
  393. def replacement6950(a, b, c, d, e, f, m, n, p, u, v, w, x, y):
  394. q = DerivativeDivides(y, u, x)
  395. return Dist(q, Subst(Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x), x, y), x)
  396. def With6951(a, b, c, d, e, f, g, h, m, n, p, q, u, v, w, x, y, z):
  397. if isinstance(x, (int, Integer, float, Float)):
  398. return False
  399. try:
  400. r = DerivativeDivides(y, u, x)
  401. res = Not(FalseQ(r))
  402. except (TypeError, AttributeError):
  403. return False
  404. if res:
  405. return True
  406. return False
  407. def replacement6951(a, b, c, d, e, f, g, h, m, n, p, q, u, v, w, x, y, z):
  408. r = DerivativeDivides(y, u, x)
  409. 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)
  410. def With6952(a, b, n, u, x, y):
  411. if isinstance(x, (int, Integer, float, Float)):
  412. return False
  413. try:
  414. q = DerivativeDivides(y, u, x)
  415. res = Not(FalseQ(q))
  416. except (TypeError, AttributeError):
  417. return False
  418. if res:
  419. return True
  420. return False
  421. def replacement6952(a, b, n, u, x, y):
  422. q = DerivativeDivides(y, u, x)
  423. return Dist(a, Int(u, x), x) + Dist(b*q, Subst(Int(x**n, x), x, y), x)
  424. def With6953(a, b, n, p, u, x, y):
  425. if isinstance(x, (int, Integer, float, Float)):
  426. return False
  427. try:
  428. q = DerivativeDivides(y, u, x)
  429. res = Not(FalseQ(q))
  430. except (TypeError, AttributeError):
  431. return False
  432. if res:
  433. return True
  434. return False
  435. def replacement6953(a, b, n, p, u, x, y):
  436. q = DerivativeDivides(y, u, x)
  437. return Dist(q, Subst(Int((a + b*x**n)**p, x), x, y), x)
  438. def With6954(a, b, m, n, p, u, v, x, y):
  439. if isinstance(x, (int, Integer, float, Float)):
  440. return False
  441. try:
  442. q = Symbol('q')
  443. r = Symbol('r')
  444. r = Divides(y**m, v**m, x)
  445. q = DerivativeDivides(y, u, x)
  446. res = And(Not(FalseQ(Set(r, Divides(y**m, v**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))))
  447. except (TypeError, AttributeError):
  448. return False
  449. if res:
  450. return True
  451. return False
  452. def replacement6954(a, b, m, n, p, u, v, x, y):
  453. q = Symbol('q')
  454. r = Symbol('r')
  455. r = Divides(y**m, v**m, x)
  456. q = DerivativeDivides(y, u, x)
  457. return Dist(q*r, Subst(Int(x**m*(a + b*x**n)**p, x), x, y), x)
  458. def With6955(a, b, c, n, n2, p, u, v, x, y):
  459. if isinstance(x, (int, Integer, float, Float)):
  460. return False
  461. try:
  462. q = DerivativeDivides(y, u, x)
  463. res = Not(FalseQ(q))
  464. except (TypeError, AttributeError):
  465. return False
  466. if res:
  467. return True
  468. return False
  469. def replacement6955(a, b, c, n, n2, p, u, v, x, y):
  470. q = DerivativeDivides(y, u, x)
  471. return Dist(q, Subst(Int((a + b*x**n + c*x**(S(2)*n))**p, x), x, y), x)
  472. def With6956(A, B, a, b, c, n, n2, p, u, v, w, x, y):
  473. if isinstance(x, (int, Integer, float, Float)):
  474. return False
  475. try:
  476. q = DerivativeDivides(y, u, x)
  477. res = Not(FalseQ(q))
  478. except (TypeError, AttributeError):
  479. return False
  480. if res:
  481. return True
  482. return False
  483. def replacement6956(A, B, a, b, c, n, n2, p, u, v, w, x, y):
  484. q = DerivativeDivides(y, u, x)
  485. return Dist(q, Subst(Int((A + B*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y), x)
  486. def With6957(A, B, a, c, n, n2, p, u, w, x, y):
  487. if isinstance(x, (int, Integer, float, Float)):
  488. return False
  489. try:
  490. q = DerivativeDivides(y, u, x)
  491. res = Not(FalseQ(q))
  492. except (TypeError, AttributeError):
  493. return False
  494. if res:
  495. return True
  496. return False
  497. def replacement6957(A, B, a, c, n, n2, p, u, w, x, y):
  498. q = DerivativeDivides(y, u, x)
  499. return Dist(q, Subst(Int((A + B*x**n)*(a + c*x**(S(2)*n))**p, x), x, y), x)
  500. def With6958(a, b, c, m, n, n2, p, u, v, w, x, y):
  501. if isinstance(x, (int, Integer, float, Float)):
  502. return False
  503. try:
  504. q = Symbol('q')
  505. r = Symbol('r')
  506. r = Divides(y**m, v**m, x)
  507. q = DerivativeDivides(y, u, x)
  508. res = And(Not(FalseQ(Set(r, Divides(y**m, v**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))))
  509. except (TypeError, AttributeError):
  510. return False
  511. if res:
  512. return True
  513. return False
  514. def replacement6958(a, b, c, m, n, n2, p, u, v, w, x, y):
  515. q = Symbol('q')
  516. r = Symbol('r')
  517. r = Divides(y**m, v**m, x)
  518. q = DerivativeDivides(y, u, x)
  519. return Dist(q*r, Subst(Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y), x)
  520. def With6959(A, B, a, b, c, m, n, n2, p, u, v, w, x, y, z):
  521. if isinstance(x, (int, Integer, float, Float)):
  522. return False
  523. try:
  524. q = Symbol('q')
  525. r = Symbol('r')
  526. r = Divides(y**m, z**m, x)
  527. q = DerivativeDivides(y, u, x)
  528. res = And(Not(FalseQ(Set(r, Divides(y**m, z**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))))
  529. except (TypeError, AttributeError):
  530. return False
  531. if res:
  532. return True
  533. return False
  534. def replacement6959(A, B, a, b, c, m, n, n2, p, u, v, w, x, y, z):
  535. q = Symbol('q')
  536. r = Symbol('r')
  537. r = Divides(y**m, z**m, x)
  538. q = DerivativeDivides(y, u, x)
  539. 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)
  540. def With6960(A, B, a, c, m, n, n2, p, u, w, x, y, z):
  541. if isinstance(x, (int, Integer, float, Float)):
  542. return False
  543. try:
  544. q = Symbol('q')
  545. r = Symbol('r')
  546. r = Divides(y**m, z**m, x)
  547. q = DerivativeDivides(y, u, x)
  548. res = And(Not(FalseQ(Set(r, Divides(y**m, z**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x)))))
  549. except (TypeError, AttributeError):
  550. return False
  551. if res:
  552. return True
  553. return False
  554. def replacement6960(A, B, a, c, m, n, n2, p, u, w, x, y, z):
  555. q = Symbol('q')
  556. r = Symbol('r')
  557. r = Divides(y**m, z**m, x)
  558. q = DerivativeDivides(y, u, x)
  559. return Dist(q*r, Subst(Int(x**m*(A + B*x**n)*(a + c*x**(S(2)*n))**p, x), x, y), x)
  560. def With6961(a, b, c, d, m, n, p, u, v, x, y):
  561. if isinstance(x, (int, Integer, float, Float)):
  562. return False
  563. try:
  564. q = DerivativeDivides(y, u, x)
  565. res = Not(FalseQ(q))
  566. except (TypeError, AttributeError):
  567. return False
  568. if res:
  569. return True
  570. return False
  571. def replacement6961(a, b, c, d, m, n, p, u, v, x, y):
  572. q = DerivativeDivides(y, u, x)
  573. return Dist(q, Subst(Int((a + b*x**n)**m*(c + d*x**n)**p, x), x, y), x)
  574. def With6962(a, b, c, d, e, f, m, n, p, q, u, v, w, x, y):
  575. if isinstance(x, (int, Integer, float, Float)):
  576. return False
  577. try:
  578. r = DerivativeDivides(y, u, x)
  579. res = Not(FalseQ(r))
  580. except (TypeError, AttributeError):
  581. return False
  582. if res:
  583. return True
  584. return False
  585. def replacement6962(a, b, c, d, e, f, m, n, p, q, u, v, w, x, y):
  586. r = DerivativeDivides(y, u, x)
  587. return Dist(r, Subst(Int((a + b*x**n)**m*(c + d*x**n)**p*(e + f*x**n)**q, x), x, y), x)
  588. def With6963(F, u, v, x):
  589. if isinstance(x, (int, Integer, float, Float)):
  590. return False
  591. try:
  592. q = DerivativeDivides(v, u, x)
  593. res = Not(FalseQ(q))
  594. except (TypeError, AttributeError):
  595. return False
  596. if res:
  597. return True
  598. return False
  599. def replacement6963(F, u, v, x):
  600. q = DerivativeDivides(v, u, x)
  601. return Simp(F**v*q/log(F), x)
  602. def With6964(F, m, u, v, w, x):
  603. if isinstance(x, (int, Integer, float, Float)):
  604. return False
  605. try:
  606. q = DerivativeDivides(v, u, x)
  607. res = Not(FalseQ(q))
  608. except (TypeError, AttributeError):
  609. return False
  610. if res:
  611. return True
  612. return False
  613. def replacement6964(F, m, u, v, w, x):
  614. q = DerivativeDivides(v, u, x)
  615. return Dist(q, Subst(Int(F**x*x**m, x), x, v), x)
  616. def With6965(a, b, m, p, u, v, w, x):
  617. if isinstance(x, (int, Integer, float, Float)):
  618. return False
  619. c = u/(v*D(w, x) + w*D(v, x))
  620. if FreeQ(c, x):
  621. return True
  622. return False
  623. def replacement6965(a, b, m, p, u, v, w, x):
  624. c = u/(v*D(w, x) + w*D(v, x))
  625. return Dist(c, Subst(Int((a + b*x**p)**m, x), x, v*w), x)
  626. def With6966(a, b, m, p, q, r, u, v, w, x):
  627. if isinstance(x, (int, Integer, float, Float)):
  628. return False
  629. c = u/(p*w*D(v, x) + q*v*D(w, x))
  630. if FreeQ(c, x):
  631. return True
  632. return False
  633. def replacement6966(a, b, m, p, q, r, u, v, w, x):
  634. c = u/(p*w*D(v, x) + q*v*D(w, x))
  635. 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)
  636. def With6967(a, b, m, p, q, r, s, u, v, w, x):
  637. if isinstance(x, (int, Integer, float, Float)):
  638. return False
  639. c = u/(p*w*D(v, x) + q*v*D(w, x))
  640. if FreeQ(c, x):
  641. return True
  642. return False
  643. def replacement6967(a, b, m, p, q, r, s, u, v, w, x):
  644. c = u/(p*w*D(v, x) + q*v*D(w, x))
  645. 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)
  646. def With6968(a, b, m, p, q, u, v, w, x):
  647. if isinstance(x, (int, Integer, float, Float)):
  648. return False
  649. c = u/(p*w*D(v, x) - q*v*D(w, x))
  650. if FreeQ(c, x):
  651. return True
  652. return False
  653. def replacement6968(a, b, m, p, q, u, v, w, x):
  654. c = u/(p*w*D(v, x) - q*v*D(w, x))
  655. return Dist(c*p, Subst(Int((a*x**p + b)**m, x), x, v*w**(m*q + S(1))), x)
  656. def With6969(a, b, m, p, q, r, u, v, w, x):
  657. if isinstance(x, (int, Integer, float, Float)):
  658. return False
  659. c = u/(p*w*D(v, x) - q*v*D(w, x))
  660. if FreeQ(c, x):
  661. return True
  662. return False
  663. def replacement6969(a, b, m, p, q, r, u, v, w, x):
  664. c = u/(p*w*D(v, x) - q*v*D(w, x))
  665. return -Dist(c*q, Subst(Int((a + b*x**q)**m, x), x, v**(m*p + r + S(1))*w), x)
  666. def With6970(a, b, m, p, q, s, u, v, w, x):
  667. if isinstance(x, (int, Integer, float, Float)):
  668. return False
  669. c = u/(p*w*D(v, x) - q*v*D(w, x))
  670. if FreeQ(c, x):
  671. return True
  672. return False
  673. def replacement6970(a, b, m, p, q, s, u, v, w, x):
  674. c = u/(p*w*D(v, x) - q*v*D(w, x))
  675. 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)
  676. def With6971(a, b, m, p, q, r, s, u, v, w, x):
  677. if isinstance(x, (int, Integer, float, Float)):
  678. return False
  679. c = u/(p*w*D(v, x) - q*v*D(w, x))
  680. if FreeQ(c, x):
  681. return True
  682. return False
  683. def replacement6971(a, b, m, p, q, r, s, u, v, w, x):
  684. c = u/(p*w*D(v, x) - q*v*D(w, x))
  685. 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)
  686. def replacement6972(m, u, x):
  687. return Dist(S(1)/(m + S(1)), Subst(Int(SubstFor(x**(m + S(1)), u, x), x), x, x**(m + S(1))), x)
  688. def With6973(u, x):
  689. if isinstance(x, (int, Integer, float, Float)):
  690. return False
  691. try:
  692. lst = SubstForFractionalPowerOfLinear(u, x)
  693. res = And(Not(FalseQ(lst)), SubstForFractionalPowerQ(u, Part(lst, S(3)), x))
  694. except (TypeError, AttributeError):
  695. return False
  696. if res:
  697. return True
  698. return False
  699. def replacement6973(u, x):
  700. lst = SubstForFractionalPowerOfLinear(u, x)
  701. 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)
  702. def With6974(u, x):
  703. if isinstance(x, (int, Integer, float, Float)):
  704. return False
  705. try:
  706. lst = SubstForFractionalPowerOfQuotientOfLinears(u, x)
  707. res = Not(FalseQ(lst))
  708. except (TypeError, AttributeError):
  709. return False
  710. if res:
  711. return True
  712. return False
  713. def replacement6974(u, x):
  714. lst = SubstForFractionalPowerOfQuotientOfLinears(u, x)
  715. 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)
  716. def replacement6975(a, m, n, p, q, u, v, w, x, z):
  717. 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)
  718. def replacement6976(a, m, n, p, u, v, w, x):
  719. 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)
  720. def replacement6977(a, m, p, u, v, x):
  721. return Dist(a**IntPart(p)*v**(-m*FracPart(p))*(a*v**m)**FracPart(p), Int(u*v**(m*p), x), x)
  722. def replacement6978(a, b, n, p, u, x):
  723. 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)
  724. def replacement6979(a, b, n, p, u, v, x):
  725. 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)
  726. def replacement6980(a, b, m, n, p, u, v, x):
  727. 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)
  728. def With6981(a, b, m, r, s, u, x):
  729. if isinstance(x, (int, Integer, float, Float)):
  730. return False
  731. v = x**(-r*FracPart(m))*(a + b*x**(-r + s))**(-FracPart(m))*(a*x**r + b*x**s)**FracPart(m)
  732. if Not(EqQ(v, S(1))):
  733. return True
  734. return False
  735. def replacement6981(a, b, m, r, s, u, x):
  736. v = x**(-r*FracPart(m))*(a + b*x**(-r + s))**(-FracPart(m))*(a*x**r + b*x**s)**FracPart(m)
  737. return Dist(v, Int(u*x**(m*r)*(a + b*x**(-r + s))**m, x), x)
  738. def With6982(a, b, n, u, x):
  739. if isinstance(x, (int, Integer, float, Float)):
  740. return False
  741. v = RationalFunctionExpand(u/(a + b*x**n), x)
  742. if SumQ(v):
  743. return True
  744. return False
  745. def replacement6982(a, b, n, u, x):
  746. v = RationalFunctionExpand(u/(a + b*x**n), x)
  747. return Int(v, x)
  748. def replacement6983(a, b, c, n, n2, p, u, x):
  749. return Dist(S(4)**(-p)*c**(-p), Int(u*(b + S(2)*c*x**n)**(S(2)*p), x), x)
  750. def replacement6984(a, b, c, n, n2, p, u, x):
  751. 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)
  752. def With6985(a, b, c, n, n2, u, x):
  753. if isinstance(x, (int, Integer, float, Float)):
  754. return False
  755. v = RationalFunctionExpand(u/(a + b*x**n + c*x**(S(2)*n)), x)
  756. if SumQ(v):
  757. return True
  758. return False
  759. def replacement6985(a, b, c, n, n2, u, x):
  760. v = RationalFunctionExpand(u/(a + b*x**n + c*x**(S(2)*n)), x)
  761. return Int(v, x)
  762. def replacement6986(a, b, c, m, n, u, x):
  763. 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)
  764. def With6987(u, x):
  765. if isinstance(x, (int, Integer, float, Float)):
  766. return False
  767. try:
  768. lst = FunctionOfLinear(u, x)
  769. res = Not(FalseQ(lst))
  770. except (TypeError, AttributeError):
  771. return False
  772. if res:
  773. return True
  774. return False
  775. def replacement6987(u, x):
  776. lst = FunctionOfLinear(u, x)
  777. 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)
  778. def With6988(u, x):
  779. if isinstance(x, (int, Integer, float, Float)):
  780. return False
  781. try:
  782. lst = PowerVariableExpn(u, S(0), x)
  783. res = And(Not(FalseQ(lst)), NonzeroQ(Part(lst, S(2))))
  784. except (TypeError, AttributeError):
  785. return False
  786. if res:
  787. return True
  788. return False
  789. def replacement6988(u, x):
  790. lst = PowerVariableExpn(u, S(0), x)
  791. 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)
  792. def With6989(m, u, x):
  793. if isinstance(x, (int, Integer, float, Float)):
  794. return False
  795. try:
  796. lst = PowerVariableExpn(u, m + S(1), x)
  797. res = And(Not(FalseQ(lst)), NonzeroQ(-m + Part(lst, S(2)) + S(-1)))
  798. except (TypeError, AttributeError):
  799. return False
  800. if res:
  801. return True
  802. return False
  803. def replacement6989(m, u, x):
  804. lst = PowerVariableExpn(u, m + S(1), x)
  805. 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)
  806. def With6990(m, u, x):
  807. k = Denominator(m)
  808. 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)
  809. def With6991(u, x):
  810. if isinstance(x, (int, Integer, float, Float)):
  811. return False
  812. try:
  813. lst = FunctionOfSquareRootOfQuadratic(u, x)
  814. res = Not(FalseQ(lst))
  815. except (TypeError, AttributeError):
  816. return False
  817. if res:
  818. return True
  819. return False
  820. def replacement6991(u, x):
  821. lst = FunctionOfSquareRootOfQuadratic(u, x)
  822. return Dist(S(2), Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(2))), x)
  823. def replacement6992(a, b, v, x):
  824. 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)
  825. def replacement6993(a, b, n, v, x):
  826. 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)
  827. def replacement6994(a, b, n, v, x):
  828. 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)
  829. def replacement6995(a, b, n, u, v, x):
  830. return Int(ReplaceAll(ExpandIntegrand(PolynomialInSubst(v, u, x)/(a + b*x**n), x), Rule(x, u)), x)
  831. def With6996(u, x):
  832. if isinstance(x, (int, Integer, float, Float)):
  833. return False
  834. v = NormalizeIntegrand(u, x)
  835. if UnsameQ(v, u):
  836. return True
  837. return False
  838. def replacement6996(u, x):
  839. v = NormalizeIntegrand(u, x)
  840. return Int(v, x)
  841. def With6997(u, x):
  842. if isinstance(x, (int, Integer, float, Float)):
  843. return False
  844. v = ExpandIntegrand(u, x)
  845. if SumQ(v):
  846. return True
  847. return False
  848. def replacement6997(u, x):
  849. v = ExpandIntegrand(u, x)
  850. return Int(v, x)
  851. def replacement6998(a, b, c, d, m, n, p, q, u, x):
  852. return Dist(x**(-m*p)*(a + b*x**m)**p*(c + d*x**n)**q, Int(u*x**(m*p), x), x)
  853. def replacement6999(a, b, c, n, n2, p, u, x):
  854. 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)
  855. def With7000(u, x):
  856. if isinstance(x, (int, Integer, float, Float)):
  857. return False
  858. try:
  859. lst = SubstForFractionalPowerOfLinear(u, x)
  860. res = Not(FalseQ(lst))
  861. except (TypeError, AttributeError):
  862. return False
  863. if res:
  864. return True
  865. return False
  866. def replacement7000(u, x):
  867. lst = SubstForFractionalPowerOfLinear(u, x)
  868. 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)
  869. def replacement7001(u, x):
  870. return Int(u, x)