diff --git a/Project.toml b/Project.toml index 06d02cd..9a54769 100644 --- a/Project.toml +++ b/Project.toml @@ -27,8 +27,8 @@ FresnelIntegrals = "0.2.0" HypergeometricFunctions = "0.3.28" Nemo = "0.51, 0.52" PolyLog = "2.6.0" -SymbolicUtils = "3" -Symbolics = "6" +SymbolicUtils = "4" +Symbolics = "7" julia = "1.10" [extras] diff --git a/src/SymbolicIntegration.jl b/src/SymbolicIntegration.jl index 41ed319..f0300f4 100644 --- a/src/SymbolicIntegration.jl +++ b/src/SymbolicIntegration.jl @@ -22,6 +22,7 @@ include("methods/rule_based/general.jl") include("methods/rule_based/frontend.jl") include("methods/rule_based/rules_utility_functions.jl") include("methods/rule_based/rules_loader.jl") +include("methods/rule_based/rule2.jl") # Add method dispatch system include("methods.jl") diff --git a/src/methods.jl b/src/methods.jl index d74e77d..3507362 100644 --- a/src/methods.jl +++ b/src/methods.jl @@ -35,7 +35,7 @@ struct RuleBasedMethod <: AbstractIntegrationMethod use_gamma::Bool verbose::Bool - function RuleBasedMethod(; use_gamma::Bool=false, verbose::Bool=true) + function RuleBasedMethod(; use_gamma::Bool=false, verbose::Bool=false) new(use_gamma, verbose) end end @@ -87,17 +87,19 @@ No rule found for ∫(abs(x), x) ``` """ function integrate(f::Symbolics.Num, x::Symbolics.Num; kwargs...) + result = integrate_rule_based(f, x; kwargs...) + !contains_int(result) && return result + + printstyled(" > RuleBasedMethod(use_gamma=false, verbose=false) failed, returning $result \n";color=:red) + printstyled(" > Sorry we cannot integrate this expression :(\n";color=:red) + result = integrate_risch(f.val, x.val; kwargs...) !contains_int(result) && return result # TODO make them verbose? printstyled("\n > RischMethod(use_algebraic_closure=false, catch_errors=true) failed, returning $result \n";color=:red) printstyled(" > Trying with RuleBasedMethod(use_gamma=false, verbose=true)...\n\n"; color=:red) - result = integrate_rule_based(f, x; kwargs...) - !contains_int(result) && return result - - printstyled(" > RuleBasedMethod(use_gamma=false, verbose=true) failed, returning $result \n";color=:red) - printstyled(" > Sorry we cannot integrate this expression :(\n";color=:red) + end """ @@ -113,7 +115,7 @@ function integrate(f::Symbolics.Num, method=nothing; kwargs...) @warn "Multiple symbolic variables detect. Please pass the integration variable to the `integrate` function as second argument." return nothing elseif length(vars) == 1 - integration_variable = vars[1] + integration_variable = first(vars) else @warn "No integration variable provided" return nothing diff --git a/src/methods/risch/frontend.jl b/src/methods/risch/frontend.jl index 3233620..16cd517 100644 --- a/src/methods/risch/frontend.jl +++ b/src/methods/risch/frontend.jl @@ -160,7 +160,7 @@ function convolution(a::Vector{T}, b::Vector{T}, s::Int; output_size::Int=0) whe c end -function tan2sincos(f::K, arg::SymbolicUtils.Symbolic, vars::Vector, h::Int=0) where +function tan2sincos(f::K, arg::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}, vars::Vector, h::Int=0) where {T<:FieldElement, P<:PolyRingElem{T}, K<:FracElem{P}} # This function transforms a Nemo/AbstractAlgebra rational function with # variable t representing tan(arg) to a SymbolicUtils expression which is @@ -269,13 +269,13 @@ end struct UpdatedArgList <: Exception end -function analyze_expr(f, x::SymbolicUtils.Symbolic) +function analyze_expr(f, x::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}) tanArgs = [] expArgs = [] restart = true while restart funs = Any[x] - vars = SymbolicUtils.Symbolic[x] + vars = SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}[x] args = Any[x] try p = analyze_expr(f, funs, vars, args, tanArgs, expArgs) @@ -290,7 +290,7 @@ function analyze_expr(f, x::SymbolicUtils.Symbolic) end end -function analyze_expr(f::SymbolicUtils.Symbolic , funs::Vector, vars::Vector{SymbolicUtils.Symbolic}, +function analyze_expr(f::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal} , funs::Vector, vars::Vector{SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}}, args::Vector, tanArgs::Vector, expArgs::Vector) # Handle pure symbols if SymbolicUtils.issym(f) @@ -305,12 +305,12 @@ function analyze_expr(f::SymbolicUtils.Symbolic , funs::Vector, vars::Vector{Sym op = operation(f) if op in (+, *, /) # Handle Add, Mul, Div operations - as = arguments(f) + as = [SymbolicUtils.unwrap_const(x) for x in arguments(f)] ps = [analyze_expr(a, funs, vars, args, tanArgs, expArgs) for a in as] return op(ps...) elseif op == (^) # Handle Pow operations - as = arguments(f) + as = [SymbolicUtils.unwrap_const(x) for x in arguments(f)] p1 = analyze_expr(as[1], funs, vars, args, tanArgs, expArgs) p2 = analyze_expr(as[2], funs, vars, args, tanArgs, expArgs) if isa(p2, Integer) @@ -431,21 +431,21 @@ function analyze_expr(f::SymbolicUtils.Symbolic , funs::Vector, vars::Vector{Sym end end -function analyze_expr(f::Number , funs::Vector, vars::Vector{SymbolicUtils.Symbolic}, args::Vector, tanArgs::Vector, expArgs::Vector) +function analyze_expr(f::Number , funs::Vector, vars::Vector{SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}}, args::Vector, tanArgs::Vector, expArgs::Vector) # TODO distinguish types of number (rational, real, complex, etc. ) return f end # Commented out - these types don't exist in SymbolicUtils 3.x, handled by generic method above # function analyze_expr(f::Union{SymbolicUtils.Add, SymbolicUtils.Mul, SymbolicUtils.Div}, funs::Vector, -# vars::Vector{SymbolicUtils.Symbolic}, args::Vector, tanArgs::Vector, expArgs::Vector) +# vars::Vector{SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}}, args::Vector, tanArgs::Vector, expArgs::Vector) # as = arguments(f) # ps = [analyze_expr(a, funs, vars, args, tanArgs, expArgs) for a in as] # operation(f)(ps...) # apply f # end # Commented out - SymbolicUtils.Pow doesn't exist in SymbolicUtils 3.x, handled by generic method above -# function analyze_expr(f::SymbolicUtils.Pow, funs::Vector, vars::Vector{SymbolicUtils.Symbolic}, args::Vector, tanArgs::Vector, expArgs::Vector) +# function analyze_expr(f::SymbolicUtils.Pow, funs::Vector, vars::Vector{SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}}, args::Vector, tanArgs::Vector, expArgs::Vector) # as = arguments(f) # p1 = analyze_expr(as[1], funs, vars, args, tanArgs, expArgs) # p2 = analyze_expr(as[2], funs, vars, args, tanArgs, expArgs) @@ -463,10 +463,10 @@ is_rational_multiple(a::SymbolicUtils.Mul, b::SymbolicUtils.Mul) = a.dict == b.dict && (isa(a.coeff, Integer) || isa(a.coeff, Rational)) && (isa(b.coeff, Integer) || isa(b.coeff, Rational)) -is_rational_multiple(a::SymbolicUtils.Mul, b::SymbolicUtils.Symbolic) = +is_rational_multiple(a::SymbolicUtils.Mul, b::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}) = (isa(a.coeff, Integer) || isa(a.coeff, Rational)) && (b in keys(a.dict)) && isone(a.dict[b]) -is_rational_multiple(a::SymbolicUtils.Symbolic, b::SymbolicUtils.Mul) = +is_rational_multiple(a::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}, b::SymbolicUtils.Mul) = (isa(b.coeff, Integer) || isa(b.coeff, Rational)) && (a in keys(b.dict)) && isone(b.dict[a]) rational_multiple(a, b) = error("not a rational multiple") @@ -478,14 +478,14 @@ function rational_multiple(a::SymbolicUtils.Mul, b::SymbolicUtils.Mul) a.coeff//b.coeff end -function rational_multiple(a::SymbolicUtils.Mul, b::SymbolicUtils.Symbolic) +function rational_multiple(a::SymbolicUtils.Mul, b::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}) if !is_rational_multiple(a, b) error("not a rational multiple") end return a.coeff//1 end -function rational_multiple(a::SymbolicUtils.Symbolic, b::SymbolicUtils.Mul) +function rational_multiple(a::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}, b::SymbolicUtils.Mul) if !is_rational_multiple(a, b) error("not a rational multiple") end @@ -510,7 +510,7 @@ function tan_nx(n::Int, x) sign_n*a/b end -function analyze_expr(f::SymbolicUtils.Term , funs::Vector, vars::Vector{SymbolicUtils.Symbolic}, args::Vector, tanArgs::Vector, expArgs::Vector) +function analyze_expr(f::SymbolicUtils.Term , funs::Vector, vars::Vector{SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}}, args::Vector, tanArgs::Vector, expArgs::Vector) op = operation(f) a = arguments(f)[1] if op == exp @@ -597,7 +597,7 @@ function analyze_expr(f::SymbolicUtils.Term , funs::Vector, vars::Vector{Symboli end # Generic method for SymbolicUtils 3.x - handles all symbolic expressions -function transform_symtree_to_mpoly(f::SymbolicUtils.Symbolic, vars::Vector, vars_mpoly::Vector) +function transform_symtree_to_mpoly(f::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}, vars::Vector, vars_mpoly::Vector) # Handle pure symbols if SymbolicUtils.issym(f) i = findfirst(x -> hash(x)==hash(f), vars) @@ -609,17 +609,17 @@ function transform_symtree_to_mpoly(f::SymbolicUtils.Symbolic, vars::Vector, var op = operation(f) if op == (+) # Handle Add operations - return sum([transform_symtree_to_mpoly(a, vars, vars_mpoly) for a in arguments(f)]) + return sum([transform_symtree_to_mpoly(SymbolicUtils.unwrap_const(a), vars, vars_mpoly) for a in arguments(f)]) elseif op == (*) # Handle Mul operations - return prod([transform_symtree_to_mpoly(a, vars, vars_mpoly) for a in arguments(f)]) + return prod([transform_symtree_to_mpoly(SymbolicUtils.unwrap_const(a), vars, vars_mpoly) for a in arguments(f)]) elseif op == (/) # Handle Div operations - as = arguments(f) + as = [SymbolicUtils.unwrap_const(x) for x in arguments(f)] return transform_symtree_to_mpoly(as[1], vars, vars_mpoly)//transform_symtree_to_mpoly(as[2], vars, vars_mpoly) elseif op == (^) # Handle Pow operations - as = arguments(f) + as = [SymbolicUtils.unwrap_const(x) for x in arguments(f)] @assert isa(as[2], Integer) if as[2]>=0 return transform_symtree_to_mpoly(as[1], vars, vars_mpoly)^as[2] @@ -768,7 +768,7 @@ end struct AlgebraicNumbersInvolved <: Exception end -function integrate_risch(f::SymbolicUtils.Add, x::SymbolicUtils.Symbolic; useQQBar::Bool=false, +function integrate_risch(f::SymbolicUtils.Add, x::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}; useQQBar::Bool=false, catchNotImplementedError::Bool=true, catchAlgorithmFailedError::Bool=true) # For efficiency compute integral of sum as sum of integrals g = f.coeff*x @@ -779,7 +779,7 @@ function integrate_risch(f::SymbolicUtils.Add, x::SymbolicUtils.Symbolic; useQQB g end -function integrate_risch(f::SymbolicUtils.Symbolic, x::SymbolicUtils.Symbolic; useQQBar::Bool=false, +function integrate_risch(f::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}, x::SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal}; useQQBar::Bool=false, catchNotImplementedError::Bool=true, catchAlgorithmFailedError::Bool=true) try p, funs, vars, args = analyze_expr(f, x) diff --git a/src/methods/rule_based/frontend.jl b/src/methods/rule_based/frontend.jl index 8b23e89..d40b672 100644 --- a/src/methods/rule_based/frontend.jl +++ b/src/methods/rule_based/frontend.jl @@ -9,7 +9,7 @@ if not, (original problem, false) function apply_rule(problem) result = nothing for (i, rule) in enumerate(RULES) - result = rule(problem) + result = rule2(rule, problem) if result !== nothing if result===problem VERBOSE && println("Infinite cycle created by rule $(IDENTIFIERS[i]) applied on ", problem) @@ -48,9 +48,13 @@ x^-3 ``` """ function ins(expr) + println("called ins with $expr, ",typeof(expr)) t = (@rule (~u)^(~m) => ~)(expr) - t!==nothing && return SymbolicUtils.Term{Number}(^,[t[:u],-t[:m]]) - return SymbolicUtils.Term{Number}(^,[expr,-1]) + println("t is $t") + t!==nothing && return SymbolicUtils.Term{SymbolicUtils.SymReal}(^,[t[:u],-t[:m]]) + tmp = SymbolicUtils.Term{SymReal}(^,[expr,-1]) + println("the return is $tmp") + return SymbolicUtils.Term{SymbolicUtils.SymReal}(^,[expr,-1]) end # TODO add threaded for speed? @@ -107,11 +111,11 @@ function repeated_prewalk(expr) return expr end -function integrate_rule_based(integrand::Symbolics.Num, int_var::Symbolics.Num; use_gamma::Bool=false, verbose::Bool=true, kwargs...) +function integrate_rule_based(integrand::Symbolics.Num, int_var::Symbolics.Num; use_gamma::Bool=false, verbose::Bool=false, kwargs...) global VERBOSE VERBOSE = verbose return simplify(repeated_prewalk(∫(integrand,int_var))) end -integrate_rule_based(integrand::SymbolicUtils.BasicSymbolic{Real}, int_var::SymbolicUtils.BasicSymbolic{Real}; kwargs...) = - integrate_rule_based(Num(integrand), Num(int_var); kwargs...) +# integrate_rule_based(integrand::SymbolicUtils.BasicSymbolic{Real}, int_var::SymbolicUtils.BasicSymbolic{Real}; kwargs...) = +# integrate_rule_based(Num(integrand), Num(int_var); kwargs...) diff --git a/src/methods/rule_based/general.jl b/src/methods/rule_based/general.jl index b09d565..1162bbd 100644 --- a/src/methods/rule_based/general.jl +++ b/src/methods/rule_based/general.jl @@ -64,7 +64,7 @@ coshintegral(x::Any) = println("hyperbolic cosine integral Chi(z) function (http @syms ∫(var1,var2) substitute_after_int(var1, var2, var3) # very big arrays containing rules and their identifiers -const RULES = SymbolicUtils.Rule[] +const RULES = Pair{Expr, Expr}[] const IDENTIFIERS = String[] # to use or not the gamma function in integration results @@ -80,19 +80,19 @@ all_rules_paths = [ "9 Miscellaneous/0.1 Integrand simplification rules.jl" "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.2 (a+b x)^m (c+d x)^n.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.3 (a+b x)^m (c+d x)^n (e+f x)^p.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.4 (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl" -# -# "1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.1 (a+b x^2)^p.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.2 (c x)^m (a+b x^2)^p.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.3 (a+b x^2)^p (c+d x^2)^q.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.4 (e x)^m (a+b x^2)^p (c+d x^2)^q.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.2 (a+b x)^m (c+d x)^n.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.3 (a+b x)^m (c+d x)^n (e+f x)^p.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.4 (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl" +# +"1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.1 (a+b x^2)^p.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.2 (c x)^m (a+b x^2)^p.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.3 (a+b x^2)^p (c+d x^2)^q.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.4 (e x)^m (a+b x^2)^p (c+d x^2)^q.jl" # # 5, 6, 7, 8, 9 # -# "1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.1 (a+b x^n)^p.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.2 (c x)^m (a+b x^n)^p.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.3 (a+b x^n)^p (c+d x^n)^q.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.1 (a+b x^n)^p.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.2 (c x)^m (a+b x^n)^p.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.3 (a+b x^n)^p (c+d x^n)^q.jl" # "1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.4 (e x)^m (a+b x^n)^p (c+d x^n)^q.jl" # "1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.5 (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl" # "1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.6 (g x)^m (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl" @@ -120,8 +120,8 @@ all_rules_paths = [ # # 1.4.1, 1.4.2 # # "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.7 P(x) (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.6 P(x) (a+b x)^m (c+d x)^n (e+f x)^p.jl" -# "1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.5 P(x) (a+b x)^m (c+d x)^n.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.6 P(x) (a+b x)^m (c+d x)^n (e+f x)^p.jl" +"1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.5 P(x) (a+b x)^m (c+d x)^n.jl" # # "1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.5 P(x) (a+b x^2+c x^4)^p.jl" # "1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.4 (f x)^m (d+e x^2)^q (a+b x^2+c x^4)^p.jl" @@ -133,7 +133,7 @@ all_rules_paths = [ # # # -# "2 Exponentials/2.1 (c+d x)^m (a+b (F^(g (e+f x)))^n)^p.jl" +"2 Exponentials/2.1 (c+d x)^m (a+b (F^(g (e+f x)))^n)^p.jl" # "2 Exponentials/2.2 (c+d x)^m (F^(g (e+f x)))^n (a+b (F^(g (e+f x)))^n)^p.jl" # "2 Exponentials/2.3 Miscellaneous exponentials.jl" # diff --git a/src/methods/rule_based/rule2.jl b/src/methods/rule_based/rule2.jl new file mode 100644 index 0000000..b00adc6 --- /dev/null +++ b/src/methods/rule_based/rule2.jl @@ -0,0 +1,169 @@ +# TODO rule condition inside the process? leads to faster cycling trough all the rules? +using Combinatorics: permutations + +const SymsType = SymbolicUtils.BasicSymbolic{SymbolicUtils.SymReal} +const MatchDict = Base.ImmutableDict{Symbol, SymsType} # or {Symbol, Union{Symbol, Real}} ? +const FAIL_DICT = MatchDict(:_fail,0) +const op_map = Dict(:+ => 0, :* => 1, :^ => 1) +""" +Rule verbose level: +0 - print nothing +1 - print "applying rule ... on expr ..." and if the rule succeded or not +2 - print also the result of the rewriting before eval +3 - print also every recursive call +""" +vblvl = 0 + +""" +data is a symbolic expression, we need to check if respects the rule +rule is a quoted expression, representing part of the rule +matches is the dictionary of the matches found so far + +return value is a ImmutableDict +1) if a mismatch is found, FAIL_DICT is returned. +2) if no mismatch is found but no new matches either (for example in mathcing ^2), the original matches is returned +3) otherwise the dictionary of old + new ones is returned that could look like: +Base.ImmutableDict{Symbol, SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymReal}}(:x => a, :y => b) + +""" +# TODO matches does assigment or mutation? which is faster? +function check_expr_r(data::SymsType, rule::Expr, matches::MatchDict) + vblvl>=3&&println("Checking ",data," against ",rule,", with matches: ",[m for m in matches]...) + rule.head != :call && error("It happened, rule head is not a call") #it should never happen + # rule is a slot + if rule.head == :call && rule.args[1] == :(~) + if rule.args[2] in keys(matches) # if the slot has already been matched + # check if it mached the same symbolic expression + !isequal(matches[rule.args[2]],data) && return FAIL_DICT::MatchDict + return matches::MatchDict + else # if never been matched + # if there is a predicate rule.args[2] is a expression with :: + if isa(rule.args[2], Expr) + # check it + pred = rule.args[2].args[2] + !eval(pred)(SymbolicUtils.unwrap_const(data)) && return FAIL_DICT + return Base.ImmutableDict(matches, rule.args[2].args[1], data)::MatchDict + end + # if no predicate add match + return Base.ImmutableDict(matches, rule.args[2], data)::MatchDict + end + end + # if there is a deflsot in the arguments + p=findfirst(a->isa(a, Expr) && a.args[1] == :~ && isa(a.args[2], Expr) && a.args[2].args[1] == :!,rule.args[2:end]) + if p!==nothing + # build rule expr without defslot and check it + if p==1 + newr = Expr(:call, rule.args[1], :(~$(rule.args[2].args[2].args[2])), rule.args[3]) + elseif p==2 + newr = Expr(:call, rule.args[1], rule.args[2], :(~$(rule.args[3].args[2].args[2]))) + else + error("defslot error")# it should never happen + end + rdict = check_expr_r(data, newr, matches) + rdict!==FAIL_DICT && return rdict::MatchDict + # if no normal match, check only the non-defslot part of the rule + rdict = check_expr_r(data, rule.args[p==1 ? 3 : 2], matches) + # if yes match + rdict!==FAIL_DICT && return Base.ImmutableDict(rdict, rule.args[p+1].args[2].args[2], get(op_map, rule.args[1], -1))::MatchDict + return FAIL_DICT::MatchDict + else + # rule is a call, check operation and arguments + # - check operation + if (rule.args[1] == ://) && isa(SymbolicUtils.unwrap_const(data), Rational) + # rational is a special case, in the integation rules is present only in between numbers, like 1//2 + r = SymbolicUtils.unwrap_const(data) + r.num == rule.args[2] && r.den == rule.args[3] && return matches::MatchDict + return FAIL_DICT::MatchDict + end + !iscall(data) && return FAIL_DICT::MatchDict + (Symbol(operation(data)) !== rule.args[1]) && return FAIL_DICT::MatchDict + # - check arguments + arg_data = arguments(data); arg_rule = rule.args[2:end]; + (length(arg_data) != length(arg_rule)) && return FAIL_DICT::MatchDict + if (rule.args[1]===:+) || (rule.args[1]===:*) + # commutative checks + for perm_arg_data in permutations(arg_data) # is the same if done on arg_rule right? + matches_this_perm = ceoaa(perm_arg_data, arg_rule, matches) + matches_this_perm!==FAIL_DICT && return matches_this_perm::MatchDict + # else try with next perm + end + # if all perm failed + return FAIL_DICT::MatchDict + else + # normal checks + return ceoaa(arg_data, arg_rule, matches)::MatchDict + end + end +end + +# check expression of all arguments +# elements of arg_rule can be Expr or Real +# TODO types of arg_data ??? +function ceoaa(arg_data, arg_rule::Vector{Any}, matches::MatchDict) + for (a, b) in zip(arg_data, arg_rule) + matches = check_expr_r(a, b, matches) + matches===FAIL_DICT && return FAIL_DICT::MatchDict + # else the match has been added (or not added but confirmed) + end + return matches::MatchDict +end + +# for when the rule contains a constant, a literal number +function check_expr_r(data::SymsType, rule::Real, matches::MatchDict) + # println("Checking ",data," against the real ",rule,", with matches: ",[m for m in matches]...) + unw = unwrap_const(data) + if isa(unw, Real) + unw!==rule && return FAIL_DICT::MatchDict + return matches::MatchDict + end + # else always fail + return FAIL_DICT::MatchDict +end + +""" +recursively traverse the rhs, and if it finds a expression like: +Expr + head: Symbol call + args: Array{Any}((2,)) + 1: Symbol ~ + 2: Symbol m +substitute it with the value found in matches dictionary. +""" +function rewrite(matches::MatchDict, rhs::Expr) + # println("called rewrite with rhs ", rhs) + # if a expression of a slot, change it with the matches + if rhs.head == :call && rhs.args[1] == :(~) + var_name = rhs.args[2] + if haskey(matches, var_name) + return matches[var_name]::SymsType + else + error("No match found for variable $(var_name)") #it should never happen + end + end + # otherwise call recursively on arguments and then reconstruct expression + args = [rewrite(matches, a) for a in rhs.args] + return Expr(rhs.head, args...)::Expr +end + +# called every time in the rhs::Expr there is a symbol like +# - custom function names (contains_var, ...) +# - normal functions names (+, ^, ...) +# - nothing +rewrite(matches::MatchDict, rhs::Symbol) = rhs::Symbol +# called each time in the rhs there is a real (like +1 or -2) +rewrite(matches::MatchDict, rhs::Real) = rhs::Real +# called each time in the rhs there is a string, like in int_and_subst calls +rewrite(matches::MatchDict, rhs::String) = rhs::String +# rewrite(matches::MatchDict, rhs) = rhs <--- NOT PRESENT ON PURPOSE, +# i want to know each type exactly + +function rule2(rule::Pair{Expr, Expr}, expr::SymsType)::Union{SymsType, Nothing} + vblvl>=1&&println("Applying $rule on $expr") + m = check_expr_r(expr, rule.first, MatchDict()) + vblvl>=1&&m===FAIL_DICT && println("Rule failed to match") + m===FAIL_DICT && return nothing::Nothing + vblvl>=1&&println("Rule matched succesfully") + r = rewrite(m, rule.second) + vblvl>=2&&println("About to return eval of $r") + return eval(r) +end \ No newline at end of file diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.jl new file mode 100644 index 0000000..f9b2347 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.1 (a+b x)^m.jl @@ -0,0 +1,33 @@ +# \((".*?"),\n@rule (∫(.|\n)*?)=>((.|\n)*?: nothing\)) +# ($1,\n:($2) => :($4) + +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.1.1 (a+b x)^m *) +("1_1_1_1_1", +:(∫(1/(~x),(~x))) => :(log((~x)))) + +("1_1_1_1_2", +:(∫((~x)^(~!m),(~x))) => :( + !contains_var((~m), (~x)) && + !eq((~m), -1) ? +(~x)^((~m) + 1)⨸((~m) + 1) : nothing)) + +("1_1_1_1_3", +:(∫(1/((~a) + (~!b)*(~x)),(~x))) => :( + !contains_var((~a), (~b), (~x)) ? +log((~a) + (~b)*(~x))⨸(~b) : nothing)) + +("1_1_1_1_4", +:(∫(((~!a) + (~!b)*(~x))^(~m),(~x))) => :( + !contains_var((~a), (~b), (~m), (~x)) && + !eq((~m), -1) ? +((~a) + (~b)*(~x))^((~m) + 1)⨸((~b)*((~m) + 1)) : nothing)) + +# ("1_1_1_1_5", +# @rule ∫(((~!a) + (~!b)*(~u))^(~m),(~x)) => +# !contains_var((~a), (~b), (~m), (~x)) && +# linear((~u), (~x)) && +# !eq((~u), (~x)) ? +# 1⨸ext_coeff.((~u), (~x)^ 1)*int_and_subst(((~a) + (~b)*(~x))^(~m), (~x), (~x), (~u), "1_1_1_1_5") : nothing) +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.2 (a+b x)^m (c+d x)^n.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.2 (a+b x)^m (c+d x)^n.jl new file mode 100644 index 0000000..f7de0ad --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.2 (a+b x)^m (c+d x)^n.jl @@ -0,0 +1,399 @@ +# \((".*?"),\n@rule (∫(.|\n)*?)=>((.|\n)*?: nothing\)) +# ($1,\n:($2) => :($4) + +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.1.2 (a+b x)^m (c+d x)^n *) +("1_1_1_2_1", +:(∫(((~a) + (~!b)*(~x))^(~!m)*((~c) + (~!d)*(~x)),(~x))) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + eq((~a)*(~d) - (~b)*(~c)*((~m) + 2), 0) ? +(~d)*(~x)*((~a) + (~b)*(~x))^((~m) + 1)⨸((~b)*((~m) + 2)) : nothing)) + +("1_1_1_2_2", +:(∫(1/(((~a) + (~!b)*(~x))*((~c) + (~!d)*(~x))),(~x))) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) ? +∫(1⨸((~a)*(~c) + (~b)*(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_1_2_3", +:(∫(1/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x))) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~a) + (~b)*(~x)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~c) + (~d)*(~x)), (~x)) : nothing)) + +("1_1_1_2_4", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~n),(~x))) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~m) + (~n) + 2, 0) && + !eq((~m), -1) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸(((~b)*(~c) - (~a)*(~d))*((~m) + 1)) : nothing)) + +("1_1_1_2_5", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~m),(~x))) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + igt((~m) + 1/2, 0) ? +(~x)*((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~m)⨸(2*(~m) + 1) + 2*(~a)*(~c)*(~m)⨸(2*(~m) + 1)*∫(((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^((~m) - 1), (~x)) : nothing)) + +("1_1_1_2_6", +:(∫(1/(((~a) + (~!b)*(~x))^(3//2)*((~c) + (~!d)*(~x))^(3//2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) ? +(~x)⨸((~a)*(~c)*sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))) : nothing)) + +("1_1_1_2_7", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~m),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + ilt((~m) + 3/2, 0) ? +-(~x)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~m) + 1)⨸(2*(~a)*(~c)*((~m) + 1)) + (2*(~m) + 3)⨸(2*(~a)*(~c)*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~m) + 1), (~x)) : nothing)) + +("1_1_1_2_8", +:(∫(((~a) + (~!b)*(~x))^(~!m)*((~c) + (~!d)*(~x))^(~!m),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + ( + ext_isinteger((~m)) || + gt((~a), 0) && + gt((~c), 0) + ) ? +∫(((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m), (~x)) : nothing)) + +("1_1_1_2_9", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~m),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + !(ext_isinteger(2*(~m))) ? +((~a) + (~b)*(~x))^ fracpart((~m))*((~c) + (~d)*(~x))^fracpart((~m))⨸((~a)*(~c) + (~b)*(~d)*(~x)^2)^fracpart((~m))* ∫(((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m), (~x)) : nothing)) + +("1_1_1_2_10", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ilt((~m), -1) && + !(ext_isinteger((~n))) && + gt((~n), 0) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)⨸((~b)*((~m) + 1)) - (~d)*(~n)⨸((~b)*((~m) + 1))*∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1), (~x)) : nothing)) + +("1_1_1_2_11", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ilt((~m), -1) && + !(ext_isinteger((~n))) && + lt((~n), 0) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸(((~b)*(~c) - (~a)*(~d))*((~m) + 1)) - (~d)*((~m) + (~n) + 2)⨸(((~b)*(~c) - (~a)*(~d))*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_2_12", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~m), 0) && + ( + !(ext_isinteger((~n))) || + eq((~c), 0) && + le(7*(~m) + 4*(~n) + 4, 0) || + lt(9*(~m) + 5*((~n) + 1), 0) || + gt((~m) + (~n) + 2, 0) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n), (~x)), (~x)) : nothing)) + +("1_1_1_2_13", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ilt((~m), 0) && + ext_isinteger((~n)) && + !( + igt((~n), 0) && + lt((~m) + (~n) + 2, 0) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n), (~x)), (~x)) : nothing)) + +("1_1_1_2_14", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ilt(simplify((~m) + (~n) + 2), 0) && + !eq((~m), -1) && + !( + lt((~m), -1) && + lt((~n), -1) && + ( + eq((~a), 0) || + !eq((~c), 0) && + lt((~m) - (~n), 0) && + ext_isinteger((~n)) + ) + ) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) + ) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸(((~b)*(~c) - (~a)*(~d))*((~m) + 1)) - (~d)*simplify((~m) + (~n) + 2)⨸(((~b)*(~c) - (~a)*(~d))*((~m) + 1))* ∫(((~a) + (~b)*(~x))^simplify((~m) + 1)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_2_15", +:(∫(1/(((~a) + (~!b)*(~x))^(9//4)*((~c) + (~!d)*(~x))^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + neg((~a)^2*(~b)^2) ? +-4⨸(5*(~b)*((~a) + (~b)*(~x))^(5⨸4)*((~c) + (~d)*(~x))^(1⨸4)) - (~d)⨸(5*(~b))*∫(1⨸(((~a) + (~b)*(~x))^(5⨸4)*((~c) + (~d)*(~x))^(5⨸4)), (~x)) : nothing)) + +("1_1_1_2_16", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~n), 0) && + lt((~m), -1) && + !( + ext_isinteger((~n)) && + !(ext_isinteger((~m))) + ) && + !( + ile((~m) + (~n) + 2, 0) && + ( + isfraction((~m)) || + ge(2*(~n) + (~m) + 1, 0) + ) + ) && + int_linear((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)⨸((~b)*((~m) + 1)) - (~d)*(~n)⨸((~b)*((~m) + 1))*∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1), (~x)) : nothing)) + +("1_1_1_2_17", +:(∫(1/(((~a) + (~!b)*(~x))^(5//4)*((~c) + (~!d)*(~x))^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + neg((~a)^2*(~b)^2) ? +-2⨸((~b)*((~a) + (~b)*(~x))^(1⨸4)*((~c) + (~d)*(~x))^(1⨸4)) + (~c)*∫(1⨸(((~a) + (~b)*(~x))^(5⨸4)*((~c) + (~d)*(~x))^(5⨸4)), (~x)) : nothing)) + +("1_1_1_2_18", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + igt((~m) + 1/2, 0) && + igt((~n) + 1/2, 0) && + lt((~m), (~n)) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)⨸((~b)*((~m) + (~n) + 1)) + 2*(~c)*(~n)⨸((~m) + (~n) + 1)*∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^((~n) - 1), (~x)) : nothing)) + +("1_1_1_2_19", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~n), 0) && + !eq((~m) + (~n) + 1, 0) && + !( + igt((~m), 0) && + ( + !(ext_isinteger((~n))) || + gt((~m), 0) && + lt((~m) - (~n), 0) + ) + ) && + !(ilt((~m) + (~n) + 2, 0)) && + int_linear((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)⨸((~b)*((~m) + (~n) + 1)) + (~n)*((~b)*(~c) - (~a)*(~d))⨸((~b)*((~m) + (~n) + 1))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^((~n) - 1), (~x)) : nothing)) + +("1_1_1_2_20", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~m), -1) && + !( + lt((~n), -1) && + ( + eq((~a), 0) || + !eq((~c), 0) && + lt((~m) - (~n), 0) && + ext_isinteger((~n)) + ) + ) && + int_linear((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸(((~b)*(~c) - (~a)*(~d))*((~m) + 1)) - (~d)*((~m) + (~n) + 2)⨸(((~b)*(~c) - (~a)*(~d))*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_2_21", +:(∫(1/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a) + (~c), 0) && + eq((~b) - (~d), 0) && + gt((~a), 0) ? +acosh((~b)*(~x)⨸(~a))⨸(~b) : nothing)) + +("1_1_1_2_22", +:(∫(1/(sqrt((~a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b) + (~d), 0) && + gt((~a) + (~c), 0) ? +∫(1⨸sqrt((~a)*(~c) - (~b)*((~a) - (~c))*(~x) - (~b)^2*(~x)^2), (~x)) : nothing)) + +("1_1_1_2_23", +:(∫(1/(sqrt((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + gt((~b)*(~c) - (~a)*(~d), 0) && + gt((~b), 0) ? +2⨸sqrt((~b))* int_and_subst(1⨸sqrt((~b)*(~c) - (~a)*(~d) + (~d)*(~x)^2), (~x), (~x), sqrt((~a) + (~b)*(~x)), "1_1_1_2_23") : nothing)) + +("1_1_1_2_24", +:(∫(1/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(1//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos(((~b)*(~c) - (~a)*(~d))/(~b)) ? +let + q = rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3) + -log((~a) + (~b)*(~x))⨸(2*(~b)*q) - 3⨸(2*(~b)*q)*int_and_subst(1⨸(rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3) - (~x)), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_24") + 3⨸(2*(~b))* int_and_subst(1⨸(rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2 + q*(~x) + (~x)^2), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_24") +end : nothing)) + +("1_1_1_2_25", +:(∫(1/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(1//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg(((~b)*(~c) - (~a)*(~d))/(~b)) ? +log((~a) + (~b)*(~x))⨸(2*(~b)*rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3)) - 3⨸(2*(~b)*rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3))*int_and_subst(1⨸(rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3) + (~x)), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_25") + 3⨸(2*(~b))* int_and_subst(1⨸(rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2 - rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3)*(~x) + (~x)^2), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_25") : nothing)) + +("1_1_1_2_26", +:(∫(1/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(2//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos(((~b)*(~c) - (~a)*(~d))/(~b)) ? +-log((~a) + (~b)*(~x))⨸(2*(~b)*rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2) - 3⨸(2*(~b)*rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2)*int_and_subst(1⨸(rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3) - (~x)), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_26") - 3⨸(2*(~b)*rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3))* int_and_subst(1⨸(rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2 + rt(((~b)*(~c) - (~a)*(~d))⨸(~b), 3)*(~x) + (~x)^2), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_26") : nothing)) + +("1_1_1_2_27", +:(∫(1/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(2//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg(((~b)*(~c) - (~a)*(~d))/(~b)) ? +-log((~a) + (~b)*(~x))⨸(2*(~b)*rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2) + 3⨸(2*(~b)*rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2)*int_and_subst(1⨸(rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3) + (~x)), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_27") + 3⨸(2*(~b)*rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3))* int_and_subst(1⨸(rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3)^2 - rt(-((~b)*(~c) - (~a)*(~d))⨸(~b), 3)*(~x) + (~x)^2), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸3), "1_1_1_2_27") : nothing)) + +("1_1_1_2_28", +:(∫(1/(((~!a) + (~!b)*(~x))^(1//3)*((~!c) + (~!d)*(~x))^(2//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + pos((~d)/(~b)) ? +-sqrt(3)*rt((~d)⨸(~b), 3)⨸(~d)* atan(2*rt((~d)⨸(~b), 3)*((~a) + (~b)*(~x))^(1⨸3)⨸(sqrt(3)*((~c) + (~d)*(~x))^(1⨸3)) + 1⨸sqrt(3)) - rt((~d)⨸(~b), 3)⨸(2*(~d))*log((~c) + (~d)*(~x)) - 3*rt((~d)⨸(~b), 3)⨸(2*(~d))*log(rt((~d)⨸(~b), 3)*((~a) + (~b)*(~x))^(1⨸3)⨸((~c) + (~d)*(~x))^(1⨸3) - 1) : nothing)) + +("1_1_1_2_29", +:(∫(1/(((~!a) + (~!b)*(~x))^(1//3)*((~!c) + (~!d)*(~x))^(2//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + neg((~d)/(~b)) ? +sqrt(3)*rt(-(~d)⨸(~b), 3)⨸(~d)* atan(1⨸sqrt(3) - 2*rt(-(~d)⨸(~b), 3)*((~a) + (~b)*(~x))^(1⨸3)⨸(sqrt(3)*((~c) + (~d)*(~x))^(1⨸3))) + rt(-(~d)⨸(~b), 3)⨸(2*(~d))*log((~c) + (~d)*(~x)) + 3*rt(-(~d)⨸(~b), 3)⨸(2*(~d))*log(rt(-(~d)⨸(~b), 3)*((~a) + (~b)*(~x))^(1⨸3)⨸((~c) + (~d)*(~x))^(1⨸3) + 1) : nothing)) + +("1_1_1_2_30", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~m),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt(-1, (~m), 0) && + le(3, ext_den((~m)), 4) && + atom((~b)*(~c) + (~a)*(~d)) ? +((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~m)⨸((~a)*(~c) + ((~b)*(~c) + (~a)*(~d))*(~x) + (~b)*(~d)*(~x)^2)^(~m)* ∫(((~a)*(~c) + ((~b)*(~c) + (~a)*(~d))*(~x) + (~b)*(~d)*(~x)^2)^(~m), (~x)) : nothing)) + +("1_1_1_2_31", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~m),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt(-1, (~m), 0) && + le(3, ext_den((~m)), 4) ? +((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~m)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x)))^(~m)* ∫(((~a)*(~c) + ((~b)*(~c) + (~a)*(~d))*(~x) + (~b)*(~d)*(~x)^2)^(~m), (~x)) : nothing)) + +("1_1_1_2_32", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt(-1, (~m), 0) && + le(-1, (~n), 0) && + le(ext_den((~n)), ext_den((~m))) && + int_linear((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +ext_den((~m))⨸(~b)* int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~c) - (~a)*(~d)⨸(~b) + (~d)*(~x)^ext_den((~m))⨸(~b))^(~n), (~x), (~x), ((~a) + (~b)*(~x))^(1⨸ext_den((~m))), "1_1_1_2_32") : nothing)) + +("1_1_1_2_33", +:(∫(((~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + ( + ext_isinteger((~n)) || + gt((~c), 0) && + !( + eq((~n), -1/2) && + eq((~c)^2 - (~d)^2, 0) && + gt(-(~d)/((~b)*(~c)), 0) + ) + ) ? +(~c)^(~n)*((~b)*(~x))^((~m) + 1)⨸((~b)*((~m) + 1))* hypergeometric2f1(-(~n), (~m) + 1, (~m) + 2, -(~d)*(~x)⨸(~c)) : nothing)) + +("1_1_1_2_34", +:(∫(((~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~m), (~n), (~x)) && + !(ext_isinteger((~n))) && + ( + ext_isinteger((~m)) || + gt(-(~d)/((~b)*(~c)), 0) + ) ? +((~c) + (~d)*(~x))^((~n) + 1)⨸((~d)*((~n) + 1)*(-(~d)⨸((~b)*(~c)))^(~m))* hypergeometric2f1(-(~m), (~n) + 1, (~n) + 2, 1 + (~d)*(~x)⨸(~c)) : nothing)) + +("1_1_1_2_35", +:(∫(((~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + !(gt((~c), 0)) && + !(gt(-(~d)/((~b)*(~c)), 0)) && + ( + isrational((~m)) && + !( + eq((~n), -1/2) && + eq((~c)^2 - (~d)^2, 0) + ) || + !(isrational((~n))) + ) ? +(~c)^intpart((~n))*((~c) + (~d)*(~x))^fracpart((~n))⨸(1 + (~d)*(~x)⨸(~c))^fracpart((~n))* ∫(((~b)*(~x))^(~m)*(1 + (~d)*(~x)⨸(~c))^(~n), (~x)) : nothing)) + +("1_1_1_2_36", +:(∫(((~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + !(gt((~c), 0)) && + !(gt(-(~d)/((~b)*(~c)), 0)) ? +(-(~b)*(~c)⨸(~d))^intpart((~m))*((~b)*(~x))^fracpart((~m))⨸(-(~d)*(~x)⨸(~c))^fracpart((~m))* ∫((-(~d)*(~x)⨸(~c))^(~m)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_2_37", +:(∫(((~a) + (~!b)*(~x))^(~m::(!ext_isinteger))*((~c) + (~!d)*(~x))^(~n::ext_isinteger),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +((~b)*(~c) - (~a)*(~d))^(~n)*((~a) + (~b)*(~x))^((~m) + 1)⨸((~b)^((~n) + 1)*((~m) + 1))* hypergeometric2f1(-(~n), (~m) + 1, (~m) + 2, -(~d)*((~a) + (~b)*(~x))⨸((~b)*(~c) - (~a)*(~d))) : nothing)) + +("1_1_1_2_38", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~b)/((~b)*(~c) - (~a)*(~d)), 0) && + ( + isrational((~m)) || + !( + isrational((~n)) && + gt(-(~d)/((~b)*(~c) - (~a)*(~d)), 0) + ) + ) ? +((~a) + (~b)*(~x))^((~m) + 1)⨸((~b)*((~m) + 1)*((~b)⨸((~b)*(~c) - (~a)*(~d)))^(~n))* hypergeometric2f1(-(~n), (~m) + 1, (~m) + 2, -(~d)*((~a) + (~b)*(~x))⨸((~b)*(~c) - (~a)*(~d))) : nothing)) + +("1_1_1_2_39", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + ( + isrational((~m)) || + !(simpler((~n) + 1, (~m) + 1)) + ) ? +((~c) + (~d)*(~x))^ fracpart( (~n))⨸(((~b)⨸((~b)*(~c) - (~a)*(~d)))^intpart((~n))*((~b)*((~c) + (~d)*(~x))⨸((~b)*(~c) - (~a)*(~d)))^ fracpart((~n)))* ∫(((~a) + (~b)*(~x))^(~m)*simp((~b)*(~c)⨸((~b)*(~c) - (~a)*(~d)) + (~b)*(~d)*(~x)⨸((~b)*(~c) - (~a)*(~d)), (~x))^(~n), (~x)) : nothing)) + +("1_1_1_2_40", +:(∫(((~!a) + (~!b)*(~u))^(~!m)*((~!c) + (~!d)*(~u))^(~!n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + linear((~u), (~x)) && + !eq(ext_coeff((~u), (~x), 0), 0) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n), (~x), (~x), (~u), "1_1_1_2_40") : nothing)) + +#(* IntLinearQ[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. *) IntLinearQ[a_, b_, c_, d_, m_, n_, x_] := IGtQ[m, 0] || IGtQ[n, 0] || IntegersQ[3*m, 3*n] || IntegersQ[4*m, 4*n] || IntegersQ[2*m, 6*n] || IntegersQ[6*m, 2*n] || ILtQ[m + n, -1] || IntegerQ[m + n] && RationalQ[m] + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.3 (a+b x)^m (c+d x)^n (e+f x)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.3 (a+b x)^m (c+d x)^n (e+f x)^p.jl new file mode 100644 index 0000000..ec245f9 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.3 (a+b x)^m (c+d x)^n (e+f x)^p.jl @@ -0,0 +1,750 @@ +file_rules = [ +# (* ::Subsection::Closed:: *) +# (* 1.1.1.3 (a+b x)^m (c+d x)^n (e+f x)^p *) +("1_1_1_3_1", +:(∫(((~a) + (~!b)*(~x))^(~!m)*((~c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~n), (~m)) && + ext_isinteger( (~m)) && + ( + !eq((~m), -1) || + eq((~e), 0) && + ( + eq((~p), 1) || + !(ext_isinteger((~p))) + ) + ) ? +∫(((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_2", +:(∫(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + !eq((~n) + (~p) + 2, 0) && + eq((~a)*(~d)*(~f)*((~n) + (~p) + 2) - (~b)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)), 0) ? +(~b)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)*(~f)*((~n) + (~p) + 2)) : nothing)) + +("1_1_1_3_3", +:(∫(((~a) + (~!b)*(~x))*((~!d)*(~x))^(~!n)*((~e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + igt((~p), 0) && + eq((~b)*(~e) + (~a)*(~f), 0) && + !( + ilt((~n) + (~p) + 2, 0) && + gt((~n) + 2*(~p), 0) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))*((~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing)) + +("1_1_1_3_4", +:(∫(((~a) + (~!b)*(~x))*((~!d)*(~x))^(~!n)*((~e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + igt((~p), 0) && + ( + !eq((~n), -1) || + eq((~p), 1) + ) && + !eq((~b)*(~e) + (~a)*(~f), 0) && + ( + !(ext_isinteger((~n))) || + lt(9*(~p) + 5*(~n), 0) || + ge((~n) + (~p) + 1, 0) || + ge((~n) + (~p) + 2, 0) && + isrational((~a), (~b), (~d), (~e), (~f)) + ) && + ( + !eq((~n) + (~p) + 3, 0) || + eq((~p), 1) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))*((~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing)) + +("1_1_1_3_5", +:(∫(((~!a) + (~!b)*(~x))*((~c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + ilt((~n), 0) && + ilt((~p), 0) || + eq((~p), 1) || + igt((~p), 0) && + ( + !(ext_isinteger((~n))) || + le(9*(~p) + 5*((~n) + 2), 0) || + ge((~n) + (~p) + 1, 0) || + ge((~n) + (~p) + 2, 0) && + isrational((~a), (~b), (~c), (~d), (~e), (~f)) + ) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing)) + +("1_1_1_3_6", +:(∫(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + lt((~p), -1) && + ( + !(lt((~n), -1)) || + ext_isinteger((~p)) || + !( + ext_isinteger((~n)) || + !( + eq((~e), 0) || + !( + eq((~c), 0) || + lt((~p), (~n)) + ) + ) + ) + ) ? +-((~b)*(~e) - (~a)*(~f))*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~f)*((~p) + 1)*((~c)*(~f) - (~d)*(~e))) - ((~a)*(~d)*(~f)*((~n) + (~p) + 2) - (~b)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)))⨸((~f)*((~p) + 1)*((~c)*(~f) - (~d)*(~e)))* ∫(((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^((~p) + 1), (~x)) : nothing)) + +("1_1_1_3_7", +:(∫(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + !(isrational((~p))) && + sumsimpler((~p), 1) ? +-((~b)*(~e) - (~a)*(~f))*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~f)*((~p) + 1)*((~c)*(~f) - (~d)*(~e))) - ((~a)*(~d)*(~f)*((~n) + (~p) + 2) - (~b)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)))⨸((~f)*((~p) + 1)*((~c)*(~f) - (~d)*(~e)))* ∫(((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^simplify((~p) + 1), (~x)) : nothing)) + +("1_1_1_3_8", +:(∫(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + !eq((~n) + (~p) + 2, 0) ? +(~b)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)*(~f)*((~n) + (~p) + 2)) + ((~a)*(~d)*(~f)*((~n) + (~p) + 2) - (~b)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)))⨸((~d)* (~f)*((~n) + (~p) + 2))*∫(((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_9", +:(∫(((~!a) + (~!b)*(~x))^2*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + !eq((~n) + (~p) + 2, 0) && + !eq((~n) + (~p) + 3, 0) && + eq( (~d)*(~f)*((~n) + (~p) + 2)*((~a)^2*(~d)*(~f)*((~n) + (~p) + 3) - (~b)*((~b)*(~c)*(~e) + (~a)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)))) - (~b)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1))*((~a)*(~d)*(~f)*((~n) + (~p) + 4) - (~b)*((~d)*(~e)*((~n) + 2) + (~c)*(~f)*((~p) + 2))), 0) ? +(~b)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)*(2*(~a)*(~d)*(~f)*((~n) + (~p) + 3) - (~b)*((~d)*(~e)*((~n) + 2) + (~c)*(~f)*((~p) + 2)) + (~b)*(~d)*(~f)*((~n) + (~p) + 2)*(~x))⨸((~d)^2* (~f)^2*((~n) + (~p) + 2)*((~n) + (~p) + 3)) : nothing)) + +("1_1_1_3_10", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~f), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~m) - (~n) - 1, 0) && + !(isrational((~p))) && + !(igt((~m), 0)) && + !eq((~m) + (~n) + (~p) + 2, 0) ? +(~a)*∫(((~a) + (~b)*(~x))^(~n)*((~c) + (~d)*(~x))^(~n)*((~f)*(~x))^(~p), (~x)) + (~b)⨸(~f)*∫(((~a) + (~b)*(~x))^(~n)*((~c) + (~d)*(~x))^(~n)*((~f)*(~x))^((~p) + 1), (~x)) : nothing)) + +("1_1_1_3_11", +:(∫(((~!e) + (~!f)*(~x))^(~!p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + ext_isinteger((~p)) ? +∫(ext_expand(((~e) + (~f)*(~x))^(~p)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)), (~x)) : nothing)) + +("1_1_1_3_12", +:(∫(((~!e) + (~!f)*(~x))^(~p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + lt(0, (~p), 1) ? +((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^((~p) - 1)⨸((~a) + (~b)*(~x)), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^((~p) - 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing)) + +("1_1_1_3_13", +:(∫(((~!e) + (~!f)*(~x))^(~p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~p), 1) ? +(~f)*((~e) + (~f)*(~x))^((~p) - 1)⨸((~b)*(~d)*((~p) - 1)) + 1⨸((~b)*(~d))* ∫(((~b)*(~d)*(~e)^2 - (~a)*(~c)*(~f)^2 + (~f)*(2*(~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f))* (~x))*((~e) + (~f)*(~x))^((~p) - 2)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing)) + +("1_1_1_3_14", +:(∫(((~!e) + (~!f)*(~x))^(~p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + lt((~p), -1) ? +(~f)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~p) + 1)*((~b)*(~e) - (~a)*(~f))*((~d)*(~e) - (~c)*(~f))) + 1⨸(((~b)*(~e) - (~a)*(~f))*((~d)*(~e) - (~c)*(~f)))* ∫(((~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f) - (~b)*(~d)*(~f)*(~x))*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing)) + +("1_1_1_3_15", +:(∫(((~!e) + (~!f)*(~x))^(~p)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^(~p)⨸((~a) + (~b)*(~x)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^(~p)⨸((~c) + (~d)*(~x)), (~x)) : nothing)) + +("1_1_1_3_16", +:(∫(((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~p)/((~!a) + (~!b)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + igt((~n), 0) && + lt((~p), -1) && + isfraction((~p)) ? +∫(ext_expand(((~e) + (~f)*(~x))^ fracpart((~p)), ((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^intpart((~p))⨸((~a) + (~b)*(~x)), (~x)), (~x)) : nothing)) + +("1_1_1_3_17", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + ext_isinteger((~m), (~n)) && + ( + ext_isinteger((~p)) || + gt((~m), 0) && + ge((~n), -1) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing)) + +("1_1_1_3_18", +:(∫(((~!a) + (~!b)*(~x))^2*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + ( + lt((~n), -1) || + eq((~n) + (~p) + 3, 0) && + !eq((~n), -1) && + ( + sumsimpler((~n), 1) || + !(sumsimpler((~p), 1)) + ) + ) ? +((~b)*(~c) - (~a)*(~d))^2*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)^2*((~d)*(~e) - (~c)*(~f))*((~n) + 1)) - 1⨸((~d)^2*((~d)*(~e) - (~c)*(~f))*((~n) + 1))*∫(((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^(~p)* simplify((~a)^2*(~d)^2*(~f)*((~n) + (~p) + 2) + (~b)^2*(~c)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)) - 2*(~a)*(~b)*(~d)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)) - (~b)^2*(~d)*((~d)*(~e) - (~c)*(~f))*((~n) + 1)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_19", +:(∫(((~!a) + (~!b)*(~x))^2*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + !eq((~n) + (~p) + 3, 0) ? +(~b)*((~a) + (~b)*(~x))*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)*(~f)*((~n) + (~p) + 3)) + 1⨸((~d)*(~f)*((~n) + (~p) + 3))*∫(((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)^2*(~d)*(~f)*((~n) + (~p) + 3) - (~b)*((~b)*(~c)*(~e) + (~a)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1))) + (~b)*((~a)*(~d)*(~f)*((~n) + (~p) + 4) - (~b)*((~d)*(~e)*((~n) + 2) + (~c)*(~f)*((~p) + 2)))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_20", +:(∫(1/(((~!a) + (~!b)*(~x))^(1//3)*((~!c) + (~!d)*(~x))^(2//3)*((~!e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +-sqrt(3)*rt(((~d)*(~e) - (~c)*(~f))⨸((~b)*(~e) - (~a)*(~f)), 3)* atan(1⨸sqrt(3) + 2*rt(((~d)*(~e) - (~c)*(~f))⨸((~b)*(~e) - (~a)*(~f)), 3)*((~a) + (~b)*(~x))^(1⨸3)⨸(sqrt(3)*((~c) + (~d)*(~x))^(1⨸3)))⨸((~d)*(~e) - (~c)*(~f)) + rt(((~d)*(~e) - (~c)*(~f))⨸((~b)*(~e) - (~a)*(~f)), 3)*log((~e) + (~f)*(~x))⨸(2*((~d)*(~e) - (~c)*(~f))) - 3*rt(((~d)*(~e) - (~c)*(~f))⨸((~b)*(~e) - (~a)*(~f)), 3)*log(rt(((~d)*(~e) - (~c)*(~f))⨸((~b)*(~e) - (~a)*(~f)), 3)*((~a) + (~b)*(~x))^(1⨸3) - ((~c) + (~d)*(~x))^(1⨸3))⨸(2*((~d)*(~e) - (~c)*(~f))) : nothing)) + +("1_1_1_3_21", +:(∫(1/(sqrt((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*((~!e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq(2*(~b)*(~d)*(~e) - (~f)*((~b)*(~c) + (~a)*(~d)), 0) ? +(~b)*(~f)*int_and_subst(1⨸((~d)*((~b)*(~e) - (~a)*(~f))^2 + (~b)*(~f)^2*(~x)^2), (~x), (~x), sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x)), "1_1_1_3_21") : nothing)) + +("1_1_1_3_22", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)/((~!e) + (~!f)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~m) + (~n) + 1, 0) && + isrational((~n)) && + lt(-1, (~m), 0) && + simpler((~a) + (~b)*(~x), (~c) + (~d)*(~x)) ? +ext_den((~m))*int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)⨸((~b)*(~e) - (~a)*(~f) - ((~d)*(~e) - (~c)*(~f))*(~x)^ext_den((~m))), (~x), (~x), ((~a) + (~b)*(~x))^(1⨸ext_den((~m)))⨸((~c) + (~d)*(~x))^(1⨸ext_den((~m))), "1_1_1_3_22") : nothing)) + +("1_1_1_3_23", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + eq((~m) + (~n) + (~p) + 2, 0) && + gt((~n), 0) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~p), 1)) + ) && + !eq((~m), -1) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~e) - (~a)*(~f))) - (~n)*((~d)*(~e) - (~c)*(~f))⨸(((~m) + 1)*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_24", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + eq(simplify((~m) + (~n) + (~p) + 3), 0) && + eq((~a)*(~d)*(~f)*((~m) + 1) + (~b)*(~c)*(~f)*((~n) + 1) + (~b)*(~d)*(~e)*((~p) + 1), 0) && + !eq((~m), -1) ? +(~b)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) : nothing)) + +("1_1_1_3_25", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + eq(simplify((~m) + (~n) + (~p) + 3), 0) && + ( + lt((~m), -1) || + sumsimpler((~m), 1) + ) ? +(~b)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + ((~a)*(~d)*(~f)*((~m) + 1) + (~b)*(~c)*(~f)*((~n) + 1) + (~b)*(~d)*(~e)*((~p) + 1))⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_26", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + lt((~m), -1) && + gt((~n), 0) && + gt((~p), 0) && + ( + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) || + ext_isinteger((~m), (~n) + (~p)) || + ext_isinteger((~p), (~m) + (~n)) + ) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)⨸((~b)*((~m) + 1)) - 1⨸((~b)*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1)*((~e) + (~f)*(~x))^((~p) - 1)* simplify((~d)*(~e)*(~n) + (~c)*(~f)*(~p) + (~d)*(~f)*((~n) + (~p))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_27", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + lt((~m), -1) && + gt((~n), 1) && + ( + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) || + ext_isinteger((~m), (~n) + (~p)) || + ext_isinteger((~p), (~m) + (~n)) + ) ? +((~b)*(~c) - (~a)*(~d))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~b)*((~b)*(~e) - (~a)*(~f))*((~m) + 1)) + 1⨸((~b)*((~b)*(~e) - (~a)*(~f))*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 2)*((~e) + (~f)*(~x))^(~p)* simplify((~a)*(~d)*((~d)*(~e)*((~n) - 1) + (~c)*(~f)*((~p) + 1)) + (~b)*(~c)*((~d)*(~e)*((~m) - (~n) + 2) - (~c)*(~f)*((~m) + (~p) + 2)) + (~d)*((~a)*(~d)*(~f)*((~n) + (~p)) + (~b)*((~d)*(~e)*((~m) + 1) - (~c)*(~f)*((~m) + (~n) + (~p) + 1)))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_28", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + lt((~m), -1) && + gt((~n), 0) && + ( + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) || + ext_isinteger((~m), (~n) + (~p)) || + ext_isinteger((~p), (~m) + (~n)) + ) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~e) - (~a)*(~f))) - 1⨸(((~m) + 1)*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1)*((~e) + (~f)*(~x))^(~p)* simplify((~d)*(~e)*(~n) + (~c)*(~f)*((~m) + (~p) + 2) + (~d)*(~f)*((~m) + (~n) + (~p) + 2)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_29", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + gt((~m), 1) && + !eq((~m) + (~n) + (~p) + 1, 0) && + ext_isinteger((~m)) ? +(~b)*((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)* (~f)*((~m) + (~n) + (~p) + 1)) + 1⨸((~d)*(~f)*((~m) + (~n) + (~p) + 1))* ∫(((~a) + (~b)*(~x))^((~m) - 2)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)^2*(~d)*(~f)*((~m) + (~n) + (~p) + 1) - (~b)*((~b)*(~c)*(~e)*((~m) - 1) + (~a)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1))) + (~b)*((~a)*(~d)*(~f)*(2*(~m) + (~n) + (~p)) - (~b)*((~d)*(~e)*((~m) + (~n)) + (~c)*(~f)*((~m) + (~p))))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_30", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + gt((~m), 0) && + gt((~n), 0) && + !eq((~m) + (~n) + (~p) + 1, 0) && + ( + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) || + ( + ext_isinteger((~m), (~n) + (~p)) || + ext_isinteger((~p), (~m) + (~n)) + ) + ) ? +((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~f)*((~m) + (~n) + (~p) + 1)) - 1⨸((~f)*((~m) + (~n) + (~p) + 1))* ∫(((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^((~n) - 1)*((~e) + (~f)*(~x))^(~p)* simplify((~c)*(~m)*((~b)*(~e) - (~a)*(~f)) + (~a)*(~n)*((~d)*(~e) - (~c)*(~f)) + ((~d)*(~m)*((~b)*(~e) - (~a)*(~f)) + (~b)*(~n)*((~d)*(~e) - (~c)*(~f)))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_31", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + gt((~m), 1) && + !eq((~m) + (~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~b)*((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)* (~f)*((~m) + (~n) + (~p) + 1)) + 1⨸((~d)*(~f)*((~m) + (~n) + (~p) + 1))* ∫(((~a) + (~b)*(~x))^((~m) - 2)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)^2*(~d)*(~f)*((~m) + (~n) + (~p) + 1) - (~b)*((~b)*(~c)*(~e)*((~m) - 1) + (~a)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1))) + (~b)*((~a)*(~d)*(~f)*(2*(~m) + (~n) + (~p)) - (~b)*((~d)*(~e)*((~m) + (~n)) + (~c)*(~f)*((~m) + (~p))))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_32", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + ilt((~m), -1) && + ( + ext_isinteger((~n)) || + ext_isinteger(2*(~n), 2*(~p)) || + ilt((~m) + (~n) + (~p) + 3, 0) + ) ? +(~b)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)*(~d)*(~f)*((~m) + 1) - (~b)*((~d)*(~e)*((~m) + (~n) + 2) + (~c)*(~f)*((~m) + (~p) + 2)) - (~b)*(~d)*(~f)*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_33", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~b)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)*(~d)*(~f)*((~m) + 1) - (~b)*((~d)*(~e)*((~m) + (~n) + 2) + (~c)*(~f)*((~m) + (~p) + 2)) - (~b)*(~d)*(~f)*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_34", +:(∫(1/(((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*((~!e) + (~!f)*(~x))^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt(-(~f)/((~d)*(~e) - (~c)*(~f)), 0) ? +-4*int_and_subst((~x)^2⨸(((~b)*(~e) - (~a)*(~f) - (~b)*(~x)^4)*sqrt((~c) - (~d)*(~e)⨸(~f) + (~d)*(~x)^4⨸(~f))), (~x), (~x), ((~e) + (~f)*(~x))^(1⨸4), "1_1_1_3_34") : nothing)) + +("1_1_1_3_35", +:(∫(1/(((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*((~!e) + (~!f)*(~x))^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !(gt(-(~f)/((~d)*(~e) - (~c)*(~f)), 0)) ? +sqrt(-(~f)*((~c) + (~d)*(~x))⨸((~d)*(~e) - (~c)*(~f)))⨸sqrt((~c) + (~d)*(~x))* ∫(1⨸(((~a) + (~b)*(~x))* sqrt(-(~c)*(~f)⨸((~d)*(~e) - (~c)*(~f)) - (~d)*(~f)*(~x)⨸((~d)*(~e) - (~c)*(~f)))*((~e) + (~f)*(~x))^(1⨸4)), (~x)) : nothing)) + +("1_1_1_3_36", +:(∫(1/(((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*((~!e) + (~!f)*(~x))^(3//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt(-(~f)/((~d)*(~e) - (~c)*(~f)), 0) ? +-4*int_and_subst(1⨸(((~b)*(~e) - (~a)*(~f) - (~b)*(~x)^4)*sqrt((~c) - (~d)*(~e)⨸(~f) + (~d)*(~x)^4⨸(~f))), (~x), (~x), ((~e) + (~f)*(~x))^(1⨸4), "1_1_1_3_36") : nothing)) + +("1_1_1_3_37", +:(∫(1/(((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*((~!e) + (~!f)*(~x))^(3//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !(gt(-(~f)/((~d)*(~e) - (~c)*(~f)), 0)) ? +sqrt(-(~f)*((~c) + (~d)*(~x))⨸((~d)*(~e) - (~c)*(~f)))⨸sqrt((~c) + (~d)*(~x))* ∫(1⨸(((~a) + (~b)*(~x))* sqrt(-(~c)*(~f)⨸((~d)*(~e) - (~c)*(~f)) - (~d)*(~f)*(~x)⨸((~d)*(~e) - (~c)*(~f)))*((~e) + (~f)*(~x))^(3⨸4)), (~x)) : nothing)) + +("1_1_1_3_38", +:(∫(sqrt((~e) + (~!f)*(~x))/(sqrt((~!b)*(~x))*sqrt((~c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) && + gt((~c), 0) && + gt((~e), 0) && + !(lt(-(~b)/(~d), 0)) ? +2*sqrt((~e))⨸(~b)*rt(-(~b)⨸(~d), 2)* elliptic_e(asin(sqrt((~b)*(~x))⨸(sqrt((~c))*rt(-(~b)⨸(~d), 2))), (~c)*(~f)⨸((~d)*(~e))) : nothing)) + +("1_1_1_3_39", +:(∫(sqrt((~e) + (~!f)*(~x))/(sqrt((~!b)*(~x))*sqrt((~c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) && + gt((~c), 0) && + gt((~e), 0) && + lt(-(~b)/(~d), 0) ? +sqrt(-(~b)*(~x))⨸sqrt((~b)*(~x))* ∫(sqrt((~e) + (~f)*(~x))⨸(sqrt(-(~b)*(~x))*sqrt((~c) + (~d)*(~x))), (~x)) : nothing)) + +("1_1_1_3_40", +:(∫(sqrt((~e) + (~!f)*(~x))/(sqrt((~!b)*(~x))*sqrt((~c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) && + !( + gt((~c), 0) && + gt((~e), 0) + ) ? +sqrt((~e) + (~f)*(~x))*sqrt(1 + (~d)*(~x)⨸(~c))⨸(sqrt((~c) + (~d)*(~x))*sqrt(1 + (~f)*(~x)⨸(~e)))* ∫(sqrt(1 + (~f)*(~x)⨸(~e))⨸(sqrt((~b)*(~x))*sqrt(1 + (~d)*(~x)⨸(~c))), (~x)) : nothing)) + +# (* Int[Sqrt[e_.+f_.*x_]/(Sqrt[a_+b_.*x_]*Sqrt[c_+d_.*x_]),x_Symbol] := f/b*Int[Sqrt[a+b*x]/(Sqrt[c+d*x]*Sqrt[e+f*x]),x] - f/b*Int[1/(Sqrt[a+b*x]*Sqrt[c+d*x]*Sqrt[e+f*x]),x] /; FreeQ[{a,b,c,d,e,f},x] && EqQ[b*e-f*(a-1),0] *) +# (* Int[Sqrt[e_.+f_.*x_]/(Sqrt[a_+b_.*x_]*Sqrt[c_+d_.*x_]),x_Symbol] := 2/b*Rt[-(b*c-a*d)/d,2]*Sqrt[(b*e-a*f)/(b*c-a*d)]* EllipticE[ArcSin[Sqrt[a+b*x]/Rt[-(b*c-a*d)/d,2]],f*(b*c-a*d)/(d*( b*e-a*f))] /; FreeQ[{a,b,c,d,e,f},x] && GtQ[b/(b*c-a*d),0] && GtQ[b/(b*e-a*f),0] && Not[LtQ[-(b*c-a*d)/d,0]] && Not[SimplerQ[c+d*x,a+b*x] && GtQ[-d/(b*c-a*d),0] && GtQ[d/(d*e-c*f),0] && Not[LtQ[(b*c-a*d)/b,0]]] *) +("1_1_1_3_41", +:(∫(sqrt((~!e) + (~!f)*(~x))/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~b)/((~b)*(~c) - (~a)*(~d)), 0) && + gt((~b)/((~b)*(~e) - (~a)*(~f)), 0) && + !(lt(-((~b)*(~c) - (~a)*(~d))/(~d), 0)) && + !( + simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) && + gt(-(~d)/((~b)*(~c) - (~a)*(~d)), 0) && + gt((~d)/((~d)*(~e) - (~c)*(~f)), 0) && + !(lt(((~b)*(~c) - (~a)*(~d))/(~b), 0)) + ) ? +2⨸(~b)*rt(-((~b)*(~e) - (~a)*(~f))⨸(~d), 2)* elliptic_e(asin(sqrt((~a) + (~b)*(~x))⨸rt(-((~b)*(~c) - (~a)*(~d))⨸(~d), 2)), (~f)*((~b)*(~c) - (~a)*(~d))⨸((~d)*((~b)*(~e) - (~a)*(~f)))) : nothing)) + +("1_1_1_3_42", +:(∫(sqrt((~!e) + (~!f)*(~x))/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !( + gt((~b)/((~b)*(~c) - (~a)*(~d)), 0) && + gt((~b)/((~b)*(~e) - (~a)*(~f)), 0) + ) && + !(lt(-((~b)*(~c) - (~a)*(~d))/(~d), 0)) ? +sqrt((~e) + (~f)*(~x))* sqrt((~b)*((~c) + (~d)*(~x))⨸((~b)*(~c) - (~a)*(~d)))⨸(sqrt((~c) + (~d)*(~x))* sqrt((~b)*((~e) + (~f)*(~x))⨸((~b)*(~e) - (~a)*(~f))))* ∫( sqrt((~b)*(~e)⨸((~b)*(~e) - (~a)*(~f)) + (~b)*(~f)*(~x)⨸((~b)*(~e) - (~a)*(~f)))⨸(sqrt((~a) + (~b)*(~x))* sqrt((~b)*(~c)⨸((~b)*(~c) - (~a)*(~d)) + (~b)*(~d)*(~x)⨸((~b)*(~c) - (~a)*(~d)))), (~x)) : nothing)) + +("1_1_1_3_43", +:(∫(1/(sqrt((~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~c), 0) && + gt((~e), 0) && + ( + gt(-(~b)/(~d), 0) || + lt(-(~b)/(~f), 0) + ) ? +2⨸((~b)*sqrt((~e)))*rt(-(~b)⨸(~d), 2)* elliptic_f(asin(sqrt((~b)*(~x))⨸(sqrt((~c))*rt(-(~b)⨸(~d), 2))), (~c)*(~f)⨸((~d)*(~e))) : nothing)) + +("1_1_1_3_44", +:(∫(1/(sqrt((~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~c), 0) && + gt((~e), 0) && + ( + pos(-(~b)/(~d)) || + neg(-(~b)/(~f)) + ) ? +2⨸((~b)*sqrt((~e)))*rt(-(~b)⨸(~d), 2)* elliptic_f(asin(sqrt((~b)*(~x))⨸(sqrt((~c))*rt(-(~b)⨸(~d), 2))), (~c)*(~f)⨸((~d)*(~e))) : nothing)) + +("1_1_1_3_45", +:(∫(1/(sqrt((~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + !( + gt((~c), 0) && + gt((~e), 0) + ) ? +sqrt(1 + (~d)*(~x)⨸(~c))*sqrt(1 + (~f)*(~x)⨸(~e))⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x)))* ∫(1⨸(sqrt((~b)*(~x))*sqrt(1 + (~d)*(~x)⨸(~c))*sqrt(1 + (~f)*(~x)⨸(~e))), (~x)) : nothing)) + +("1_1_1_3_46", +:(∫(1/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~d)/(~b), 0) && + gt((~f)/(~b), 0) && + le((~c), (~a)*(~d)/(~b)) && + le((~e), (~a)*(~f)/(~b)) ? +-2*sqrt((~d)⨸(~f))⨸((~d)*rt(-((~b)*(~e) - (~a)*(~f))⨸(~f), 2))* elliptic_f(asin(rt(-((~b)*(~e) - (~a)*(~f))⨸(~f), 2)⨸sqrt((~a) + (~b)*(~x))), (~f)*((~b)*(~c) - (~a)*(~d))⨸((~d)*((~b)*(~e) - (~a)*(~f)))) : nothing)) + +# (* Int[1/(Sqrt[a_+b_.*x_]*Sqrt[c_+d_.*x_]*Sqrt[e_+f_.*x_]),x_Symbol] := -2*Sqrt[c+d*x]*Sqrt[b*(e+f*x)/(f*(a+b*x))]/(d*Rt[-(b*e-a*f)/f,2]* Sqrt[e+f*x]*Sqrt[b*(c+d*x)/(d*(a+b*x))])* EllipticF[ArcSin[Rt[-(b*e-a*f)/f,2]/Sqrt[a+b*x]],f*(b*c-a*d)/(d*( b*e-a*f))] /; FreeQ[{a,b,c,d,e,f},x] && PosQ[-(b*e-a*f)/f] && (* (LtQ[-a/b,-c/d,-e/f] || GtQ[-a/b,-c/d,-e/f]) *) Not[SimplerQ[c+d*x,a+b*x] && (PosQ[(-d*e+c*f)/f] || PosQ[(b*e-a*f)/b])] && Not[SimplerQ[e+f*x,a+b*x] && (PosQ[(b*e-a*f)/b] || PosQ[(b*c-a*d)/b])] *) +("1_1_1_3_47", +:(∫(1/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt(((~b)*(~c) - (~a)*(~d))/(~b), 0) && + gt(((~b)*(~e) - (~a)*(~f))/(~b), 0) && + pos(-(~b)/(~d)) && + !( + simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) && + gt(((~d)*(~e) - (~c)*(~f))/(~d), 0) && + gt(-(~d)/(~b), 0) + ) && + !( + simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) && + gt((-(~b)*(~e) + (~a)*(~f))/(~f), 0) && + gt(-(~f)/(~b), 0) + ) && + !( + simpler((~e) + (~f)*(~x), (~a) + (~b)*(~x)) && + gt((-(~d)*(~e) + (~c)*(~f))/(~f), 0) && + gt((-(~b)*(~e) + (~a)*(~f))/(~f), 0) && + ( + pos(-(~f)/(~d)) || + pos(-(~f)/(~b)) + ) + ) ? +2*rt(-(~b)⨸(~d), 2)⨸((~b)*sqrt(((~b)*(~e) - (~a)*(~f))⨸(~b)))* elliptic_f(asin(sqrt((~a) + (~b)*(~x))⨸(rt(-(~b)⨸(~d), 2)*sqrt(((~b)*(~c) - (~a)*(~d))⨸(~b)))), (~f)*((~b)*(~c) - (~a)*(~d))⨸((~d)*((~b)*(~e) - (~a)*(~f)))) : nothing)) + +("1_1_1_3_48", +:(∫(1/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~b)/((~b)*(~c) - (~a)*(~d)), 0) && + gt((~b)/((~b)*(~e) - (~a)*(~f)), 0) && + simpler((~a) + (~b)*(~x), (~c) + (~d)*(~x)) && + simpler((~a) + (~b)*(~x), (~e) + (~f)*(~x)) && + ( + pos(-((~b)*(~c) - (~a)*(~d))/(~d)) || + neg(-((~b)*(~e) - (~a)*(~f))/(~f)) + ) ? +2*rt(-(~b)⨸(~d), 2)⨸((~b)*sqrt(((~b)*(~e) - (~a)*(~f))⨸(~b)))* elliptic_f(asin(sqrt((~a) + (~b)*(~x))⨸(rt(-(~b)⨸(~d), 2)*sqrt(((~b)*(~c) - (~a)*(~d))⨸(~b)))), (~f)*((~b)*(~c) - (~a)*(~d))⨸((~d)*((~b)*(~e) - (~a)*(~f)))) : nothing)) + +# (* && PosQ[-b/d] add to the end of previous rule *) +("1_1_1_3_49", +:(∫(1/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !(gt(((~b)*(~c) - (~a)*(~d))/(~b), 0)) && + simpler((~a) + (~b)*(~x), (~c) + (~d)*(~x)) && + simpler((~a) + (~b)*(~x), (~e) + (~f)*(~x)) ? +sqrt((~b)*((~c) + (~d)*(~x))⨸((~b)*(~c) - (~a)*(~d)))⨸sqrt((~c) + (~d)*(~x))* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~b)*(~c)⨸((~b)*(~c) - (~a)*(~d)) + (~b)*(~d)*(~x)⨸((~b)*(~c) - (~a)*(~d)))* sqrt((~e) + (~f)*(~x))), (~x)) : nothing)) + +("1_1_1_3_50", +:(∫(1/(sqrt((~a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))*sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !(gt(((~b)*(~e) - (~a)*(~f))/(~b), 0)) ? +sqrt((~b)*((~e) + (~f)*(~x))⨸((~b)*(~e) - (~a)*(~f)))⨸sqrt((~e) + (~f)*(~x))* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))* sqrt((~b)*(~e)⨸((~b)*(~e) - (~a)*(~f)) + (~b)*(~f)*(~x)⨸((~b)*(~e) - (~a)*(~f)))), (~x)) : nothing)) + +("1_1_1_3_51", +:(∫(1/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))^(1//3)*((~!e) + (~!f)*(~x))^(1//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq(2*(~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f), 0) ? +-log((~a) + (~b)*(~x))⨸(2*rt((~b)*((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))^2, 3)*((~b)*(~c) - (~a)*(~d))) - sqrt(3)* atan(1⨸sqrt(3) + 2*rt((~b)*((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))^2, 3)*((~c) + (~d)*(~x))^(2⨸3)⨸(sqrt(3)*((~e) + (~f)*(~x))^(1⨸3)))⨸(2* rt((~b)*((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))^2, 3)*((~b)*(~c) - (~a)*(~d))) + 3*log(rt((~b)*((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))^2, 3)*((~c) + (~d)*(~x))^(2⨸3) - ((~e) + (~f)*(~x))^(1⨸3))⨸(4*rt((~b)*((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))^2, 3)*((~b)*(~c) - (~a)*(~d))) : nothing)) + +("1_1_1_3_52", +:(∫(((~!a) + (~!b)*(~x))^(~m)/(((~!c) + (~!d)*(~x))^(1//3)*((~!e) + (~!f)*(~x))^(1//3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq(2*(~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f), 0) && + ilt((~m), -1) ? +(~b)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(2⨸ 3)*((~e) + (~f)*(~x))^(2⨸3)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + (~f)⨸(6*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~a)*(~d)*(3*(~m) + 1) - 3*(~b)*(~c)*(3*(~m) + 5) - 2*(~b)*(~d)*(3*(~m) + 7)*(~x))⨸(((~c) + (~d)*(~x))^(1⨸3)*((~e) + (~f)*(~x))^(1⨸3)), (~x)) : nothing)) + +# (* Int[(a_.+b_.*x_)^m_.*(c_.+d_.*x_)^n_.*(f_.*x_)^p_.,x_Symbol] := Simp[(a+b*x)^m*(c+d*x)^m/(a*c+b*d*x^2)^m]*Int[(a*c+b*d*x^2)^m*(f*x)^ p,x] /; FreeQ[{a,b,c,d,f,m,n,p},x] && EqQ[b*c+a*d,0] && EqQ[n,m] *) +("1_1_1_3_53", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~f), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~n), (~m)) && + gt((~a), 0) && + gt((~c), 0) ? +∫(((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m)*((~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_54", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~f), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~n), (~m)) ? +((~a) + (~b)*(~x))^ fracpart((~m))*((~c) + (~d)*(~x))^fracpart((~m))⨸((~a)*(~c) + (~b)*(~d)*(~x)^2)^fracpart((~m))* ∫(((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m)*((~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_55", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + ( + igt((~m), 0) || + ilt((~m), 0) && + ilt((~n), 0) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing)) + +("1_1_1_3_56", +:(∫(((~!e)*(~x))^(~p)*((~a) + (~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + isfraction((~p)) && + ext_isinteger((~m)) ? +ext_den((~p))⨸(~e)* int_and_subst((~x)^(ext_den((~p))*((~p) + 1) - 1)*((~a) + (~b)*(~x)^ext_den((~p))⨸(~e))^(~m)*((~c) + (~d)*(~x)^ext_den((~p))⨸(~e))^(~n), (~x), (~x), ((~e)*(~x))^(1⨸ext_den((~p))), "1_1_1_3_56") : nothing)) + +("1_1_1_3_57", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)/((~!e) + (~!f)*(~x))^2,(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~m) + (~n), 0) && + eq(2*(~b)*(~d)*(~e) - (~f)*((~b)*(~c) + (~a)*(~d)), 0) ? +(~b)*(~d)⨸(~f)^2*∫(((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^((~n) - 1), (~x)) + ((~b)*(~e) - (~a)*(~f))*((~d)*(~e) - (~c)*(~f))⨸(~f)^2* ∫(((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^((~n) - 1)⨸((~e) + (~f)*(~x))^2, (~x)) : nothing)) + +("1_1_1_3_58", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~m) + (~n) + (~p), 0) && + ilt((~p), 0) && + ( + lt((~m), 0) || + sumsimpler((~m), 1) || + !( + lt((~n), 0) || + sumsimpler((~n), 1) + ) + ) ? +(~f)^((~p) - 1)⨸(~d)^(~p)* ∫(((~a) + (~b)*(~x))^(~m)*((~d)*(~e)*(~p) - (~c)*(~f)*((~p) - 1) + (~d)*(~f)*(~x))⨸((~c) + (~d)*(~x))^((~m) + 1), (~x)) + (~f)^((~p) - 1)*∫(((~a) + (~b)*(~x))^(~m)*((~e) + (~f)*(~x))^(~p)⨸((~c) + (~d)*(~x))^((~m) + 1)* expand_to_sum( (~f)^(-(~p) + 1)*((~c) + (~d)*(~x))^(-(~p) + 1) - ((~d)*(~e)*(~p) - (~c)*(~f)*((~p) - 1) + (~d)*(~f)*(~x))⨸((~d)^(~p)*((~e) + (~f)*(~x))^(~p)), (~x)), (~x)) : nothing)) + +("1_1_1_3_59", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~m) + (~n) + (~p) + 1, 0) && + ilt((~p), 0) && + ( + gt((~m), 0) || + sumsimpler((~m), -1) || + !( + gt((~n), 0) || + sumsimpler((~n), -1) + ) + ) ? +(~b)*(~d)^((~m) + (~n))*(~f)^(~p)*∫(((~a) + (~b)*(~x))^((~m) - 1)⨸((~c) + (~d)*(~x))^(~m), (~x)) + ∫(((~a) + (~b)*(~x))^((~m) - 1)*((~e) + (~f)*(~x))^(~p)⨸((~c) + (~d)*(~x))^(~m)* expand_to_sum(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))^(-(~p) - 1) - ((~b)*(~d)^(-(~p) - 1)* (~f)^(~p))⨸((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing)) + +("1_1_1_3_60", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + eq((~m) + (~n) + (~p) + 2, 0) && + ilt((~n), 0) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~p), 1)) + ) && + !(ilt((~m), 0)) ? +((~b)*(~c) - (~a)*(~d))^ (~n)*((~a) + (~b)*(~x))^((~m) + 1)⨸(((~m) + 1)*((~b)*(~e) - (~a)*(~f))^((~n) + 1)*((~e) + (~f)*(~x))^((~m) + 1))* hypergeometric2f1((~m) + 1, -(~n), (~m) + 2, -((~d)*(~e) - (~c)*(~f))*((~a) + (~b)*(~x))⨸(((~b)*(~c) - (~a)*(~d))*((~e) + (~f)*(~x)))) : nothing)) + +("1_1_1_3_61", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + eq((~m) + (~n) + (~p) + 2, 0) && + !(ext_isinteger((~n))) ? +((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~b)*(~e) - (~a)*(~f))*((~m) + 1))*(((~b)*(~e) - (~a)*(~f))*((~c) + (~d)*(~x))⨸(((~b)*(~c) - (~a)*(~d))*((~e) + (~f)*(~x))))^(-(~n))* hypergeometric2f1((~m) + 1, -(~n), (~m) + 2, -((~d)*(~e) - (~c)*(~f))*((~a) + (~b)*(~x))⨸(((~b)*(~c) - (~a)*(~d))*((~e) + (~f)*(~x)))) : nothing)) + +("1_1_1_3_62", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)/((~!e) + (~!f)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~m) + (~n) + 1, 0) && + ( + lt((~m), 0) || + sumsimpler((~m), 1) || + !( + lt((~n), 0) || + sumsimpler((~n), 1) + ) + ) ? +((~c)*(~f) - (~d)*(~e))^((~m) + (~n) + 1)⨸(~f)^((~m) + (~n) + 1)* ∫(((~a) + (~b)*(~x))^(~m)⨸(((~c) + (~d)*(~x))^((~m) + 1)*((~e) + (~f)*(~x))), (~x)) + 1⨸(~f)^((~m) + (~n) + 1)* ∫(((~a) + (~b)*(~x))^(~m)⨸((~c) + (~d)*(~x))^((~m) + 1)* expand_to_sum(((~f)^((~m) + (~n) + 1)*((~c) + (~d)*(~x))^((~m) + (~n) + 1) - ((~c)*(~f) - (~d)*(~e))^((~m) + (~n) + 1))⨸((~e) + (~f)*(~x)), (~x)), (~x)) : nothing)) + +("1_1_1_3_63", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + ilt((~m) + (~n) + (~p) + 2, 0) && + !eq((~m), -1) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) && + !(sumsimpler((~p), 1)) + ) ? +(~b)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)*(~d)*(~f)*((~m) + 1) - (~b)*((~d)*(~e)*((~m) + (~n) + 2) + (~c)*(~f)*((~m) + (~p) + 2)) - (~b)*(~d)*(~f)*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_3_64", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~f), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + igt((~m) - (~n), 0) && + !eq((~m) + (~n) + (~p) + 2, 0) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~n)*((~c) + (~d)*(~x))^(~n)*((~f)*(~x))^ (~p), ((~a) + (~b)*(~x))^((~m) - (~n)), (~x)), (~x)) : nothing)) + +("1_1_1_3_65", +:(∫(((~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n)*((~e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~c), 0) && + ( + ext_isinteger((~p)) || + gt((~e), 0) + ) ? +(~c)^(~n)*(~e)^(~p)*((~b)*(~x))^((~m) + 1)⨸((~b)*((~m) + 1))* appell_f1((~m) + 1, -(~n), -(~p), (~m) + 2, -(~d)*(~x)⨸(~c), -(~f)*(~x)⨸(~e)) : nothing)) + +("1_1_1_3_66", +:(∫(((~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n)*((~e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt(-(~d)/((~b)*(~c)), 0) && + ( + ext_isinteger((~p)) || + gt((~d)/((~d)*(~e) - (~c)*(~f)), 0) + ) ? +((~c) + (~d)*(~x))^((~n) + 1)⨸((~d)*((~n) + 1)*(-(~d)⨸((~b)*(~c)))^(~m)*((~d)⨸((~d)*(~e) - (~c)*(~f)))^(~p))* appell_f1((~n) + 1, -(~m), -(~p), (~n) + 2, 1 + (~d)*(~x)⨸(~c), -(~f)*((~c) + (~d)*(~x))⨸((~d)*(~e) - (~c)*(~f))) : nothing)) + +("1_1_1_3_67", +:(∫(((~!b)*(~x))^(~m)*((~c) + (~!d)*(~x))^(~n)*((~e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + !(gt((~c), 0)) ? +(~c)^intpart((~n))*((~c) + (~d)*(~x))^fracpart((~n))⨸(1 + (~d)*(~x)⨸(~c))^fracpart((~n))* ∫(((~b)*(~x))^(~m)*(1 + (~d)*(~x)⨸(~c))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_68", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + ext_isinteger((~p)) && + gt((~b)/((~b)*(~c) - (~a)*(~d)), 0) && + !( + gt((~d)/((~d)*(~a) - (~c)*(~b)), 0) && + simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) + ) ? +((~b)*(~e) - (~a)*(~f))^ (~p)*((~a) + (~b)*(~x))^((~m) + 1)⨸((~b)^((~p) + 1)*((~m) + 1)*((~b)⨸((~b)*(~c) - (~a)*(~d)))^(~n))* appell_f1((~m) + 1, -(~n), -(~p), (~m) + 2, -(~d)*((~a) + (~b)*(~x))⨸((~b)*(~c) - (~a)*(~d)), -(~f)*((~a) + (~b)*(~x))⨸((~b)*(~e) - (~a)*(~f))) : nothing)) + +("1_1_1_3_69", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + ext_isinteger((~p)) && + !(gt((~b)/((~b)*(~c) - (~a)*(~d)), 0)) && + !(simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x))) ? +((~c) + (~d)*(~x))^ fracpart( (~n))⨸(((~b)⨸((~b)*(~c) - (~a)*(~d)))^intpart((~n))*((~b)*((~c) + (~d)*(~x))⨸((~b)*(~c) - (~a)*(~d)))^ fracpart((~n)))* ∫(((~a) + (~b)*(~x))^(~m)*((~b)*(~c)⨸((~b)*(~c) - (~a)*(~d)) + (~b)*(~d)*(~x)⨸((~b)*(~c) - (~a)*(~d)))^ (~n)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_70", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~p))) && + gt((~b)/((~b)*(~c) - (~a)*(~d)), 0) && + gt((~b)/((~b)*(~e) - (~a)*(~f)), 0) && + !( + gt((~d)/((~d)*(~a) - (~c)*(~b)), 0) && + gt((~d)/((~d)*(~e) - (~c)*(~f)), 0) && + simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) + ) && + !( + gt((~f)/((~f)*(~a) - (~e)*(~b)), 0) && + gt((~f)/((~f)*(~c) - (~e)*(~d)), 0) && + simpler((~e) + (~f)*(~x), (~a) + (~b)*(~x)) + ) ? +((~a) + (~b)*(~x))^((~m) + 1)⨸((~b)*((~m) + 1)*((~b)⨸((~b)*(~c) - (~a)*(~d)))^(~n)*((~b)⨸((~b)*(~e) - (~a)*(~f)))^(~p))* appell_f1((~m) + 1, -(~n), -(~p), (~m) + 2, -(~d)*((~a) + (~b)*(~x))⨸((~b)*(~c) - (~a)*(~d)), -(~f)*((~a) + (~b)*(~x))⨸((~b)*(~e) - (~a)*(~f))) : nothing)) + +("1_1_1_3_71", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~p))) && + gt((~b)/((~b)*(~c) - (~a)*(~d)), 0) && + !(gt((~b)/((~b)*(~e) - (~a)*(~f)), 0)) ? +((~e) + (~f)*(~x))^ fracpart( (~p))⨸(((~b)⨸((~b)*(~e) - (~a)*(~f)))^intpart((~p))*((~b)*((~e) + (~f)*(~x))⨸((~b)*(~e) - (~a)*(~f)))^ fracpart((~p)))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^ (~n)*((~b)*(~e)⨸((~b)*(~e) - (~a)*(~f)) + (~b)*(~f)*(~x)⨸((~b)*(~e) - (~a)*(~f)))^(~p), (~x)) : nothing)) + +("1_1_1_3_72", +:(∫(((~a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~p))) && + !(gt((~b)/((~b)*(~c) - (~a)*(~d)), 0)) && + !(simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x))) && + !(simpler((~e) + (~f)*(~x), (~a) + (~b)*(~x))) ? +((~c) + (~d)*(~x))^ fracpart( (~n))⨸(((~b)⨸((~b)*(~c) - (~a)*(~d)))^intpart((~n))*((~b)*((~c) + (~d)*(~x))⨸((~b)*(~c) - (~a)*(~d)))^ fracpart((~n)))* ∫(((~a) + (~b)*(~x))^(~m)*((~b)*(~c)⨸((~b)*(~c) - (~a)*(~d)) + (~b)*(~d)*(~x)⨸((~b)*(~c) - (~a)*(~d)))^ (~n)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_3_73", +:(∫(((~!a) + (~!b)*(~u))^(~!m)*((~!c) + (~!d)*(~u))^(~!n)*((~e) + (~!f)*(~u))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸Symbolics.coeff((~u), (~x) ^ 1)* int_and_subst(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x), (~x), (~u), "1_1_1_3_73") : nothing)) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.4 (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.4 (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl new file mode 100644 index 0000000..f93fe49 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.4 (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl @@ -0,0 +1,358 @@ +file_rules = [ +# (* ::Subsection::Closed:: *) +# (* 1.1.1.4 (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q *) +("1_1_1_4_1", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^ (~!n)*((~e) + (~!f)*(~x))*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + ( + igt((~m), 0) || + ext_isinteger((~m), (~n)) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))*((~g) + (~h)*(~x)), (~x)), (~x)) : nothing)) + +("1_1_1_4_2", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~e) + (~!f)*(~x))*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~m) + (~n) + 2, 0) && + !eq((~m), -1) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) + ) ? +((~b)^2*(~d)*(~e)*(~g) - (~a)^2*(~d)*(~f)*(~h)*(~m) - (~a)*(~b)*((~d)*((~f)*(~g) + (~e)*(~h)) - (~c)*(~f)*(~h)*((~m) + 1)) + (~b)*(~f)*(~h)*((~b)*(~c) - (~a)*(~d))*((~m) + 1)*(~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸ ((~b)^2*(~d)*((~b)*(~c) - (~a)*(~d))*((~m) + 1)) + ((~a)*(~d)*(~f)*(~h)*(~m) + (~b)*((~d)*((~f)*(~g) + (~e)*(~h)) - (~c)*(~f)*(~h)*((~m) + 2)))⨸((~b)^2*(~d))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_4_3", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~e) + (~!f)*(~x))*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + lt((~m), -1) && + lt((~n), -1) ? +((~b)^2*(~c)*(~d)*(~e)*(~g)*((~n) + 1) + (~a)^2*(~c)*(~d)*(~f)*(~h)*((~n) + 1) + (~a)*(~b)*((~d)^2*(~e)*(~g)*((~m) + 1) + (~c)^2*(~f)*(~h)*((~m) + 1) - (~c)*(~d)*((~f)*(~g) + (~e)*(~h))*((~m) + (~n) + 2)) + ((~a)^2*(~d)^2*(~f)*(~h)*((~n) + 1) - (~a)*(~b)*(~d)^2*((~f)*(~g) + (~e)*(~h))*((~n) + 1) + (~b)^2*((~c)^2*(~f)*(~h)*((~m) + 1) - (~c)*(~d)*((~f)*(~g) + (~e)*(~h))*((~m) + 1) + (~d)^2*(~e)*(~g)*((~m) + (~n) + 2)))*(~x))⨸ ((~b)*(~d)*((~b)*(~c) - (~a)*(~d))^2*((~m) + 1)*((~n) + 1))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1) - ((~a)^2*(~d)^2*(~f)*(~h)*(2 + 3*(~n) + (~n)^2) + (~a)*(~b)*(~d)*((~n) + 1)*(2*(~c)*(~f)*(~h)*((~m) + 1) - (~d)*((~f)*(~g) + (~e)*(~h))*((~m) + (~n) + 3)) + (~b)^2*((~c)^2*(~f)*(~h)*(2 + 3*(~m) + (~m)^2) - (~c)*(~d)*((~f)*(~g) + (~e)*(~h))*((~m) + 1)*((~m) + (~n) + 3) + (~d)^2*(~e)*(~g)*(6 + (~m)^2 + 5*(~n) + (~n)^2 + (~m)*(2*(~n) + 5))))⨸ ((~b)*(~d)*((~b)*(~c) - (~a)*(~d))^2*((~m) + 1)*((~n) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1), (~x)) : nothing)) + +("1_1_1_4_4", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~e) + (~!f)*(~x))*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + ( + lt((~m), -2) || + eq((~m) + (~n) + 3, 0) && + !(lt((~n), -2)) + ) ? +((~b)^3*(~c)*(~e)*(~g)*((~m) + 2) - (~a)^3*(~d)*(~f)*(~h)*((~n) + 2) - (~a)^2*(~b)*((~c)*(~f)*(~h)*(~m) - (~d)*((~f)*(~g) + (~e)*(~h))*((~m) + (~n) + 3)) - (~a)*(~b)^2*((~c)*((~f)*(~g) + (~e)*(~h)) + (~d)*(~e)*(~g)*(2*(~m) + (~n) + 4)) + (~b)*((~a)^2*(~d)*(~f)*(~h)*((~m) - (~n)) - (~a)*(~b)*(2*(~c)*(~f)*(~h)*((~m) + 1) - (~d)*((~f)*(~g) + (~e)*(~h))*((~n) + 1)) + (~b)^2*((~c)*((~f)*(~g) + (~e)*(~h))*((~m) + 1) - (~d)*(~e)*(~g)*((~m) + (~n) + 2)))*(~x))⨸ ((~b)^2*((~b)*(~c) - (~a)*(~d))^2*((~m) + 1)*((~m) + 2))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1) + ((~f)*(~h)⨸ (~b)^2 - ((~d)*((~m) + (~n) + 3)*((~a)^2*(~d)*(~f)*(~h)*((~m) - (~n)) - (~a)*(~b)*(2*(~c)*(~f)*(~h)*((~m) + 1) - (~d)*((~f)*(~g) + (~e)*(~h))*((~n) + 1)) + (~b)^2*((~c)*((~f)*(~g) + (~e)*(~h))*((~m) + 1) - (~d)*(~e)*(~g)*((~m) + (~n) + 2))))⨸ ((~b)^2*((~b)*(~c) - (~a)*(~d))^2*((~m) + 1)*((~m) + 2)))* ∫(((~a) + (~b)*(~x))^((~m) + 2)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_4_5", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~e) + (~!f)*(~x))*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + ( + ge((~m), -2) && + lt((~m), -1) || + sumsimpler((~m), 1) + ) && + !eq((~m), -1) && + !eq((~m) + (~n) + 3, 0) ? +((~a)^2*(~d)*(~f)*(~h)*((~n) + 2) + (~b)^2*(~d)*(~e)*(~g)*((~m) + (~n) + 3) + (~a)*(~b)*((~c)*(~f)*(~h)*((~m) + 1) - (~d)*((~f)*(~g) + (~e)*(~h))*((~m) + (~n) + 3)) + (~b)*(~f)*(~h)*((~b)*(~c) - (~a)*(~d))*((~m) + 1)*(~x))⨸ ((~b)^2*(~d)*((~b)*(~c) - (~a)*(~d))*((~m) + 1)*((~m) + (~n) + 3))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1) - ((~a)^2*(~d)^2*(~f)*(~h)*((~n) + 1)*((~n) + 2) + (~a)*(~b)*(~d)*((~n) + 1)*(2*(~c)*(~f)*(~h)*((~m) + 1) - (~d)*((~f)*(~g) + (~e)*(~h))*((~m) + (~n) + 3)) + (~b)^2*((~c)^2*(~f)*(~h)*((~m) + 1)*((~m) + 2) - (~c)*(~d)*((~f)*(~g) + (~e)*(~h))*((~m) + 1)*((~m) + (~n) + 3) + (~d)^2*(~e)*(~g)*((~m) + (~n) + 2)*((~m) + (~n) + 3)))⨸ ((~b)^2*(~d)*((~b)*(~c) - (~a)*(~d))*((~m) + 1)*((~m) + (~n) + 3))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_4_6", +:(∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^ (~!n)*((~e) + (~!f)*(~x))*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + !eq((~m) + (~n) + 2, 0) && + !eq((~m) + (~n) + 3, 0) ? +-((~a)*(~d)*(~f)*(~h)*((~n) + 2) + (~b)*(~c)*(~f)*(~h)*((~m) + 2) - (~b)*(~d)*((~f)*(~g) + (~e)*(~h))*((~m) + (~n) + 3) - (~b)*(~d)*(~f)*(~h)*((~m) + (~n) + 2)*(~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸ ((~b)^2*(~d)^2*((~m) + (~n) + 2)*((~m) + (~n) + 3)) + ((~a)^2*(~d)^2*(~f)*(~h)*((~n) + 1)*((~n) + 2) + (~a)*(~b)*(~d)*((~n) + 1)*(2*(~c)*(~f)*(~h)*((~m) + 1) - (~d)*((~f)*(~g) + (~e)*(~h))*((~m) + (~n) + 3)) + (~b)^2*((~c)^2*(~f)*(~h)*((~m) + 1)*((~m) + 2) - (~c)*(~d)*((~f)*(~g) + (~e)*(~h))*((~m) + 1)*((~m) + (~n) + 3) + (~d)^2*(~e)*(~g)*((~m) + (~n) + 2)*((~m) + (~n) + 3)))⨸ ((~b)^2*(~d)^2*((~m) + (~n) + 2)*((~m) + (~n) + 3))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n), (~x)) : nothing)) + +("1_1_1_4_7", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + ( + ext_isinteger((~m), (~n), (~p)) || + igt((~n), 0) && + igt((~p), 0) + ) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x)), (~x)), (~x)) : nothing)) + +("1_1_1_4_8", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~x)) && + ilt((~m), -1) && + gt((~n), 0) ? +((~b)*(~g) - (~a)*(~h))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~b)*((~b)*(~e) - (~a)*(~f))*((~m) + 1)) - 1⨸((~b)*((~b)*(~e) - (~a)*(~f))*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1)*((~e) + (~f)*(~x))^(~p)* simplify((~b)*(~c)*((~f)*(~g) - (~e)*(~h))*((~m) + 1) + ((~b)*(~g) - (~a)*(~h))*((~d)*(~e)*(~n) + (~c)*(~f)*((~p) + 1)) + (~d)*((~b)*((~f)*(~g) - (~e)*(~h))*((~m) + 1) + (~f)*((~b)*(~g) - (~a)*(~h))*((~n) + (~p) + 1))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_4_9", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~x)) && + lt((~m), -1) && + gt((~n), 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +((~b)*(~g) - (~a)*(~h))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~b)*((~b)*(~e) - (~a)*(~f))*((~m) + 1)) - 1⨸((~b)*((~b)*(~e) - (~a)*(~f))*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1)*((~e) + (~f)*(~x))^(~p)* simplify((~b)*(~c)*((~f)*(~g) - (~e)*(~h))*((~m) + 1) + ((~b)*(~g) - (~a)*(~h))*((~d)*(~e)*(~n) + (~c)*(~f)*((~p) + 1)) + (~d)*((~b)*((~f)*(~g) - (~e)*(~h))*((~m) + 1) + (~f)*((~b)*(~g) - (~a)*(~h))*((~n) + (~p) + 1))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_4_10", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~p), (~x)) && + ilt((~m), -1) ? +((~b)*(~g) - (~a)*(~h))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify(((~a)*(~d)*(~f)*(~g) - (~b)*((~d)*(~e) + (~c)*(~f))*(~g) + (~b)*(~c)*(~e)*(~h))*((~m) + 1) - ((~b)*(~g) - (~a)*(~h))*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)) - (~d)*(~f)*((~b)*(~g) - (~a)*(~h))*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_4_11", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~p), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +((~b)*(~g) - (~a)*(~h))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify(((~a)*(~d)*(~f)*(~g) - (~b)*((~d)*(~e) + (~c)*(~f))*(~g) + (~b)*(~c)*(~e)*(~h))*((~m) + 1) - ((~b)*(~g) - (~a)*(~h))*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)) - (~d)*(~f)*((~b)*(~g) - (~a)*(~h))*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_4_12", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~p), (~x)) && + gt((~m), 0) && + !eq((~m) + (~n) + (~p) + 2, 0) && + ext_isinteger((~m)) ? +(~h)*((~a) + (~b)*(~x))^ (~m)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)*(~f)*((~m) + (~n) + (~p) + 2)) + 1⨸((~d)*(~f)*((~m) + (~n) + (~p) + 2))* ∫(((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)*(~d)*(~f)*(~g)*((~m) + (~n) + (~p) + 2) - (~h)*((~b)*(~c)*(~e)*(~m) + (~a)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1))) + ((~b)*(~d)*(~f)*(~g)*((~m) + (~n) + (~p) + 2) + (~h)*((~a)*(~d)*(~f)*(~m) - (~b)*((~d)*(~e)*((~m) + (~n) + 1) + (~c)*(~f)*((~m) + (~p) + 1))))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_4_13", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~p), (~x)) && + gt((~m), 0) && + !eq((~m) + (~n) + (~p) + 2, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~h)*((~a) + (~b)*(~x))^ (~m)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)*(~f)*((~m) + (~n) + (~p) + 2)) + 1⨸((~d)*(~f)*((~m) + (~n) + (~p) + 2))* ∫(((~a) + (~b)*(~x))^((~m) - 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify((~a)*(~d)*(~f)*(~g)*((~m) + (~n) + (~p) + 2) - (~h)*((~b)*(~c)*(~e)*(~m) + (~a)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1))) + ((~b)*(~d)*(~f)*(~g)*((~m) + (~n) + (~p) + 2) + (~h)*((~a)*(~d)*(~f)*(~m) - (~b)*((~d)*(~e)*((~m) + (~n) + 1) + (~c)*(~f)*((~m) + (~p) + 1))))*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_4_14", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~p), (~x)) && + ilt((~m) + (~n) + (~p) + 2, 0) && + !eq((~m), -1) && + ( + sumsimpler((~m), 1) || + !( + !eq((~n), -1) && + sumsimpler((~n), 1) + ) && + !( + !eq((~p), -1) && + sumsimpler((~p), 1) + ) + ) ? +((~b)*(~g) - (~a)*(~h))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* simplify(((~a)*(~d)*(~f)*(~g) - (~b)*((~d)*(~e) + (~c)*(~f))*(~g) + (~b)*(~c)*(~e)*(~h))*((~m) + 1) - ((~b)*(~g) - (~a)*(~h))*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1)) - (~d)*(~f)*((~b)*(~g) - (~a)*(~h))*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_4_15", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!g) + (~!h)*(~x))/((~!e) + (~!f)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + igt((~m) + (~n) + 1, 0) && + ( + lt((~m), 0) || + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) + ) ? +((~f)*(~g) - (~e)*(~h))*((~c)*(~f) - (~d)*(~e))^((~m) + (~n) + 1)⨸(~f)^((~m) + (~n) + 2)* ∫(((~a) + (~b)*(~x))^(~m)⨸(((~c) + (~d)*(~x))^((~m) + 1)*((~e) + (~f)*(~x))), (~x)) + 1⨸(~f)^((~m) + (~n) + 2)*∫(((~a) + (~b)*(~x))^(~m)⨸((~c) + (~d)*(~x))^((~m) + 1)* expand_to_sum(((~f)^((~m) + (~n) + 2)*((~c) + (~d)*(~x))^((~m) + (~n) + 1)*((~g) + (~h)*(~x)) - ((~f)*(~g) - (~e)*(~h))*((~c)*(~f) - (~d)*(~e))^((~m) + (~n) + 1))⨸((~e) + (~f)*(~x)), (~x)), (~x)) : nothing)) + +("1_1_1_4_16", +:(∫(((~!e) + (~!f)*(~x))^(~p)*((~!g) + (~!h)*(~x))/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +((~b)*(~g) - (~a)*(~h))⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^(~p)⨸((~a) + (~b)*(~x)), (~x)) - ((~d)*(~g) - (~c)*(~h))⨸((~b)*(~c) - (~a)*(~d))*∫(((~e) + (~f)*(~x))^(~p)⨸((~c) + (~d)*(~x)), (~x)) : nothing)) + +("1_1_1_4_17", +:(∫(((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~p)*((~!g) + (~!h)*(~x))/((~!a) + (~!b)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~p), (~x)) ? +(~h)⨸(~b)*∫(((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)) + ((~b)*(~g) - (~a)*(~h))⨸(~b)* ∫(((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)⨸((~a) + (~b)*(~x)), (~x)) : nothing)) + +("1_1_1_4_18", +:(∫(((~!g) + (~!h)*(~x))/(sqrt((~!a) + (~!b)*(~x))*sqrt((~c) + (~!d)*(~x))* sqrt((~e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + simpler((~a) + (~b)*(~x), (~e) + (~f)*(~x)) && + simpler((~c) + (~d)*(~x), (~e) + (~f)*(~x)) ? +(~h)⨸(~f)*∫(sqrt((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))), (~x)) + ((~f)*(~g) - (~e)*(~h))⨸(~f)* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))), (~x)) : nothing)) + +("1_1_1_4_19", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~x)) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) && + !(sumsimpler((~p), 1)) + ) ? +(~h)⨸(~b)*∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)) + ((~b)*(~g) - (~a)*(~h))⨸(~b)*∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_4_20", +:(∫(((~!a) + (~!b)*(~x))^(~m)*sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~b)*((~m) + 1)) - 1⨸(2*(~b)*((~m) + 1))* ∫(((~a) + (~b)*(~x))^((~m) + 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x)))* simplify((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h) + 2*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h))*(~x) + 3*(~d)*(~f)*(~h)*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_21", +:(∫(((~!a) + (~!b)*(~x))^(~m)*sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + ext_isinteger(2*(~m)) && + !(lt((~m), -1)) ? +2*((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~b)*(2*(~m) + 5)) + 1⨸((~b)*(2*(~m) + 5))* ∫((((~a) + (~b)*(~x))^(~m))⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x)))* simplify(3*(~b)*(~c)*(~e)*(~g) - (~a)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) + 2*((~b)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) - (~a)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)))* (~x) - (3*(~a)*(~d)*(~f)*(~h) - (~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)))*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_22", +:(∫(((~!a) + (~!b)*(~x))^(~m)*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))/sqrt((~!c) + (~!d)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + ext_isinteger(2*(~m)) && + gt((~m), 0) ? +2*((~a) + (~b)*(~x))^(~m)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~d)*(2*(~m) + 3)) - 1⨸((~d)*(2*(~m) + 3))* ∫((((~a) + (~b)*(~x))^((~m) - 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simplify(2*(~b)*(~c)*(~e)*(~g)*(~m) + (~a)*((~c)*((~f)*(~g) + (~e)*(~h)) - 2*(~d)*(~e)*(~g)*((~m) + 1)) - ((~b)*(2*(~d)*(~e)*(~g) - (~c)*((~f)*(~g) + (~e)*(~h))*(2*(~m) + 1)) - (~a)*(2*(~c)*(~f)*(~h) - (~d)*(2*(~m) + 1)*((~f)*(~g) + (~e)*(~h))))*(~x) - (2*(~a)*(~d)*(~f)*(~h)*(~m) + (~b)*((~d)*((~f)*(~g) + (~e)*(~h)) - 2*(~c)*(~f)*(~h)*((~m) + 1)))*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_23", +:(∫(sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))/(((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))⨸(~b)^2* ∫(1⨸(((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + 1⨸(~b)^2* ∫(simplify((~b)*(~f)*(~g) + (~b)*(~e)*(~h) - (~a)*(~f)*(~h) + (~b)*(~f)*(~h)*(~x), (~x))⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) : nothing)) + +("1_1_1_4_24", +:(∫(((~!a) + (~!b)*(~x))^(~m)*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))/sqrt((~!c) + (~!d)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))) - 1⨸(2*((~m) + 1)*((~b)*(~c) - (~a)*(~d)))* ∫((((~a) + (~b)*(~x))^((~m) + 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simplify((~c)*((~f)*(~g) + (~e)*(~h)) + (~d)*(~e)*(~g)*(2*(~m) + 3) + 2*((~c)*(~f)*(~h) + (~d)*((~m) + 2)*((~f)*(~g) + (~e)*(~h)))*(~x) + (~d)*(~f)*(~h)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_25", +:(∫(sqrt( (~!a) + (~!b)*(~x))/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +2*((~a) + (~b)*(~x))*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((~c) + (~d)*(~x))* sqrt((~e) + (~f)*(~x)))* int_and_subst(1⨸(((~h) - (~b)*(~x)^2)*sqrt(1 + ((~b)*(~c) - (~a)*(~d))*(~x)^2⨸((~d)*(~g) - (~c)*(~h)))* sqrt(1 + ((~b)*(~e) - (~a)*(~f))*(~x)^2⨸((~f)*(~g) - (~e)*(~h)))), (~x), (~x), sqrt((~g) + (~h)*(~x))⨸sqrt((~a) + (~b)*(~x)), "1_1_1_4_25") : nothing)) + +("1_1_1_4_26", +:(∫(((~!a) + (~!b)*(~x))^(3//2)/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +(~b)⨸(~d)*∫(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))⨸(sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(sqrt((~a) + (~b)*(~x))⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) : nothing)) + +("1_1_1_4_27", +:(∫(((~!a) + (~!b)*(~x))^ (~m)/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + ext_isinteger(2*(~m)) && + ge((~m), 2) ? +2*(~b)^2*((~a) + (~b)*(~x))^((~m) - 2)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~d)*(~f)*(~h)*(2*(~m) - 1)) - 1⨸((~d)*(~f)*(~h)*(2*(~m) - 1))* ∫((((~a) + (~b)*(~x))^((~m) - 3)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simplify((~a)*(~b)^2*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) + 2*(~b)^3*(~c)*(~e)*(~g)*((~m) - 2) - (~a)^3*(~d)*(~f)*(~h)*(2*(~m) - 1) + (~b)*(2*(~a)*(~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) + (~b)^2*(2*(~m) - 3)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) - 3*(~a)^2*(~d)*(~f)*(~h)*(2*(~m) - 1))*(~x) - 2*(~b)^2*((~m) - 1)*(3*(~a)*(~d)*(~f)*(~h) - (~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)))*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_28", +:(∫(1/(((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + gt(((~d)*(~e) - (~c)*(~f))/(~d), 0) ? +-2*int_and_subst(1⨸(simplify((~b)*(~c) - (~a)*(~d) - (~b)*(~x)^2, (~x))* sqrt(simplify(((~d)*(~e) - (~c)*(~f))⨸(~d) + (~f)*(~x)^2⨸(~d), (~x)))* sqrt(simplify(((~d)*(~g) - (~c)*(~h))⨸(~d) + (~h)*(~x)^2⨸(~d), (~x)))), (~x), (~x), sqrt((~c) + (~d)*(~x)), "1_1_1_4_28") : nothing)) + +("1_1_1_4_29", +:(∫(1/(((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + !(simpler((~e) + (~f)*(~x), (~c) + (~d)*(~x))) && + !(simpler((~g) + (~h)*(~x), (~c) + (~d)*(~x))) ? +-2*int_and_subst(1⨸(simplify((~b)*(~c) - (~a)*(~d) - (~b)*(~x)^2, (~x))* sqrt(simplify(((~d)*(~e) - (~c)*(~f))⨸(~d) + (~f)*(~x)^2⨸(~d), (~x)))* sqrt(simplify(((~d)*(~g) - (~c)*(~h))⨸(~d) + (~h)*(~x)^2⨸(~d), (~x)))), (~x), (~x), sqrt((~c) + (~d)*(~x)), "1_1_1_4_29") : nothing)) + +# (* Int[1/(Sqrt[a_.+b_.*x_]*Sqrt[c_.+d_.*x_]*Sqrt[e_.+f_.*x_]*Sqrt[g_.+ h_.*x_]),x_Symbol] := -2*(a+b*x)*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))]/ ((b*g-a*h)*Sqrt[c+d*x]*Sqrt[e+f*x])* Subst[Int[1/(Sqrt[1+(b*c-a*d)*x^2/(d*g-c*h)]*Sqrt[1+(b*e-a*f)*x^2/ (f*g-e*h)]),x],x,Sqrt[g+h*x]/Sqrt[a+b*x]] /; FreeQ[{a,b,c,d,e,f,g,h},x] *) +("1_1_1_4_30", +:(∫(1/(sqrt((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +2*sqrt((~g) + (~h)*(~x))*sqrt(((~b)*(~e) - (~a)*(~f))*((~c) + (~d)*(~x))⨸(((~d)*(~e) - (~c)*(~f))*((~a) + (~b)*(~x))))⨸ (((~f)*(~g) - (~e)*(~h))*sqrt((~c) + (~d)*(~x))* sqrt(-((~b)*(~e) - (~a)*(~f))*((~g) + (~h)*(~x))⨸(((~f)*(~g) - (~e)*(~h))*((~a) + (~b)*(~x)))))* int_and_subst(1⨸(sqrt(1 + ((~b)*(~c) - (~a)*(~d))*(~x)^2⨸((~d)*(~e) - (~c)*(~f)))* sqrt(1 - ((~b)*(~g) - (~a)*(~h))*(~x)^2⨸((~f)*(~g) - (~e)*(~h)))), (~x), (~x), sqrt((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*(~x)), "1_1_1_4_30") : nothing)) + +("1_1_1_4_31", +:(∫(1/(((~!a) + (~!b)*(~x))^(3//2)*sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +-(~d)⨸((~b)*(~c) - (~a)*(~d))* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + (~b)⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt((~c) + (~d)*(~x))⨸(((~a) + (~b)*(~x))^(3⨸2)*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) : nothing)) + +("1_1_1_4_32", +:(∫(((~!a) + (~!b)*(~x))^ (~m)/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + ext_isinteger(2*(~m)) && + le((~m), -2) ? +(~b)^2*((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))) - 1⨸(2*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h)))* ∫((((~a) + (~b)*(~x))^((~m) + 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simplify(2*(~a)^2*(~d)*(~f)*(~h)*((~m) + 1) - 2*(~a)*(~b)*((~m) + 1)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) + (~b)^2*(2*(~m) + 3)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) - 2*(~b)*((~a)*(~d)*(~f)*(~h)*((~m) + 1) - (~b)*((~m) + 2)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)))*(~x) + (~d)*(~f)*(~h)*(2*(~m) + 5)*(~b)^2*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_33", +:(∫(sqrt((~!a) + (~!b)*(~x))* sqrt((~!c) + (~!d)*(~x))/(sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~g) + (~h)*(~x))⨸((~h)*sqrt((~e) + (~f)*(~x))) + ((~d)*(~e) - (~c)*(~f))*((~b)*(~f)*(~g) + (~b)*(~e)*(~h) - 2*(~a)*(~f)*(~h))⨸(2*(~f)^2*(~h))* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + ((~a)*(~d)*(~f)*(~h) - (~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) - (~c)*(~f)*(~h)))⨸(2*(~f)^2*(~h))* ∫(sqrt((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) - ((~d)*(~e) - (~c)*(~f))*((~f)*(~g) - (~e)*(~h))⨸(2*(~f)*(~h))* ∫(sqrt((~a) + (~b)*(~x))⨸(sqrt((~c) + (~d)*(~x))*((~e) + (~f)*(~x))^(3⨸2)*sqrt((~g) + (~h)*(~x))), (~x)) : nothing)) + +("1_1_1_4_34", +:(∫(((~!a) + (~!b)*(~x))^(~m)* sqrt((~!c) + (~!d)*(~x))/(sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + ext_isinteger(2*(~m)) && + gt((~m), 1) ? +2*(~b)*((~a) + (~b)*(~x))^((~m) - 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~f)*(~h)*(2*(~m) + 1)) - 1⨸((~f)*(~h)*(2*(~m) + 1))* ∫((((~a) + (~b)*(~x))^((~m) - 2)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simplify((~a)*(~b)*((~d)*(~e)*(~g) + (~c)*((~f)*(~g) + (~e)*(~h))) + 2*(~b)^2*(~c)*(~e)*(~g)*((~m) - 1) - (~a)^2*(~c)*(~f)*(~h)*(2*(~m) + 1) + ((~b)^2*(2*(~m) - 1)*((~d)*(~e)*(~g) + (~c)*((~f)*(~g) + (~e)*(~h))) - (~a)^2*(~d)*(~f)*(~h)*(2*(~m) + 1) + 2*(~a)*(~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) - 2*(~c)*(~f)*(~h)*(~m)))* (~x) - (~b)*((~a)*(~d)*(~f)*(~h)*(4*(~m) - 1) + (~b)*((~c)*(~f)*(~h) - 2*(~d)*((~f)*(~g) + (~e)*(~h))*(~m)))*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_35", +:(∫(sqrt( (~!c) + (~!d)*(~x))/(((~!a) + (~!b)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +(~d)⨸(~b)*∫(1⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(1⨸(((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) : nothing)) + +# (* Int[Sqrt[c_.+d_.*x_]/((a_.+b_.*x_)^(3/2)*Sqrt[e_.+f_.*x_]*Sqrt[g_.+ h_.*x_]),x_Symbol] := -2*Sqrt[c+d*x]*Sqrt[(b*g-a*h)*(e+f*x)/((f*g-e*h)*(a+b*x))]/ ((b*g-a*h)*Sqrt[e+f*x]*Sqrt[(b*g-a*h)*(c+d*x)/((d*g-c*h)*(a+b*x))] )* Subst[Int[Sqrt[1+(b*c-a*d)*x^2/(d*g-c*h)]/Sqrt[1+(b*e-a*f)*x^2/(f* g-e*h)],x],x,Sqrt[g+h*x]/Sqrt[a+b*x]] /; FreeQ[{a,b,c,d,e,f,g,h},x] *) +("1_1_1_4_36", +:(∫(sqrt( (~!c) + (~!d)*(~x))/(((~!a) + (~!b)*(~x))^(3//2)*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) ? +-2*sqrt((~c) + (~d)*(~x))* sqrt(-((~b)*(~e) - (~a)*(~f))*((~g) + (~h)*(~x))⨸(((~f)*(~g) - (~e)*(~h))*((~a) + (~b)*(~x))))⨸ (((~b)*(~e) - (~a)*(~f))*sqrt((~g) + (~h)*(~x))* sqrt(((~b)*(~e) - (~a)*(~f))*((~c) + (~d)*(~x))⨸(((~d)*(~e) - (~c)*(~f))*((~a) + (~b)*(~x)))))* int_and_subst(sqrt(1 + ((~b)*(~c) - (~a)*(~d))*(~x)^2⨸((~d)*(~e) - (~c)*(~f)))⨸ sqrt(1 - ((~b)*(~g) - (~a)*(~h))*(~x)^2⨸((~f)*(~g) - (~e)*(~h))), (~x), (~x), sqrt((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*(~x)), "1_1_1_4_36") : nothing)) + +("1_1_1_4_37", +:(∫(((~!a) + (~!b)*(~x))^(~m)* sqrt((~!c) + (~!d)*(~x))/(sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + ext_isinteger(2*(~m)) && + le((~m), -2) ? +(~b)*((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸(((~m) + 1)*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))) + 1⨸(2*((~m) + 1)*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h)))* ∫((((~a) + (~b)*(~x))^((~m) + 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simplify(2*(~a)*(~c)*(~f)*(~h)*((~m) + 1) - (~b)*((~d)*(~e)*(~g) + (~c)*(2*(~m) + 3)*((~f)*(~g) + (~e)*(~h))) + 2*((~a)*(~d)*(~f)*(~h)*((~m) + 1) - (~b)*((~m) + 2)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)))*(~x) - (~b)*(~d)*(~f)*(~h)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing)) + +("1_1_1_4_38", +:(∫(((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x))^(~q)/(((~!a) + (~!b)*(~x))*((~!c) + (~!d)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~q), (~x)) && + lt(0, (~p), 1) ? +((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(((~e) + (~f)*(~x))^((~p) - 1)*((~g) + (~h)*(~x))^(~q)⨸((~a) + (~b)*(~x)), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(((~e) + (~f)*(~x))^((~p) - 1)*((~g) + (~h)*(~x))^(~q)⨸((~c) + (~d)*(~x)), (~x)) : nothing)) + +("1_1_1_4_39", +:(∫(((~!a) + (~!b)*(~x))^ (~!m)*((~!c) + (~!d)*(~x))^(~n)/(sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + ext_isinteger((~m)) && + ext_isinteger((~n) + 1/2) ? +∫(ext_expand( 1⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), ((~a) + (~b)*(~x))^ (~m)*((~c) + (~d)*(~x))^((~n) + 1⨸2), (~x)), (~x)) : nothing)) + +("1_1_1_4_40", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + ext_isinteger((~p), (~q)) ? +∫(ext_expand(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^ (~q), (~x)), (~x)) : nothing)) + +("1_1_1_4_41", +:(∫(((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~x)) && + igt((~q), 0) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) && + !(sumsimpler((~p), 1)) + ) ? +(~h)⨸(~b)*∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^ (~p)*((~g) + (~h)*(~x))^((~q) - 1), (~x)) + ((~b)*(~g) - (~a)*(~h))⨸(~b)* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^((~q) - 1), (~x)) : nothing)) + +# instead of producing the same integral with a function cannot integrate, if i +# remove this rule it will not be applied and the expressions will remain with the ∫ sign +# ("1_1_1_4_42", +# @rule ∫(((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^ (~!p)*((~!g) + (~!h)*(~x))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~x)) ? +# CannotIntegrate[((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^(~q), (~x)] : nothing) + +("1_1_1_4_43", +:(∫(((~!a) + (~!b)*(~u))^(~!m)*((~!c) + (~!d)*(~u))^(~!n)*((~!e) + (~!f)*(~u))^ (~!p)*((~!g) + (~!h)*(~u))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸Symbolics.coeff((~u), (~x), 1)* int_and_subst(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^(~q), (~x), (~x), (~u), "1_1_1_4_43") : nothing)) + +("1_1_1_4_44", +:(∫(((~!i)*((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^ (~p)*((~!g) + (~!h)*(~x))^(~q))^(~r),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~m), (~n), (~p), (~q), (~r), (~x)) ? +((~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)))* ∫(((~a) + (~b)*(~x))^((~m)*(~r))*((~c) + (~d)*(~x))^((~n)*(~r))*((~e) + (~f)*(~x))^((~p)*(~r))*((~g) + (~h)*(~x))^((~q)*(~r)), (~x)) : nothing)) + +("1_1_1_4_45", +:(∫((~u)^(~m),(~x)) ) => :( + !contains_var((~m), (~x)) && + linear((~u), (~x)) && + !(linear_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m), (~x)) : nothing)) + +("1_1_1_4_46", +:(∫((~u)^(~!m)*(~v)^(~!n),(~x)) ) => :( + !contains_var((~m), (~n), (~x)) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~n), (~x)) : nothing)) + +("1_1_1_4_47", +:(∫((~u)^(~!m)*(~v)^(~!n)*(~w)^(~!p),(~x)) ) => :( + !contains_var((~m), (~n), (~p), (~x)) && + linear((~u), (~v), (~w), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~n)*expand_to_sum((~w), (~x))^(~p), (~x)) : nothing)) + +("1_1_1_4_48", +:(∫((~u)^(~!m)*(~v)^(~!n)*(~w)^(~!p)*(~z)^(~!q),(~x)) ) => :( + !contains_var((~m), (~n), (~p), (~q), (~x)) && + linear((~u), (~v), (~w), (~z), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~z), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~n)*expand_to_sum((~w), (~x))^(~p)* expand_to_sum((~z), (~x))^(~q), (~x)) : nothing)) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.5 P(x) (a+b x)^m (c+d x)^n.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.5 P(x) (a+b x)^m (c+d x)^n.jl new file mode 100644 index 0000000..4cddf4e --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.5 P(x) (a+b x)^m (c+d x)^n.jl @@ -0,0 +1,73 @@ +file_rules = [ +# (* ::Subsection::Closed:: *) +# (* 1.1.1.5 P(x) (a+b x)^m (c+d x)^n *) +("1_1_1_5_1", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + poly((~Px), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~m), (~n)) && + ( + ext_isinteger((~m)) || + gt((~a), 0) && + gt((~c), 0) + ) ? +∫((~Px)*((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m), (~x)) : nothing)) + +("1_1_1_5_2", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + poly((~Px), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~m), (~n)) && + !(ext_isinteger((~m))) ? +((~a) + (~b)*(~x))^ fracpart((~m))*((~c) + (~d)*(~x))^fracpart((~m))⨸((~a)*(~c) + (~b)*(~d)*(~x)^2)^fracpart((~m))* ∫((~Px)*((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m), (~x)) : nothing)) + +("1_1_1_5_3", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + poly((~Px), (~x)) && + eq(poly_remainder((~Px), (~a) + (~b)*(~x), (~x)), 0) ? +∫(poly_quotient((~Px), (~a) + (~b)*(~x), (~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n), (~x)) : nothing)) + +("1_1_1_5_4", +:(∫((~Px)*((~!c) + (~!d)*(~x))^(~!n)/((~!a) + (~!b)*(~x)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + poly((~Px), (~x)) && + ilt((~n) + 1/2, 0) && + gt(exponent_of((~Px), (~x)), 2) ? +∫(ext_expand(1⨸sqrt((~c) + (~d)*(~x)), (~Px)*((~c) + (~d)*(~x))^((~n) + 1⨸2)⨸((~a) + (~b)*(~x)), (~x)), (~x)) : nothing)) + +("1_1_1_5_5", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + poly((~Px), (~x)) && + ( + ext_isinteger((~m), (~n)) || + igt((~m), -2) + ) && + gt(exponent_of((~Px), (~x)), 2) ? +∫(ext_expand((~Px)*((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n), (~x)), (~x)) : nothing)) + +# ("1_1_1_5_6", +# @rule ∫((~Px)*((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && +# poly((~Px), (~x)) && +# ilt((~m), -1) && +# gt(exponent_of((~Px), (~x)), 2) ? +# (~R)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)* expand_to_sum(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*poly_quotient((~Px), (~a) + (~b)*(~x), (~x)), (~R) = poly_remainder((~Px), (~a) + (~b)*(~x), (~x)) - (~d)*(~R)*((~m) + (~n) + 2), (~x)), (~x)) : nothing) + +# ("1_1_1_5_7", +# @rule ∫((~Px)*((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && +# poly((~Px), (~x)) && +# lt((~m), -1) && +# gt(exponent_of((~Px), (~x)), 2) ? +# (~R)*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)* expand_to_sum(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*poly_quotient((~Px), (~a) + (~b)*(~x), (~x)), (~R) = poly_remainder((~Px), (~a) + (~b)*(~x), (~x)) - (~d)*(~R)*((~m) + (~n) + 2), (~x)), (~x)) : nothing) + +# ("1_1_1_5_8", +# @rule ∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n),(~x)) => +# !eq((~m) + (~n) + (~q) + 1, 0)] ? +# (~k)*((~a) + (~b)*(~x))^((~m) + exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))])*((~c) + (~d)*(~x))^((~n) + 1)⨸((~d)*(~b)^exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))]*((~m) + (~n) + exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))] + 1)) + 1⨸((~d)*(~b)^exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))]*((~m) + (~n) + exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))] + 1))*∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)* expand_to_sum( (~d)*(~b)^exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x)))*((~m) + (~n) + exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))] + 1)*(~Px) - (~d)*(~k)*((~m) + (~n) + exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))] + 1)*((~a) + (~b)*(~x))^exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))] - (~k)*((~b)*(~c) - (~a)*(~d))*((~m) + exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))])*((~a) + (~b)*(~x))^(exponent_of((~Px), (~x)), (~k) = Coeff[(~Px), (~x), exponent_of((~Px), (~x))] - 1), (~x)), (~x) : nothing) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.6 P(x) (a+b x)^m (c+d x)^n (e+f x)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.6 P(x) (a+b x)^m (c+d x)^n (e+f x)^p.jl new file mode 100644 index 0000000..c6a26ee --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.6 P(x) (a+b x)^m (c+d x)^n (e+f x)^p.jl @@ -0,0 +1,63 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.1.6 P(x) (a+b x)^m (c+d x)^n (e+f x)^p *) +("1_1_1_6_1", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + poly((~Px), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~m), (~n)) && + ( + ext_isinteger((~m)) || + gt((~a), 0) && + gt((~c), 0) + ) ? +∫((~Px)*((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_6_2", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + poly((~Px), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~m), (~n)) && + !(ext_isinteger((~m))) ? +((~a) + (~b)*(~x))^ fracpart((~m))*((~c) + (~d)*(~x))^fracpart((~m))⨸((~a)*(~c) + (~b)*(~d)*(~x)^2)^fracpart((~m))* ∫((~Px)*((~a)*(~c) + (~b)*(~d)*(~x)^2)^(~m)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_6_3", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + poly((~Px), (~x)) && + eq(poly_remainder((~Px), (~a) + (~b)*(~x), (~x)), 0) ? +∫(poly_quotient((~Px), (~a) + (~b)*(~x), (~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^(~p), (~x)) : nothing)) + +("1_1_1_6_4", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + poly((~Px), (~x)) && + ext_isinteger((~m), (~n)) ? +∫(ext_expand((~Px)*((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p), (~x)), (~x)) : nothing)) + +("1_1_1_6_5", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + poly((~Px), (~x)) && + ilt((~m), -1) ? +(~b)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* expand_to_sum(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*poly_quotient((~Px), (~a) + (~b)*(~x), (~x)) + (~a)*(~d)*(~f)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~m) + 1) - (~b)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~d)*(~e)*((~m) + (~n) + 2) + (~c)*(~f)*((~m) + (~p) + 2)) - (~b)*(~d)*(~f)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_6_6", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + poly((~Px), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~b)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* expand_to_sum(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*poly_quotient((~Px), (~a) + (~b)*(~x), (~x)) + (~a)*(~d)*(~f)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~m) + 1) - (~b)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~d)*(~e)*((~m) + (~n) + 2) + (~c)*(~f)*((~m) + (~p) + 2)) - (~b)*(~d)*(~f)*poly_remainder((~Px), (~a) + (~b)*(~x), (~x))*((~m) + (~n) + (~p) + 3)*(~x), (~x)), (~x)) : nothing)) + +("1_1_1_6_7", +:(∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + poly((~Px), (~x)) && + !eq((~m) + (~n) + (~p) + exponent_of((~Px), (~x)) + 1, 0) ? +ext_coeff((~Px), (~x), exponent_of((~Px), (~x)))*((~a) + (~b)*(~x))^((~m) + exponent_of((~Px), (~x)) - 1)*((~c) + (~d)*(~x))^((~n) + 1)*((~e) + (~f)*(~x))^((~p) + 1)⨸((~d)*(~f)* (~b)^(exponent_of((~Px), (~x)) - 1)*((~m) + (~n) + (~p) + exponent_of((~Px), (~x)) + 1)) + 1⨸((~d)*(~f)*(~b)^exponent_of((~Px), (~x))*((~m) + (~n) + (~p) + exponent_of((~Px), (~x)) + 1))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)* expand_to_sum( (~d)*(~f)*(~b)^exponent_of((~Px), (~x))*((~m) + (~n) + (~p) + exponent_of((~Px), (~x)) + 1)*(~Px) - (~d)*(~f)*ext_coeff((~Px), (~x), exponent_of((~Px), (~x)))*((~m) + (~n) + (~p) + exponent_of((~Px), (~x)) + 1)*((~a) + (~b)*(~x))^exponent_of((~Px), (~x)) + ext_coeff((~Px), (~x), exponent_of((~Px), (~x)))*((~a) + (~b)*(~x))^(exponent_of((~Px), (~x)) - 2)*((~a)^2*(~d)*(~f)*((~m) + (~n) + (~p) + exponent_of((~Px), (~x)) + 1) - (~b)*((~b)*(~c)*(~e)*((~m) + exponent_of((~Px), (~x)) - 1) + (~a)*((~d)*(~e)*((~n) + 1) + (~c)*(~f)*((~p) + 1))) + (~b)*((~a)*(~d)*(~f)*(2*((~m) + exponent_of((~Px), (~x))) + (~n) + (~p)) - (~b)*((~d)*(~e)*((~m) + exponent_of((~Px), (~x)) + (~n)) + (~c)*(~f)*((~m) + exponent_of((~Px), (~x)) + (~p))))*(~x)), (~x)), (~x)) : nothing)) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.7 P(x) (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.7 P(x) (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl new file mode 100644 index 0000000..8ecd66b --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.1 Linear/1.1.1.7 P(x) (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q.jl @@ -0,0 +1,200 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.1.7 P(x) (a+b x)^m (c+d x)^n (e+f x)^p (g+h x)^q *) +# ("1_1_1_7_1", +# @rule ∫((~Px)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => +# ext_coeff((~Px), (~x), (~n) - 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) + ∫(((~Px) - ext_coeff((~Px), (~x), (~n) - 1)*(~x)^((~n) - 1))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) ⨸; FreeQ[{(~a), (~b)}, (~x)] && PolyQ[(~Px), (~x)] && IGtQ[(~p), 1] && IGtQ[(~n), 1] && NeQ[ext_coeff((~Px), (~x), (~n) - 1), 0] && NeQ[(~Px), ext_coeff((~Px), (~x), (~n) - 1)*(~x)^((~n) - 1)] && Not[MatchQ[(~Px), Qx_.*(c_ + d_.*(~x)^m_)^q_ ⨸; FreeQ[{(~c), (~d)}, (~x)] && PolyQ[(~Qx), (~x)] && IGtQ[(~q), 1] && IGtQ[(~m), 1] && NeQ[ext_coeff((~Qx)*((~a) + (~b)*(~x)^(~n))^(~p), (~x), (~m) - 1), 0] && GtQ[(~m)*(~q), (~n)*(~p)]]]) + +("1_1_1_7_2", +@rule ∫((~Px)*(~x)^(~!m)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + poly((~Px), (~x)) && + igt((~p), 1) && + igt((~n) - (~m), 0) && + !eq(ext_coeff((~Px), (~x), (~n) - (~m) - 1), 0) ? +ext_coeff((~Px), (~x), (~n) - (~m) - 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) + ∫(((~Px) - ext_coeff((~Px), (~x), (~n) - (~m) - 1)*(~x)^((~n) - (~m) - 1))* (~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_1_7_3", +@rule ∫((~!u)*(~x)^(~!m)*((~!a)*(~x)^(~!p) + (~!b)*(~x)^(~!q))^(~!n),(~x)) => + !contains_var((~a), (~b), (~m), (~p), (~q), (~x)) && + ext_isinteger((~n)) && + pos((~q) - (~p)) ? +∫((~u)*(~x)^((~m) + (~n)*(~p))*((~a) + (~b)*(~x)^((~q) - (~p)))^(~n), (~x)) : nothing) + +("1_1_1_7_4", +@rule ∫((~!u)*(~x)^(~!m)*((~!a)*(~x)^(~!p) + (~!b)*(~x)^(~!q) + (~!c)*(~x)^(~!r))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~p), (~q), (~r), (~x)) && + ext_isinteger((~n)) && + pos((~q) - (~p)) && + pos((~r) - (~p)) ? +∫((~u)*(~x)^((~m) + (~n)*(~p))*((~a) + (~b)*(~x)^((~q) - (~p)) + (~c)*(~x)^((~r) - (~p)))^(~n), (~x)) : nothing) + +("1_1_1_7_5", +@rule ∫((~!u)*(~Px)^(~!p)*(~Qx)^(~!q),(~x)) => + !contains_var((~q), (~x)) && + poly((~Px), (~x)) && + poly((~Qx), (~x)) && + eq(poly_remainder((~Px), (~Qx), (~x)), 0) && + ext_isinteger((~p)) && + lt((~p)*(~q), 0) ? +∫((~u)*poly_quotient((~Px), (~Qx), (~x))^(~p)*(~Qx)^((~p) + (~q)), (~x)) : nothing) + +("1_1_1_7_6", +@rule ∫((~Pp)/(~Qq),(~x)) => + poly((~Pp), (~x)) && + poly((~Qq), (~x)) && + eq(exponent_of((~Pp), (~x)), exponent_of((~Qq), (~x)) - 1) && + eq((~Pp), simplify( ext_coeff((~Pp), (~x), exponent_of((~Pp), (~x)))/(exponent_of((~Qq), (~x))*ext_coeff((~Qq), (~x), exponent_of((~Qq), (~x))))*Symbolics.derivative((~Qq), (~x)))) ? +ext_coeff((~Pp), (~x), exponent_of((~Pp), (~x)))*log((~Qq))⨸(exponent_of((~Qq), (~x))*ext_coeff((~Qq), (~x), exponent_of((~Qq), (~x)))) : nothing) + +("1_1_1_7_7", +@rule ∫((~Pp)*(~Qq)^(~!m),(~x)) => + !contains_var((~m), (~x)) && + poly((~Pp), (~x)) && + poly((~Qq), (~x)) && + !eq((~m), -1) && + !eq(exponent_of((~Pp), (~x)) + (~m)*exponent_of((~Qq), (~x)) + 1, 0) && + eq((exponent_of((~Pp), (~x)) + (~m)*exponent_of((~Qq), (~x)) + 1)*ext_coeff((~Qq), (~x), exponent_of((~Qq), (~x)))*(~Pp), ext_coeff((~Pp), (~x), exponent_of((~Pp), (~x)))* (~x)^(exponent_of((~Pp), (~x)) - exponent_of((~Qq), (~x)))*((exponent_of((~Pp), (~x)) - exponent_of((~Qq), (~x)) + 1)*(~Qq) + ((~m) + 1)*(~x)*Symbolics.derivative((~Qq), (~x)))) ? +ext_coeff((~Pp), (~x), exponent_of((~Pp), (~x)))*(~x)^(exponent_of((~Pp), (~x)) - exponent_of((~Qq), (~x)) + 1)* (~Qq)^((~m) + 1)⨸((exponent_of((~Pp), (~x)) + (~m)*exponent_of((~Qq), (~x)) + 1)*ext_coeff((~Qq), (~x), exponent_of((~Qq), (~x)))) : nothing) + +("1_1_1_7_8", +@rule ∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~!n))^(~p)*((~a2) + (~!b2)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + eq((~m) - 2*(~n) + 1, 0) && + !eq((~p), -1) ? +((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸(2*(~b1)*(~b2)*(~n)*((~p) + 1)) : nothing) + +("1_1_1_7_9", +@rule ∫((~Pp)*(~Qq)^(~!m)*(~Rr)^(~!n),(~x)) => + !contains_var((~m), (~n), (~x)) && + poly((~Pp), (~x)) && + poly((~Qq), (~x)) && + poly((~Rr), (~x)) && + !eq((~m), -1) && + !eq((~n), -1) && + !eq(exponent_of((~Pp), (~x)) + (~m)*exponent_of((~Qq), (~x)) + (~n)*exponent_of((~Rr), (~x)) + 1, 0) && + eq((exponent_of((~Pp), (~x)) + (~m)*exponent_of((~Qq), (~x)) + (~n)*exponent_of((~Rr), (~x)) + 1)*ext_coeff((~Qq), (~x), exponent_of((~Qq), (~x)))*ext_coeff((~Rr), (~x), exponent_of((~Rr), (~x)))*(~Pp), ext_coeff((~Pp), (~x), exponent_of((~Pp), (~x)))* (~x)^(exponent_of((~Pp), (~x)) - exponent_of((~Qq), (~x)) - exponent_of((~Rr), (~x)))*((exponent_of((~Pp), (~x)) - exponent_of((~Qq), (~x)) - exponent_of((~Rr), (~x)) + 1)*(~Qq)*(~Rr) + ((~m) + 1)*(~x)*(~Rr)* Symbolics.derivative((~Qq), (~x)) + ((~n) + 1)*(~x)*(~Qq)*Symbolics.derivative((~Rr), (~x)))) ? +ext_coeff((~Pp), (~x), exponent_of((~Pp), (~x)))*(~x)^(exponent_of((~Pp), (~x)) - exponent_of((~Qq), (~x)) - exponent_of((~Rr), (~x)) + 1)*(~Qq)^((~m) + 1)* (~Rr)^((~n) + 1)⨸((exponent_of((~Pp), (~x)) + (~m)*exponent_of((~Qq), (~x)) + (~n)*exponent_of((~Rr), (~x)) + 1)*ext_coeff((~Qq), (~x), exponent_of((~Qq), (~x)))* ext_coeff((~Rr), (~x), exponent_of((~Rr), (~x)))) : nothing) + +("1_1_1_7_10", +@rule ∫((~Qr)*((~!a) + (~!b)*(~Pq)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~n), (~p), (~x)) && + poly((~Pq), (~x)) && + poly((~Qr), (~x)) && + eq(exponent_of((~Qr), (~x)), exponent_of((~Pq), (~x)) - 1) && + eq(ext_coeff((~Qr), (~x), exponent_of((~Qr), (~x)))*Symbolics.derivative((~Pq), (~x)), exponent_of((~Pq), (~x))*ext_coeff((~Pq), (~x), exponent_of((~Pq), (~x)))*(~Qr)) ? +ext_coeff((~Qr), (~x), exponent_of((~Qr), (~x)))⨸(exponent_of((~Pq), (~x))*ext_coeff((~Pq), (~x), exponent_of((~Pq), (~x))))* int_and_subst(((~a) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~Pq), "1_1_1_7_10") : nothing) + +# ("1_1_1_7_11", +# @rule ∫((~Qr)*((~!a) + (~!b)*(~Pq)^(~!n) + (~!c)*(~Pq)^(~!n2))^(~!p),(~x)) => +# Module[{(~q) = exponent_of((~Pq), (~x)), (~r) = exponent_of((~Qr), (~x))}, ext_coeff((~Qr), (~x), (~r))⨸((~q)*ext_coeff((~Pq), (~x), (~q)))* int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p), (~x), (~x), (~Pq), "1_1_1_7_11") ⨸; EqQ[(~r), (~q) - 1] && EqQ[ext_coeff((~Qr), (~x), (~r))*Symbolics.derivative((~Pq), (~x)), (~q)*ext_coeff((~Pq), (~x), (~q))*(~Qr)]] ⨸; FreeQ[{(~a), (~b), (~c), (~n), (~p)}, (~x)] && EqQ[(~n2), 2*(~n)] && PolyQ[(~Pq), (~x)] && PolyQ[(~Qr), (~x)]) + +("1_1_1_7_12", +@rule ∫((~!u)*((~!a)*(~x)^(~!p) + (~!b)*(~x)^(~!q))^(~!n),(~x)) => + !contains_var((~a), (~b), (~p), (~q), (~x)) && + ext_isinteger((~n)) && + pos((~q) - (~p)) ? +∫((~u)*(~x)^((~n)*(~p))*((~a) + (~b)*(~x)^((~q) - (~p)))^(~n), (~x)) : nothing) + +("1_1_1_7_13", +@rule ∫((~!u)*((~!a)*(~x)^(~!p) + (~!b)*(~x)^(~!q) + (~!c)*(~x)^(~!r))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~q), (~r), (~x)) && + ext_isinteger((~n)) && + pos((~q) - (~p)) && + pos((~r) - (~p)) ? +∫((~u)*(~x)^((~n)*(~p))*((~a) + (~b)*(~x)^((~q) - (~p)) + (~c)*(~x)^((~r) - (~p)))^(~n), (~x)) : nothing) + +#(* Int[Sqrt[a_.+b_.*x_]*(A_.+B_.*x_)/(Sqrt[c_.+d_.*x_]*Sqrt[e_.+f_.*x_ ]*Sqrt[g_.+h_.*x_]),x_Symbol] := B*Sqrt[a+b*x]*Sqrt[e+f*x]*Sqrt[g+h*x]/(f*h*Sqrt[c+d*x]) - B*(b*g-a*h)/(2*f*h)*Int[Sqrt[e+f*x]/(Sqrt[a+b*x]*Sqrt[c+d*x]*Sqrt[g+ h*x]),x] + B*(d*e-c*f)*(d*g-c*h)/(2*d*f*h)*Int[Sqrt[a+b*x]/((c+d*x)^(3/2)*Sqrt[ e+f*x]*Sqrt[g+h*x]),x] /; FreeQ[{a,b,c,d,e,f,g,h,A,B},x] && EqQ[2*A*d*f-B*(d*e+c*f),0] *) +("1_1_1_7_14", +@rule ∫(sqrt( (~!a) + (~!b)*(~x))*((~!A) + (~!B)*(~x))/(sqrt((~!c) + (~!d)*(~x))* sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~x)) && + eq(2*(~A)*(~d)*(~f) - (~B)*((~d)*(~e) + (~c)*(~f)), 0) ? +(~b)*(~B)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~d)*(~f)*(~h)*sqrt((~a) + (~b)*(~x))) - (~B)*((~b)*(~g) - (~a)*(~h))⨸(2*(~f)*(~h))* ∫(sqrt((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + (~B)*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))⨸(2*(~d)*(~f)*(~h))* ∫(sqrt((~c) + (~d)*(~x))⨸(((~a) + (~b)*(~x))^(3⨸2)*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) : nothing) + +#(* Int[Sqrt[a_.+b_.*x_]*(A_.+B_.*x_)/(Sqrt[c_.+d_.*x_]*Sqrt[e_.+f_.*x_ ]*Sqrt[g_.+h_.*x_]),x_Symbol] := (2*A*d*f-B*(d*e+c*f))/(2*d*f)*Int[Sqrt[a+b*x]/(Sqrt[c+d*x]*Sqrt[e+f* x]*Sqrt[g+h*x]),x] + B/(2*d*f)*Int[(Sqrt[a+b*x]*(d*e+c*f+2*d*f*x))/(Sqrt[c+d*x]*Sqrt[e+f* x]*Sqrt[g+h*x]),x] /; FreeQ[{a,b,c,d,e,f,g,h,A,B},x] && NeQ[2*A*d*f-B*(d*e+c*f),0] *) +("1_1_1_7_15", +@rule ∫(sqrt( (~!a) + (~!b)*(~x))*((~!A) + (~!B)*(~x))/(sqrt((~!c) + (~!d)*(~x))* sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~x)) && + !eq(2*(~A)*(~d)*(~f) - (~B)*((~d)*(~e) + (~c)*(~f)), 0) ? +(~B)*sqrt((~a) + (~b)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))⨸((~f)*(~h)*sqrt((~c) + (~d)*(~x))) + (~B)*((~d)*(~e) - (~c)*(~f))*((~d)*(~g) - (~c)*(~h))⨸(2*(~d)*(~f)*(~h))* ∫(sqrt((~a) + (~b)*(~x))⨸(((~c) + (~d)*(~x))^(3⨸2)*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) - (~B)*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))⨸(2*(~b)*(~f)*(~h))* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + (2*(~A)*(~b)*(~d)*(~f)*(~h) + (~B)*((~a)*(~d)*(~f)*(~h) - (~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h))))⨸(2*(~b)*(~d)*(~f)* (~h))*∫(sqrt( (~a) + (~b)*(~x))⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) : nothing) + +("1_1_1_7_16", +@rule ∫(((~!a) + (~!b)*(~x))^ (~!m)*((~!A) + (~!B)*(~x))/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~x)) && + ext_isinteger(2*(~m)) && + gt((~m), 0) ? +1⨸((~d)*(~f)*(~h)*(2*(~m) + 3))* ∫((((~a) + (~b)*(~x))^((~m) - 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))))* simp((~a)*(~A)*(~d)*(~f)*(~h)*(2*(~m) + 3) + ((~A)*(~b) + (~a)*(~B))*(~d)*(~f)*(~h)*(2*(~m) + 3)*(~x) + (~b)*(~B)*(~d)*(~f)*(~h)*(2*(~m) + 3)*(~x)^2, (~x)), (~x)) : nothing) + +("1_1_1_7_17", +@rule ∫(((~!A) + (~!B)*(~x))/(sqrt((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))* sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~x)) ? +((~A)*(~b) - (~a)*(~B))⨸(~b)* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + (~B)⨸(~b)* ∫(sqrt((~a) + (~b)*(~x))⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) : nothing) + +("1_1_1_7_18", +@rule ∫(((~!a) + (~!b)*(~x))^ (~m)*((~!A) + (~!B)*(~x))/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~x)) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~A)*(~b)^2 - (~a)*(~b)*(~B))*((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))) - 1⨸(2*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h)))* ∫((((~a) + (~b)*(~x))^((~m) + 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simp((~A)*(2*(~a)^2*(~d)*(~f)*(~h)*((~m) + 1) - 2*(~a)*(~b)*((~m) + 1)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) + (~b)^2*(2*(~m) + 3)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h))) - (~b)*(~B)*((~a)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) + 2*(~b)*(~c)*(~e)*(~g)*((~m) + 1)) - 2*(((~A)*(~b) - (~a)*(~B))*((~a)*(~d)*(~f)*(~h)*((~m) + 1) - (~b)*((~m) + 2)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h))))*(~x) + (~d)*(~f)*(~h)*(2*(~m) + 5)*((~A)*(~b)^2 - (~a)*(~b)*(~B))*(~x)^2, (~x)), (~x)) : nothing) + +("1_1_1_7_19", +@rule ∫(((~!a) + (~!b)*(~x))^ (~!m)*((~!A) + (~!B)*(~x) + (~!C)*(~x)^2)/(sqrt((~!c) + (~!d)*(~x))* sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~C), (~x)) && + ext_isinteger(2*(~m)) && + gt((~m), 0) ? +2*(~C)*((~a) + (~b)*(~x))^(~m)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~d)*(~f)*(~h)*(2*(~m) + 3)) + 1⨸((~d)*(~f)*(~h)*(2*(~m) + 3))* ∫((((~a) + (~b)*(~x))^((~m) - 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simp((~a)*(~A)*(~d)*(~f)*(~h)*(2*(~m) + 3) - (~C)*((~a)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) + 2*(~b)*(~c)*(~e)*(~g)*(~m)) + (((~A)*(~b) + (~a)*(~B))*(~d)*(~f)*(~h)*(2*(~m) + 3) - (~C)*(2*(~a)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) + (~b)*(2*(~m) + 1)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h))))*(~x) + ((~b)*(~B)*(~d)*(~f)*(~h)*(2*(~m) + 3) + 2*(~C)*((~a)*(~d)*(~f)*(~h)*(~m) - (~b)*((~m) + 1)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h))))*(~x)^2, (~x)), (~x)) : nothing) + +("1_1_1_7_20", +@rule ∫(((~!a) + (~!b)*(~x))^ (~!m)*((~!A) + (~!C)*(~x)^2)/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~C), (~x)) && + ext_isinteger(2*(~m)) && + gt((~m), 0) ? +2*(~C)*((~a) + (~b)*(~x))^(~m)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸((~d)*(~f)*(~h)*(2*(~m) + 3)) + 1⨸((~d)*(~f)*(~h)*(2*(~m) + 3))* ∫((((~a) + (~b)*(~x))^((~m) - 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simp((~a)*(~A)*(~d)*(~f)*(~h)*(2*(~m) + 3) - (~C)*((~a)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) + 2*(~b)*(~c)*(~e)*(~g)*(~m)) + ((~A)*(~b)*(~d)*(~f)*(~h)*(2*(~m) + 3) - (~C)*(2*(~a)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) + (~b)*(2*(~m) + 1)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h))))*(~x) + 2*(~C)*((~a)*(~d)*(~f)*(~h)*(~m) - (~b)*((~m) + 1)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)))*(~x)^2, (~x)), (~x)) : nothing) + +("1_1_1_7_21", +@rule ∫(((~!A) + (~!B)*(~x) + (~!C)*(~x)^2)/(sqrt((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))* sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~C), (~x)) ? +(~C)*sqrt((~a) + (~b)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))⨸((~b)*(~f)*(~h)*sqrt((~c) + (~d)*(~x))) + (~C)*((~d)*(~e) - (~c)*(~f))*((~d)*(~g) - (~c)*(~h))⨸(2*(~b)*(~d)*(~f)*(~h))* ∫(sqrt((~a) + (~b)*(~x))⨸(((~c) + (~d)*(~x))^(3⨸2)*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + 1⨸(2*(~b)*(~d)*(~f)*(~h))* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x)))* simp(2*(~A)*(~b)*(~d)*(~f)*(~h) - (~C)*((~b)*(~d)*(~e)*(~g) + (~a)*(~c)*(~f)*(~h)) + (2*(~b)*(~B)*(~d)*(~f)*(~h) - (~C)*((~a)*(~d)*(~f)*(~h) + (~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h))))*(~x), (~x)), (~x)) : nothing) + +("1_1_1_7_22", +@rule ∫(((~!A) + (~!C)*(~x)^2)/(sqrt((~!a) + (~!b)*(~x))*sqrt((~!c) + (~!d)*(~x))* sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~C), (~x)) ? +(~C)*sqrt((~a) + (~b)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))⨸((~b)*(~f)*(~h)*sqrt((~c) + (~d)*(~x))) + (~C)*((~d)*(~e) - (~c)*(~f))*((~d)*(~g) - (~c)*(~h))⨸(2*(~b)*(~d)*(~f)*(~h))* ∫(sqrt((~a) + (~b)*(~x))⨸(((~c) + (~d)*(~x))^(3⨸2)*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x))), (~x)) + 1⨸(2*(~b)*(~d)*(~f)*(~h))* ∫(1⨸(sqrt((~a) + (~b)*(~x))*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))*sqrt((~g) + (~h)*(~x)))* simp(2*(~A)*(~b)*(~d)*(~f)*(~h) - (~C)*((~b)*(~d)*(~e)*(~g) + (~a)*(~c)*(~f)*(~h)) - (~C)*((~a)*(~d)*(~f)*(~h) + (~b)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)))*(~x), (~x)), (~x)) : nothing) + +("1_1_1_7_23", +@rule ∫(((~!a) + (~!b)*(~x))^ (~m)*((~!A) + (~!B)*(~x) + (~!C)*(~x)^2)/(sqrt((~!c) + (~!d)*(~x))* sqrt((~!e) + (~!f)*(~x))*sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~C), (~x)) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))*((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))* sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))) - 1⨸(2*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h)))* ∫((((~a) + (~b)*(~x))^((~m) + 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simp((~A)*(2*(~a)^2*(~d)*(~f)*(~h)*((~m) + 1) - 2*(~a)*(~b)*((~m) + 1)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) + (~b)^2*(2*(~m) + 3)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h))) - ((~b)*(~B) - (~a)*(~C))*((~a)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) + 2*(~b)*(~c)*(~e)*(~g)*((~m) + 1)) - 2*(((~A)*(~b) - (~a)*(~B))*((~a)*(~d)*(~f)*(~h)*((~m) + 1) - (~b)*((~m) + 2)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h))) - (~C)*((~a)^2*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) - (~b)^2*(~c)*(~e)*(~g)*((~m) + 1) + (~a)*(~b)*((~m) + 1)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h))))*(~x) + (~d)*(~f)*(~h)*(2*(~m) + 5)*((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))*(~x)^2, (~x)), (~x)) : nothing) + +("1_1_1_7_24", +@rule ∫(((~!a) + (~!b)*(~x))^ (~m)*((~!A) + (~!C)*(~x)^2)/(sqrt((~!c) + (~!d)*(~x))*sqrt((~!e) + (~!f)*(~x))* sqrt((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~C), (~x)) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~A)*(~b)^2 + (~a)^2*(~C))*((~a) + (~b)*(~x))^((~m) + 1)*sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h))) - 1⨸(2*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~b)*(~g) - (~a)*(~h)))* ∫((((~a) + (~b)*(~x))^((~m) + 1)⨸(sqrt((~c) + (~d)*(~x))*sqrt((~e) + (~f)*(~x))* sqrt((~g) + (~h)*(~x))))* simp((~A)*(2*(~a)^2*(~d)*(~f)*(~h)*((~m) + 1) - 2*(~a)*(~b)*((~m) + 1)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) + (~b)^2*(2*(~m) + 3)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h))) + (~a)*(~C)*((~a)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h)) + 2*(~b)*(~c)*(~e)*(~g)*((~m) + 1)) - 2*((~A)*(~b)*((~a)*(~d)*(~f)*(~h)*((~m) + 1) - (~b)*((~m) + 2)*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h))) - (~C)*((~a)^2*((~d)*(~f)*(~g) + (~d)*(~e)*(~h) + (~c)*(~f)*(~h)) - (~b)^2*(~c)*(~e)*(~g)*((~m) + 1) + (~a)*(~b)*((~m) + 1)*((~d)*(~e)*(~g) + (~c)*(~f)*(~g) + (~c)*(~e)*(~h))))*(~x) + (~d)*(~f)*(~h)*(2*(~m) + 5)*((~A)*(~b)^2 + (~a)^2*(~C))*(~x)^2, (~x)), (~x)) : nothing) + +("1_1_1_7_25", +@rule ∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^ (~!p)*((~!g) + (~!h)*(~x))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~x)) && + poly((~Px), (~x)) && + ext_isinteger((~m), (~n)) ? +∫(ext_expand( (~Px)*((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^(~q), (~x)), (~x)) : nothing) + +("1_1_1_7_26", +@rule ∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^ (~!p)*((~!g) + (~!h)*(~x))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~x)) && + poly((~Px), (~x)) && + eq((~m), -1) ? +poly_remainder((~Px), (~a) + (~b)*(~x), (~x))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^(~q), (~x)) + ∫( poly_quotient((~Px), (~a) + (~b)*(~x), (~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^(~q), (~x)) : nothing) + +("1_1_1_7_27", +@rule ∫((~Px)*((~!a) + (~!b)*(~x))^(~!m)*((~!c) + (~!d)*(~x))^(~!n)*((~!e) + (~!f)*(~x))^ (~!p)*((~!g) + (~!h)*(~x))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~x)) && + poly((~Px), (~x)) ? +poly_remainder((~Px), (~a) + (~b)*(~x), (~x))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^(~q), (~x)) + ∫( poly_quotient((~Px), (~a) + (~b)*(~x), (~x))*((~a) + (~b)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^ (~n)*((~e) + (~f)*(~x))^(~p)*((~g) + (~h)*(~x))^(~q), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.1 (a+b x^2)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.1 (a+b x^2)^p.jl new file mode 100644 index 0000000..262720a --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.1 (a+b x^2)^p.jl @@ -0,0 +1,229 @@ +file_rules = [ +("1_1_2_1_1", +:(∫(((~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~b), (~p), (~x)) ? +(~b)^intpart((~p))*((~b)*(~x)^2)^fracpart((~p))⨸(~x)^(2*fracpart((~p))) * ∫((~x)^(2*(~p)), (~x)) : nothing)) + +("1_1_2_1_2", +:(∫(1/((~a)+(~!b)*(~x)^2)^(3//2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +(~x)⨸((~a)*sqrt((~a)+(~b)*(~x)^2)) : nothing)) + +("1_1_2_1_3", +:(∫(((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + ilt((~p)+3/2, 0) ? +-(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~a)*((~p)+1)) + (2*(~p)+3)⨸(2*(~a)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_1_4", +:(∫(((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~a)+(~b)*(~x)^2)^(~p), (~x)), (~x)) : nothing)) + +("1_1_2_1_5", +:(∫(((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~p), 0) && + ( + ext_isinteger(4*(~p)) || + ext_isinteger(6*(~p)) + ) ? +(~x)*((~a)+(~b)*(~x)^2)^(~p)⨸(2*(~p)+1) + 2*(~a)*(~p)⨸(2*(~p)+1) * ∫(((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) : nothing)) + +("1_1_2_1_6", +:(∫(1/((~a)+(~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)/(~a)) ? +2⨸((~a)^(5⨸4)*rt((~b)⨸(~a), 2))*elliptic_e(1⨸2*atan(rt((~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_2_1_7", +:(∫(1/((~a)+(~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) && + pos((~b)/(~a)) ? +(1+(~b)*(~x)^2⨸(~a))^(1⨸4)⨸((~a)*((~a)+(~b)*(~x)^2)^(1⨸4)) * ∫(1⨸(1+(~b)*(~x)^2⨸(~a))^(5⨸4), (~x)) : nothing)) + +("1_1_2_1_8", +:(∫(1/((~a)+(~!b)*(~x)^2)^(7//6),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +1⨸(((~a) +(~b)*(~x)^2)^(2⨸3)*((~a)⨸((~a)+(~b)*(~x)^2))^(2⨸3)) * int_and_subst(1⨸(1-(~b)*(~x)^2)^(1⨸3), (~x), (~x), (~x)⨸sqrt((~a)+(~b)*(~x)^2), "1_1_2_1_8") : nothing)) + +("1_1_2_1_9", +:(∫(((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + lt((~p), -1) && + ( + ext_isinteger(4*(~p)) || + ext_isinteger(6*(~p)) + ) ? +-(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~a)*((~p)+1)) + (2*(~p)+3)⨸(2*(~a)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_1_10", +:(∫(1/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)/(~b)) && + ( + gt((~a), 0) || + gt((~b), 0) + ) ? +1⨸(rt((~a), 2)*rt((~b), 2))*atan(rt((~b), 2)*(~x)⨸rt((~a), 2)) : nothing)) + +("1_1_2_1_11", +:(∫(1/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)/(~b)) && + ( + lt((~a), 0) || + lt((~b), 0) + ) ? +-1⨸(rt(-(~a), 2)*rt(-(~b), 2))*atan(rt(-(~b), 2)*(~x)⨸rt(-(~a), 2)) : nothing)) + +("1_1_2_1_12", +:(∫(1/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)/(~b)) ? +rt((~a)⨸(~b), 2)⨸(~a)*atan((~x)⨸rt((~a)⨸(~b), 2)) : nothing)) + +("1_1_2_1_13", +:(∫(1/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)/(~b)) && + ( + gt((~a), 0) || + lt((~b), 0) + ) ? +1⨸(rt((~a), 2)*rt(-(~b), 2))*atanh(rt(-(~b), 2)*(~x)⨸rt((~a), 2)) : nothing)) + +("1_1_2_1_14", +:(∫(1/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)/(~b)) && + ( + lt((~a), 0) || + gt((~b), 0) + ) ? +-1⨸(rt(-(~a), 2)*rt((~b), 2))*atanh(rt((~b), 2)*(~x)⨸rt(-(~a), 2)) : nothing)) + +("1_1_2_1_15", +:(∫(1/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)/(~b)) ? +rt(-(~a)⨸(~b), 2)⨸(~a)*atanh((~x)⨸rt(-(~a)⨸(~b), 2)) : nothing)) + +("1_1_2_1_16", +:(∫(1/sqrt((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)) ? +asinh(rt((~b), 2)*(~x)⨸sqrt((~a)))⨸rt((~b), 2) : nothing)) + +("1_1_2_1_17", +:(∫(1/sqrt((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + neg((~b)) ? +asin(rt(-(~b), 2)*(~x)⨸sqrt((~a)))⨸rt(-(~b), 2) : nothing)) + +("1_1_2_1_18", +:(∫(1/sqrt((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + !(gt((~a), 0)) ? +int_and_subst(1⨸(1-(~b)*(~x)^2), (~x), (~x), (~x)⨸sqrt((~a)+(~b)*(~x)^2), "1_1_2_1_18") : nothing)) + +("1_1_2_1_19", +:(∫(1/((~a)+(~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)/(~a)) ? +2*(~x)⨸((~a)+(~b)*(~x)^2)^(1⨸4) - (~a) * ∫(1⨸((~a)+(~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_2_1_20", +:(∫(1/((~a)+(~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + neg((~b)/(~a)) ? +2⨸((~a)^(1⨸4)*rt(-(~b)⨸(~a), 2))*elliptic_e(1⨸2*asin(rt(-(~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_2_1_21", +:(∫(1/((~a)+(~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) ? +(1+(~b)*(~x)^2⨸(~a))^(1⨸4)⨸((~a)+(~b)*(~x)^2)^(1⨸4) * ∫(1⨸(1+(~b)*(~x)^2⨸(~a))^(1⨸4), (~x)) : nothing)) + +("1_1_2_1_22", +:(∫(1/((~a)+(~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)) ? +2*sqrt(-(~b)*(~x)^2⨸(~a))⨸((~b)*(~x)) * int_and_subst((~x)^2⨸sqrt(1-(~x)^4⨸(~a)), (~x), (~x), ((~a)+(~b)*(~x)^2)^(1⨸4), "1_1_2_1_22") : nothing)) + +("1_1_2_1_23", +:(∫(1/((~a)+(~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)/(~a)) ? +2⨸((~a)^(3⨸4)*rt((~b)⨸(~a), 2))*elliptic_f(1⨸2*atan(rt((~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_2_1_24", +:(∫(1/((~a)+(~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + neg((~b)/(~a)) ? +2⨸((~a)^(3⨸4)*rt(-(~b)⨸(~a), 2))*elliptic_f(1⨸2*asin(rt(-(~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_2_1_25", +:(∫(1/((~a)+(~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) ? +(1+(~b)*(~x)^2⨸(~a))^(3⨸4)⨸((~a)+(~b)*(~x)^2)^(3⨸4) * ∫(1⨸(1+(~b)*(~x)^2⨸(~a))^(3⨸4), (~x)) : nothing)) + +("1_1_2_1_26", +:(∫(1/((~a)+(~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)) ? +2*sqrt(-(~b)*(~x)^2⨸(~a))⨸((~b)*(~x)) * int_and_subst(1⨸sqrt(1-(~x)^4⨸(~a)), (~x), (~x), ((~a)+(~b)*(~x)^2)^(1⨸4), "1_1_2_1_26") : nothing)) + +("1_1_2_1_27", +:(∫(1/((~a)+(~!b)*(~x)^2)^(1//3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +3*sqrt((~b)*(~x)^2)⨸(2*(~b)*(~x)) * int_and_subst((~x)⨸sqrt(-(~a)+(~x)^3), (~x), (~x), ((~a)+(~b)*(~x)^2)^(1⨸3), "1_1_2_1_27") : nothing)) + +("1_1_2_1_28", +:(∫(1/((~a)+(~!b)*(~x)^2)^(2//3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +3*sqrt((~b)*(~x)^2)⨸(2*(~b)*(~x)) * int_and_subst(1⨸sqrt(-(~a)+(~x)^3), (~x), (~x), ((~a)+(~b)*(~x)^2)^(1⨸3), "1_1_2_1_28") : nothing)) + +("1_1_2_1_29", +:(∫(1/((~a)+(~!b)*(~x)^2)^(1//6),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +3*(~x)⨸(2*((~a)+(~b)*(~x)^2)^(1⨸6)) - (~a)⨸2 * ∫(1⨸((~a)+(~b)*(~x)^2)^(7⨸6), (~x)) : nothing)) + +("1_1_2_1_30", +:(∫(1/((~a)+(~!b)*(~x)^2)^(5//6),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +1⨸(((~a)⨸((~a)+(~b)*(~x)^2))^(1⨸3)*((~a)+(~b)*(~x)^2)^(1⨸3)) * int_and_subst(1⨸(1-(~b)*(~x)^2)^(2⨸3), (~x), (~x), (~x)⨸sqrt((~a)+(~b)*(~x)^2), "1_1_2_1_30") : nothing)) + +("1_1_2_1_31", +:(∫(((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~p), (~x)) && + !(ext_isinteger(2*(~p))) && + gt((~a), 0) ? +(~a)^(~p)*(~x)*hypergeometric2f1(-(~p), 1⨸2, 1⨸2+1, -(~b)*(~x)^2⨸(~a)) : nothing)) + +("1_1_2_1_32", +:(∫(((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~p), (~x)) && + !(ext_isinteger(2*(~p))) && + !(gt((~a), 0)) ? +(~a)^intpart((~p))*((~a)+(~b)*(~x)^2)^fracpart((~p))⨸(1+(~b)*(~x)^2⨸(~a))^fracpart((~p)) * ∫((1+(~b)*(~x)^2⨸(~a))^(~p), (~x)) : nothing)) + +("1_1_2_1_33", +:(∫(((~!a)+(~!b)*(~v)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~p), (~x)) && + linear((~v), (~x)) && + !eq((~v), (~x)) ? +1⨸ext_coeff((~v), (~x), 1) * int_and_subst(((~a)+(~b)*(~x)^(~n))^(~p), (~x), (~x), (~v), "1_1_2_1_33") : nothing)) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.2 (c x)^m (a+b x^2)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.2 (c x)^m (a+b x^2)^p.jl new file mode 100644 index 0000000..ad430e4 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.2 (c x)^m (a+b x^2)^p.jl @@ -0,0 +1,297 @@ +file_rules = [ +# (* ::Package:: *)(* ::Code:: *) + +("1_1_2_2_1", +:(∫((~x)/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b), (~x)) ? + log((~a)+(~b)*(~x)^2)⨸(2*(~b)) : nothing)) + +("1_1_2_2_2", +:(∫((~x)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~p), (~x)) && + !eq((~p), -1) ? + ((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~b)*((~p)+1)) : nothing)) + +("1_1_2_2_3", +:(∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m),(~p), (~x)) && + eq((~m)+2*(~p)+3, 0) && + !eq((~m), -1) ? + ((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~c)*((~m)+1)) : nothing)) + +("1_1_2_2_4", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~m),(~p), (~x)) && + ext_isinteger(((~m)-1)/2) ? + 1⨸2 * int_and_subst((~x)^(((~m)-1)⨸2)*((~a)+(~b)*(~x))^(~p), (~x), (~x), (~x)^2, "1_1_2_2_4") : nothing)) + +("1_1_2_2_5", +:(∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m), (~x)) && + igt((~p), 0) ? + ∫(ext_expand(((~c)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p), (~x)), (~x)) : nothing)) + +("1_1_2_2_6", +:(∫((~x)^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~m),(~p), (~x)) && + ilt(simplify(((~m)+1)/2+(~p)+1), 0) && + !eq((~m), -1) ? + (~x)^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*((~m)+1)) - (~b)*((~m)+2*((~p)+1)+1)⨸((~a)*((~m)+1)) * ∫((~x)^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_2_7", +:(∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m),(~p), (~x)) && + ilt(simplify(((~m)+1)/2+(~p)+1), 0) && + !eq((~p), -1) ? + -((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~c)*2*((~p)+1)) + ((~m)+2*(~p)+3)⨸((~a)*2*((~p)+1)) * ∫(((~c)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +# # TODO IntBinomialQ is what exactly? +# ("1_1_2_2_8", +# @rule ∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c), (~x)) && +# gt((~p), 0) && +# lt((~m), -1) && +# !(ilt(((~m)+2*(~p)+3)/2, 0)) && +# IntBinomialQ[(~a),(~b),(~c),2,(~m),(~p),(~x)] ? +# ((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)⨸((~c)*((~m)+1)) - 2*(~b)*(~p)⨸((~c)^2*((~m)+1)) * ∫(((~c)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) : nothing) +# +# ("1_1_2_2_9", +# @rule ∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c),(~m), (~x)) && +# gt((~p), 0) && +# !eq((~m)+2*(~p)+1, 0) && +# IntBinomialQ[(~a),(~b),(~c),2,(~m),(~p),(~x)] ? +# ((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)⨸((~c)*((~m)+2*(~p)+1)) + 2*(~a)*(~p)⨸((~m)+2*(~p)+1) * ∫(((~c)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) : nothing) + +("1_1_2_2_10", +:(∫(sqrt((~!c)*(~x))/((~a)+(~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + pos((~b)/(~a)) ? + sqrt((~c)*(~x))*(1+(~a)⨸((~b)*(~x)^2))^(1⨸4)⨸((~b)*((~a)+(~b)*(~x)^2)^(1⨸4)) * ∫(1⨸((~x)^2*(1+(~a)⨸((~b)*(~x)^2))^(5⨸4)), (~x)) : nothing)) + +("1_1_2_2_11", +:(∫(((~!c)*(~x))^(~m)/((~a)+(~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + pos((~b)/(~a)) && + ext_isinteger(2*(~m)) && + gt((~m), 3/2) ? + 2*(~c)*((~c)*(~x))^((~m)-1)⨸((~b)*(2*(~m)-3)*((~a)+(~b)*(~x)^2)^(1⨸4)) - 2*(~a)*(~c)^2*((~m)-1)⨸((~b)*(2*(~m)-3)) * ∫(((~c)*(~x))^((~m)-2)⨸((~a)+(~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_2_2_12", +:(∫(((~!c)*(~x))^(~m)/((~a)+(~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + pos((~b)/(~a)) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? + ((~c)*(~x))^((~m)+1)⨸((~a)*(~c)*((~m)+1)*((~a)+(~b)*(~x)^2)^(1⨸4)) - (~b)*(2*(~m)+1)⨸(2*(~a)*(~c)^2*((~m)+1)) * ∫(((~c)*(~x))^((~m)+2)⨸((~a)+(~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +# ("1_1_2_2_13", +# @rule ∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c), (~x)) && +# lt((~p), -1) && +# gt((~m), 1) && +# !(ilt(((~m)+2*(~p)+3)/2, 0)) && +# IntBinomialQ[(~a),(~b),(~c),2,(~m),(~p),(~x)] ? +# (~c)*((~c)*(~x))^((~m)-1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~b)*((~p)+1)) - (~c)^2*((~m)-1)⨸(2*(~b)*((~p)+1)) * ∫(((~c)*(~x))^((~m)-2)*((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing) + +# ("1_1_2_2_14", +# @rule ∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c),(~m), (~x)) && +# lt((~p), -1) && +# IntBinomialQ[(~a),(~b),(~c),2,(~m),(~p),(~x)] ? +# -((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~a)*(~c)*((~p)+1)) + ((~m)+2*(~p)+3)⨸(2*(~a)*((~p)+1)) * ∫(((~c)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing) + +("1_1_2_2_15", +:(∫((~x)^(~m)/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b), (~x)) && + igt((~m), 3) ? + ∫(polynomial_divide((~x)^(~m), ((~a)+(~b)*(~x)^2), (~x)), (~x)) : nothing)) + +("1_1_2_2_16", +:(∫(sqrt((~c)*(~x))/((~a)+(~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + pos((~b)/(~a)) ? + (~x)*sqrt((~c)*(~x))⨸((~a)+(~b)*(~x)^2)^(1⨸4) - (~a)⨸2 * ∫(sqrt((~c)*(~x))⨸((~a)+(~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_2_2_17", +:(∫(sqrt((~c)*(~x))/((~a)+(~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + neg((~b)/(~a)) ? + (~c)*((~a)+(~b)*(~x)^2)^(3⨸4)⨸((~b)*sqrt((~c)*(~x))) + (~a)*(~c)^2⨸(2*(~b)) * ∫(1⨸(((~c)*(~x))^(3⨸2)*((~a)+(~b)*(~x)^2)^(1⨸4)), (~x)) : nothing)) + +("1_1_2_2_18", +:(∫(1/(((~!c)*(~x))^(3//2)*((~a)+(~!b)*(~x)^2)^(1//4)),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + pos((~b)/(~a)) ? + -2⨸((~c)*sqrt((~c)*(~x))*((~a)+(~b)*(~x)^2)^(1⨸4)) - (~b)⨸(~c)^2 * ∫(sqrt((~c)*(~x))⨸((~a)+(~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_2_2_19", +:(∫(1/(((~!c)*(~x))^(3//2)*((~a)+(~!b)*(~x)^2)^(1//4)),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + neg((~b)/(~a)) ? + sqrt((~c)*(~x))*(1+(~a)⨸((~b)*(~x)^2))^(1⨸4)⨸((~c)^2*((~a)+(~b)*(~x)^2)^(1⨸4)) * ∫(1⨸((~x)^2*(1+(~a)⨸((~b)*(~x)^2))^(1⨸4)), (~x)) : nothing)) + +("1_1_2_2_20", +:(∫(sqrt((~x))/sqrt((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b), (~x)) && + gt(-(~b)/(~a), 0) && + gt((~a), 0) ? + -2⨸(sqrt((~a))*(-(~b)⨸(~a))^(3⨸4)) * int_and_subst(sqrt(1-2*(~x)^2)⨸sqrt(1-(~x)^2), (~x), (~x), sqrt(1-sqrt(-(~b)⨸(~a))*(~x))⨸sqrt(2), "1_1_2_2_20") : nothing)) + +("1_1_2_2_21", +:(∫(sqrt((~x))/sqrt((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b), (~x)) && + gt(-(~b)/(~a), 0) && + !(gt((~a), 0)) ? + sqrt(1+(~b)*(~x)^2⨸(~a))⨸sqrt((~a)+(~b)*(~x)^2) * ∫(sqrt((~x))⨸sqrt(1+(~b)*(~x)^2⨸(~a)), (~x)) : nothing)) + +("1_1_2_2_22", +:(∫(sqrt((~c)*(~x))/sqrt((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c), (~x)) && + gt(-(~b)/(~a), 0) ? + sqrt((~c)*(~x))⨸sqrt((~x)) * ∫(sqrt((~x))⨸sqrt((~a)+(~b)*(~x)^2), (~x)) : nothing)) + +# ("1_1_2_2_23", +# @rule ∫(((~!c)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c),(~p), (~x)) && +# gt((~m), 2-1) && +# !eq((~m)+2*(~p)+1, 0) && +# IntBinomialQ[(~a),(~b),(~c),2,(~m),(~p),(~x)] ? +# (~c)*((~c)*(~x))^((~m)-1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~b)*((~m)+2*(~p)+1)) - (~a)*(~c)^2*((~m)-1)⨸((~b)*((~m)+2*(~p)+1)) * ∫(((~c)*(~x))^((~m)-2)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing) + +("1_1_2_2_24", +:(∫(((~!c)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m),(~p), (~x)) && + sumsimpler((~m), -2) && + !eq((~m)+2*(~p)+1, 0) && + ilt(simplify(((~m)+1)/2+(~p)), 0) ? + (~c)*((~c)*(~x))^((~m)-1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~b)*((~m)+2*(~p)+1)) - (~a)*(~c)^2*((~m)-1)⨸((~b)*((~m)+2*(~p)+1)) * ∫(((~c)*(~x))^((~m)-2)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +# ("1_1_2_2_25", +# @rule ∫(((~!c)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c),(~p), (~x)) && +# lt((~m), -1) && +# IntBinomialQ[(~a),(~b),(~c),2,(~m),(~p),(~x)] ? +# ((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~c)*((~m)+1)) - (~b)*((~m)+2*(~p)+3)⨸((~a)*(~c)^2*((~m)+1)) * ∫(((~c)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing) + +("1_1_2_2_26", +:(∫(((~!c)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m),(~p), (~x)) && + sumsimpler((~m), 2) && + ilt(simplify(((~m)+1)/2+(~p)), 0) ? + ((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~c)*((~m)+1)) - (~b)*((~m)+2*(~p)+3)⨸((~a)*(~c)^2*((~m)+1)) * ∫(((~c)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +# ("1_1_2_2_27", +# @rule ∫(((~!c)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c),(~p), (~x)) && +# isfraction((~m)) && +# IntBinomialQ[(~a),(~b),(~c),2,(~m),(~p),(~x)] ? +# ext_den((~m))⨸(~c) * int_and_subst((~x)^(ext_den((~m))*((~m)+1)-1)*((~a)+(~b)*(~x)^(2*ext_den((~m)))⨸(~c)^2)^(~p), (~x), (~x), ((~c)*(~x))^(1⨸ext_den((~m))), "1_1_2_2_27") : nothing) + +("1_1_2_2_28", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b), (~x)) && + lt(-1, (~p),0) && + !eq((~p), -1/2) && + ext_isinteger((~m),(~p)+((~m)+1)/2) ? + (~a)^((~p)+((~m)+1)⨸2) * int_and_subst((~x)^(~m)⨸(1-(~b)*(~x)^2)^((~p)+((~m)+1)⨸2+1), (~x), (~x), (~x)⨸((~a)+(~b)*(~x)^2)^(1⨸2), "1_1_2_2_28") : nothing)) + +("1_1_2_2_29", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b), (~x)) && + lt(-1, (~p),0) && + !eq((~p), -1/2) && + ext_isinteger((~m)) && + lt(ext_den((~p)+((~m)+1)/2), ext_den((~p))) ? + ((~a)⨸((~a)+(~b)*(~x)^2))^((~p)+((~m)+1)⨸2)*((~a)+(~b)*(~x)^2)^((~p)+((~m)+1)⨸2) * int_and_subst((~x)^(~m)⨸(1-(~b)*(~x)^2)^((~p)+((~m)+1)⨸2+1), (~x), (~x), (~x)⨸((~a)+(~b)*(~x)^2)^(1⨸2), "1_1_2_2_29") : nothing)) + +("1_1_2_2_30", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~m), (~x)) && + eq(((~m)+1)/2+(~p), 0) && + gt((~p), 0) ? + (~x)^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)⨸((~m)+1) - 2*(~b)*(~p)⨸((~m)+1) * ∫((~x)^((~m)+2)*((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) : nothing)) + +("1_1_2_2_31", +:(∫(((~c)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m), (~x)) && + eq(((~m)+1)/2+(~p), 0) && + gt((~p), 0) ? + (~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m)) * ∫((~x)^(~m)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_2_32", +:(∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m), (~x)) && + ext_isinteger((~p)+simplify(((~m)+1)/2)) && + gt((~p), 0) && + !eq((~m)+2*(~p)+1, 0) ? + ((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)⨸((~c)*((~m)+2*(~p)+1)) + 2*(~a)*(~p)⨸((~m)+2*(~p)+1) * ∫(((~c)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) : nothing)) + +("1_1_2_2_33", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~m),(~x)) && + ext_isinteger((~p)+simplify(((~m)+1)/2)) && + lt(-1,(~p),0) ? +ext_den((~p))*(~a)^((~p)+simplify(((~m)+1)⨸2))⨸2 * int_and_subst((~x)^(ext_den((~p))*simplify(((~m)+1)⨸2)-1)⨸(1-(~b)*(~x)^ext_den((~p)))^((~p)+simplify(((~m)+1)⨸2)+1), (~x), (~x), (~x)^(2⨸ext_den((~p)))⨸((~a)+(~b)*(~x)^2)^(1⨸ext_den((~p))), "1_1_2_2_33") : nothing)) + +("1_1_2_2_34", +:(∫(((~c)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m), (~x)) && + ext_isinteger((~p)+simplify(((~m)+1)/2)) && + lt(-1, (~p),0) ? + (~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m)) * ∫((~x)^(~m)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_2_35", +:(∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m), (~x)) && + ext_isinteger((~p)+simplify(((~m)+1)/2)) && + lt((~p), -1) ? + -((~c)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~c)*2*((~p)+1)) + ((~m)+2*((~p)+1)+1)⨸((~a)*2*((~p)+1)) * ∫(((~c)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_2_36", +:(∫((~x)^(~!m)/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~m), (~x)) && + isfraction(((~m)+1)/2) && + sumsimpler((~m), -2) ? + (~x)^((~m)-1)⨸((~b)*((~m)-1)) - (~a)⨸(~b) * ∫((~x)^((~m)-2)⨸((~a)+(~b)*(~x)^2), (~x)) : nothing)) + +("1_1_2_2_37", +:(∫((~x)^(~m)/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~m), (~x)) && + isfraction(((~m)+1)/2) && + sumsimpler((~m), 2) ? + (~x)^((~m)+1)⨸((~a)*((~m)+1)) - (~b)⨸(~a) * ∫((~x)^simplify((~m)+2)⨸((~a)+(~b)*(~x)^2), (~x)) : nothing)) + +("1_1_2_2_38", +:(∫(((~c)*(~x))^(~m)/((~a)+(~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m), (~x)) && + isfraction(((~m)+1)/2) && + ( + sumsimpler((~m), 2) || + sumsimpler((~m), -2) + ) ? + (~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m)) * ∫((~x)^(~m)⨸((~a)+(~b)*(~x)^2), (~x)) : nothing)) + +# this is commented because otherwise triggers on x^2*(1/(1+x^2))^2 +# while rule 1_1_3_2_19 is more appropriate +# ("1_1_2_2_39", +# @rule ∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a),(~b),(~c),(~m),(~p), (~x)) && +# !(igt((~p), 0)) && +# ( +# ilt((~p), 0) || +# gt((~a), 0) +# ) ? +# (~a)^(~p)*((~c)*(~x))^((~m)+1)⨸((~c)*((~m)+1))*hypergeometric2f1(-(~p), ((~m)+1)⨸2, ((~m)+1)⨸2+1, -(~b)*(~x)^2⨸(~a)) : nothing) + +("1_1_2_2_40", +:(∫(((~!c)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~m),(~p), (~x)) && + !(igt((~p), 0)) && + !( + ilt((~p), 0) || + gt((~a), 0) + ) ? + (~a)^intpart((~p))*((~a)+(~b)*(~x)^2)^fracpart((~p))⨸(1+(~b)*(~x)^2⨸(~a))^fracpart((~p)) * ∫(((~c)*(~x))^(~m)*(1+(~b)*(~x)^2⨸(~a))^(~p), (~x)) : nothing)) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.3 (a+b x^2)^p (c+d x^2)^q.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.3 (a+b x^2)^p (c+d x^2)^q.jl new file mode 100644 index 0000000..d803d1a --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.3 (a+b x^2)^p (c+d x^2)^q.jl @@ -0,0 +1,471 @@ +file_rules = [ +# (* ::Package:: *) + +("1_1_2_3_1", +:(∫((~!u)*((~!b)*(~x)^(~n))^(~p)*((~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~b),(~d),(~n),(~p),(~q),(~x)) ? +(~b)^intpart((~p))*(~d)^intpart((~q))*((~b)*(~x)^(~n))^fracpart((~p))*((~d)*(~x)^(~n))^fracpart((~q))⨸(~x)^((~n)*(fracpart((~p))+fracpart((~q)))) * ∫((~u)*(~x)^((~n)*((~p)+(~q))), (~x)) : nothing)) + +("1_1_2_3_2", +:(∫((~!u)*((~a)+(~!b)*(~x)^(~n))^(~!p)*((~c)+(~!d)*(~x)^(~n))^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~n),(~p),(~q),(~x)) && + eq((~b)*(~c)-(~a)*(~d),0) && + ext_isinteger((~p)) && + !( + ext_isinteger((~q)) && + simpler((~a)+(~b)*(~x)^(~n),(~c)+(~d)*(~x)^(~n)) + ) ? +((~b)⨸(~d))^(~p) * ∫((~u)*((~c)+(~d)*(~x)^(~n))^((~p)+(~q)), (~x)) : nothing)) + +("1_1_2_3_3", +:(∫((~!u)*((~a)+(~!b)*(~x)^(~n))^(~p)*((~c)+(~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~n),(~p),(~q),(~x)) && + eq((~b)*(~c)-(~a)*(~d),0) && + gt((~b)/(~d),0) && + !(simpler((~a)+(~b)*(~x)^(~n),(~c)+(~d)*(~x)^(~n))) ? +((~b)⨸(~d))^(~p) * ∫((~u)*((~c)+(~d)*(~x)^(~n))^((~p)+(~q)), (~x)) : nothing)) + +("1_1_2_3_4", +:(∫((~!u)*((~a)+(~!b)*(~x)^(~n))^(~p)*((~c)+(~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~n),(~p),(~q),(~x)) && + eq((~b)*(~c)-(~a)*(~d),0) && + !(simpler((~a)+(~b)*(~x)^(~n),(~c)+(~d)*(~x)^(~n))) ? +((~a)+(~b)*(~x)^(~n))^(~p)⨸((~c)+(~d)*(~x)^(~n))^(~p) * ∫((~u)*((~c)+(~d)*(~x)^(~n))^((~p)+(~q)), (~x)) : nothing)) + +("1_1_2_3_5", +:(∫(((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~!p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + ( + ext_isinteger((~p)) || + gt((~a),0) && + gt((~c),0) + ) ? +∫(((~a)*(~c)+(~b)*(~d)*(~x)^4)^(~p), (~x)) : nothing)) + +("1_1_2_3_6", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + gt((~p),0) ? +(~x)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~p)⨸(4*(~p)+1) + 4*(~a)*(~c)*(~p)⨸(4*(~p)+1) * ∫(((~a)+(~b)*(~x)^2)^((~p)-1)*((~c)+(~d)*(~x)^2)^((~p)-1), (~x)) : nothing)) + +("1_1_2_3_7", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + lt((~p),-1) ? +-(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1)⨸(4*(~a)*(~c)*((~p)+1)) + (4*(~p)+5)⨸(4*(~a)*(~c)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_3_8", +:(∫(1/(sqrt((~a)+(~!b)*(~x)^2)*sqrt((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + gt((~a),0) && + gt((~d),0) ? +1⨸sqrt(2*(~a)*(~d))*elliptic_f(asin(sqrt(2*(~d))*(~x)⨸sqrt((~c)+(~d)*(~x)^2)),1⨸2) : nothing)) + +("1_1_2_3_9", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + gt((~a),0) && + lt((~c),0) ? +((~c)+(~d)*(~x)^2)^fracpart((~p))⨸((-1)^intpart((~p))*(-(~c)-(~d)*(~x)^2)^fracpart((~p))) * ∫((-(~a)*(~c)-(~b)*(~d)*(~x)^4)^(~p), (~x)) : nothing)) + +("1_1_2_3_10", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + !(ext_isinteger((~p))) ? +((~a)+(~b)*(~x)^2)^fracpart((~p))*((~c)+(~d)*(~x)^2)^fracpart((~p))⨸((~a)*(~c)+(~b)*(~d)*(~x)^4)^fracpart((~p)) * ∫(((~a)*(~c)+(~b)*(~d)*(~x)^4)^(~p), (~x)) : nothing)) + +("1_1_2_3_11", +:(∫(((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + igt((~p),0) && + igt((~q),0) ? +∫(ext_expand(((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)),(~x)) : nothing)) + +("1_1_2_3_12", +:(∫(1/(sqrt((~a)+(~!b)*(~x)^2)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) ? +int_and_subst(1⨸((~c)-((~b)*(~c)-(~a)*(~d))*(~x)^2), (~x), (~x), (~x)⨸sqrt((~a)+(~b)*(~x)^2), "1_1_2_3_12") : nothing)) + +("1_1_2_3_13", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq(2*((~p)+(~q)+1)+1,0) && + gt((~q),0) && + !eq((~p),-1) ? +-(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)⨸(2*(~a)*((~p)+1)) - (~c)*(~q)⨸((~a)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1), (~x)) : nothing)) + +("1_1_2_3_14", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq(2*((~p)+(~q)+1)+1,0) && + ilt((~p),0) ? +(~a)^(~p)*(~x)⨸((~c)^((~p)+1)*sqrt((~c)+(~d)*(~x)^2))*hypergeometric2f1(1⨸2,-(~p),3⨸2,-((~b)*(~c)-(~a)*(~d))*(~x)^2⨸((~a)*((~c)+(~d)*(~x)^2))) : nothing)) + +("1_1_2_3_15", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq(2*((~p)+(~q)+1)+1,0) ? +(~x)*((~a)+(~b)*(~x)^2)^(~p)⨸((~c)*((~c)*((~a)+(~b)*(~x)^2)⨸((~a)*((~c)+(~d)*(~x)^2)))^(~p)*((~c)+(~d)*(~x)^2)^(1⨸2+(~p)))* hypergeometric2f1(1⨸2,-(~p),3⨸2,-((~b)*(~c)-(~a)*(~d))*(~x)^2⨸((~a)*((~c)+(~d)*(~x)^2))) : nothing)) + +("1_1_2_3_16", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq(2*((~p)+(~q)+2)+1,0) && + eq((~a)*(~d)*((~p)+1)+(~b)*(~c)*((~q)+1),0) ? +(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸((~a)*(~c)) : nothing)) + +("1_1_2_3_17", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq(2*((~p)+(~q)+2)+1,0) && + ( + lt((~p),-1) || + !(lt((~q),-1)) + ) && + !eq((~p),-1) ? +-(~b)*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸(2*(~a)*((~p)+1)*((~b)*(~c)-(~a)*(~d))) + ((~b)*(~c)+2*((~p)+1)*((~b)*(~c)-(~a)*(~d)))⨸(2*(~a)*((~p)+1)*((~b)*(~c)-(~a)*(~d))) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q), (~x)) : nothing)) + +("1_1_2_3_18", +:(∫(((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq((~a)*(~d)-(~b)*(~c)*(2*(~p)+3),0) ? +(~c)*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(~a) : nothing)) + +("1_1_2_3_19", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + ( + lt((~p),-1) || + ilt(1/2+(~p),0) + ) ? +-((~b)*(~c)-(~a)*(~d))*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~a)*(~b)*((~p)+1)) - ((~a)*(~d)-(~b)*(~c)*(2*(~p)+3))⨸(2*(~a)*(~b)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_3_20", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + !eq(2*(~p)+3,0) ? +(~d)*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~b)*(2*(~p)+3)) - ((~a)*(~d)-(~b)*(~c)*(2*(~p)+3))⨸((~b)*(2*(~p)+3)) * ∫(((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_3_21", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + igt((~p),0) && + ilt((~q),0) && + ge((~p),-(~q)) ? +∫(polynomial_divide(((~a)+(~b)*(~x)^2)^(~p),((~c)+(~d)*(~x)^2)^(-(~q)),(~x)), (~x)) : nothing)) + +("1_1_2_3_22", +:(∫(((~a)+(~!b)*(~x)^2)^(~!p)/((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + gt((~p),0) && + ( + eq((~p),1/2) || + eq(ext_den((~p)),4) || + eq((~p),2/3) && + eq((~b)*(~c)+3*(~a)*(~d),0) + ) ? +(~b)⨸(~d) * ∫(((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) - ((~b)*(~c)-(~a)*(~d))⨸(~d) * ∫(((~a)+(~b)*(~x)^2)^((~p)-1)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_2_3_23", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)/((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + lt((~p),-1) && + eq(ext_den((~p)),4) && + ( + eq((~p),-5/4) || + eq((~p),-7/4) + ) ? +(~b)⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~a)+(~b)*(~x)^2)^(~p), (~x)) - (~d)⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_2_3_24", +:(∫(1/(((~a)+(~!b)*(~x)^2)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) ? +(~b)⨸((~b)*(~c)-(~a)*(~d)) * ∫(1⨸((~a)+(~b)*(~x)^2), (~x)) - (~d)⨸((~b)*(~c)-(~a)*(~d)) * ∫(1⨸((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_2_3_25", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(1//3)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq((~b)*(~c)+3*(~a)*(~d),0) && + pos((~b)/(~a)) ? +rt((~b)⨸(~a),2)*atanh(sqrt(3)⨸(rt((~b)⨸(~a),2)*(~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) + rt((~b)⨸(~a),2)*atanh(sqrt(3)*((~a)^(1⨸3)-2^(1⨸3)*((~a)+(~b)*(~x)^2)^(1⨸3))⨸((~a)^(1⨸3)*rt((~b)⨸(~a),2)*(~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) + rt((~b)⨸(~a),2)*atan(rt((~b)⨸(~a),2)*(~x))⨸(6*2^(2⨸3)*(~a)^(1⨸3)*(~d)) - rt((~b)⨸(~a),2)*atan(((~a)^(1⨸3)*rt((~b)⨸(~a),2)*(~x))⨸((~a)^(1⨸3)+2^(1⨸3)*((~a)+(~b)*(~x)^2)^(1⨸3)))⨸(2*2^(2⨸3)*(~a)^(1⨸3)*(~d)) : nothing)) + +("1_1_2_3_26", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(1//3)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq((~b)*(~c)+3*(~a)*(~d),0) && + neg((~b)/(~a)) ? +rt(-(~b)⨸(~a),2)*atan(sqrt(3)⨸(rt(-(~b)⨸(~a),2)*(~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) + rt(-(~b)⨸(~a),2)*atan(sqrt(3)*((~a)^(1⨸3)-2^(1⨸3)*((~a)+(~b)*(~x)^2)^(1⨸3))⨸((~a)^(1⨸3)*rt(-(~b)⨸(~a),2)*(~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) - rt(-(~b)⨸(~a),2)*atanh(rt(-(~b)⨸(~a),2)*(~x))⨸(6*2^(2⨸3)*(~a)^(1⨸3)*(~d)) + rt(-(~b)⨸(~a),2)*atanh(((~a)^(1⨸3)*rt(-(~b)⨸(~a),2)*(~x))⨸((~a)^(1⨸3)+2^(1⨸3)*((~a)+(~b)*(~x)^2)^(1⨸3)))⨸(2*2^(2⨸3)*(~a)^(1⨸3)*(~d)) : nothing)) + +("1_1_2_3_27", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(1//3)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq((~b)*(~c)-9*(~a)*(~d),0) && + pos((~b)/(~a)) ? +rt((~b)⨸(~a),2)*atan(rt((~b)⨸(~a),2)*(~x)⨸3)⨸(12*rt((~a),3)*(~d)) + rt((~b)⨸(~a),2)*atan((rt((~a),3)-((~a)+(~b)*(~x)^2)^(1⨸3))^2⨸(3*rt((~a),3)^2*rt((~b)⨸(~a),2)*(~x)))⨸(12*rt((~a),3)*(~d)) - rt((~b)⨸(~a),2)*atanh((sqrt(3)*(rt((~a),3)-((~a)+(~b)*(~x)^2)^(1⨸3)))⨸(rt((~a),3)*rt((~b)⨸(~a),2)*(~x)))⨸(4*sqrt(3)*rt((~a),3)*(~d)) : nothing)) + +("1_1_2_3_28", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(1//3)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq((~b)*(~c)-9*(~a)*(~d),0) && + neg((~b)/(~a)) ? +-rt(-(~b)⨸(~a),2)*atanh(rt(-(~b)⨸(~a),2)*(~x)⨸3)⨸(12*rt((~a),3)*(~d)) + rt(-(~b)⨸(~a),2)*atanh((rt((~a),3)-((~a)+(~b)*(~x)^2)^(1⨸3))^2⨸(3*rt((~a),3)^2*rt(-(~b)⨸(~a),2)*(~x)))⨸(12*rt((~a),3)*(~d)) - rt(-(~b)⨸(~a),2)*atan((sqrt(3)*(rt((~a),3)-((~a)+(~b)*(~x)^2)^(1⨸3)))⨸(rt((~a),3)*rt(-(~b)⨸(~a),2)*(~x)))⨸(4*sqrt(3)*rt((~a),3)*(~d)) : nothing)) + +("1_1_2_3_29", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(1//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) && + pos((~b)^2/(~a)) ? +-(~b)⨸(2*(~a)*(~d)*rt((~b)^2⨸(~a),4))*atan(((~b)+rt((~b)^2⨸(~a),4)^2*sqrt((~a)+(~b)*(~x)^2))⨸(rt((~b)^2⨸(~a),4)^3*(~x)*((~a)+(~b)*(~x)^2)^(1⨸4))) - (~b)⨸(2*(~a)*(~d)*rt((~b)^2⨸(~a),4))*atanh(((~b)-rt((~b)^2⨸(~a),4)^2*sqrt((~a)+(~b)*(~x)^2))⨸(rt((~b)^2⨸(~a),4)^3*(~x)*((~a)+(~b)*(~x)^2)^(1⨸4))) : nothing)) + +("1_1_2_3_30", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(1//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) && + neg((~b)^2/(~a)) ? +(~b)⨸(2*sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a),4))*atan(rt(-(~b)^2⨸(~a),4)*(~x)⨸(sqrt(2)*((~a)+(~b)*(~x)^2)^(1⨸4))) + (~b)⨸(2*sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a),4))*atanh(rt(-(~b)^2⨸(~a),4)*(~x)⨸(sqrt(2)*((~a)+(~b)*(~x)^2)^(1⨸4))) : nothing)) + +# (* Int[1/((a_+b_.*x_^2)^(1/4)*(c_+d_.*x_^2)),x_Symbol] := With[{q=Rt[-b^2/a,4]}, b/(2*Sqrt[2]*a*d*q)*ArcTan[q*x/(Sqrt[2]*(a+b*x^2)^(1/4))] + b/(4*Sqrt[2]*a*d*q)*Log[(Sqrt[2]*q*x+2*(a+b*x^2)^(1/4))/(Sqrt[2]*q*x-2*(a+b*x^2)^(1/4))]] /;FreeQ[{a,b,c,d},x] && EqQ[b*c-2*a*d,0] && NegQ[b^2/a] *) + +("1_1_2_3_31", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(1//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) ? +2*sqrt(-(~b)*(~x)^2⨸(~a))⨸(~x) * int_and_subst((~x)^2⨸(sqrt(1-(~x)^4⨸(~a))*((~b)*(~c)-(~a)*(~d)+(~d)*(~x)^4)), (~x), (~x), ((~a)+(~b)*(~x)^2)^(1⨸4), "1_1_2_3_31") : nothing)) + +("1_1_2_3_32", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(3//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) ? +1⨸(~c) * ∫(1⨸((~a)+(~b)*(~x)^2)^(3⨸4), (~x)) - (~d)⨸(~c) * ∫((~x)^2⨸(((~a)+(~b)*(~x)^2)^(3⨸4)*((~c)+(~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_2_3_33", +:(∫(1/(((~a)+(~!b)*(~x)^2)^(3//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) ? +sqrt(-(~b)*(~x)^2⨸(~a))⨸(2*(~x)) * int_and_subst(1⨸(sqrt(-(~b)*(~x)⨸(~a))*((~a)+(~b)*(~x))^(3⨸4)*((~c)+(~d)*(~x))), (~x), (~x), (~x)^2, "1_1_2_3_33") : nothing)) + +("1_1_2_3_34", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/((~c)+(~!d)*(~x)^2)^(3//2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + pos((~b)/(~a)) && + pos((~d)/(~c)) ? +sqrt((~a)+(~b)*(~x)^2)⨸((~c)*rt((~d)⨸(~c),2)*sqrt((~c)+(~d)*(~x)^2)*sqrt((~c)*((~a)+(~b)*(~x)^2)⨸((~a)*((~c)+(~d)*(~x)^2))))*elliptic_e(atan(rt((~d)⨸(~c),2)*(~x)),1-(~b)*(~c)⨸((~a)*(~d))) : nothing)) + +# (* Int[Sqrt[a_+b_.*x_^2]/(c_+d_.*x_^2)^(3/2),x_Symbol] := a*Sqrt[c+d*x^2]*Sqrt[(c*(a+b*x^2))/(a*(c+d*x^2))]/(c^2*Rt[d/c,2]*Sqrt[a+b*x^2])*EllipticE[ArcTan[Rt[d/c,2]*x],1-b*c/(a*d)] /;FreeQ[{a,b,c,d},x] && PosQ[b/a] && PosQ[d/c] *) + +# ("1_1_2_3_35", +# @rule ∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# lt(0,(~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),2,(~p),(~q),(~x)] ? +# -(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)⨸(2*(~a)*((~p)+1)) + 1⨸(2*(~a)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~c)*(2*(~p)+3)+(~d)*(2*((~p)+(~q)+1)+1)*(~x)^2,(~x)), (~x)) : nothing) + +# ("1_1_2_3_36", +# @rule ∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# gt((~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),2,(~p),(~q),(~x)] ? +# ((~a)*(~d)-(~c)*(~b))*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)⨸(2*(~a)*(~b)*((~p)+1)) - 1⨸(2*(~a)*(~b)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-2)*simplify((~c)*((~a)*(~d)-(~c)*(~b)*(2*(~p)+3))+(~d)*((~a)*(~d)*(2*((~q)-1)+1)-(~b)*(~c)*(2*((~p)+(~q))+1))*(~x)^2,(~x)), (~x)) : nothing) + +# ("1_1_2_3_37", +# @rule ∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# !( +# !(ext_isinteger((~p))) && +# ext_isinteger((~q)) && +# lt((~q),-1) +# ) && +# IntBinomialQ[(~a),(~b),(~c),(~d),2,(~p),(~q),(~x)] ? +# -(~b)*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸(2*(~a)*((~p)+1)*((~b)*(~c)-(~a)*(~d))) + 1⨸(2*(~a)*((~p)+1)*((~b)*(~c)-(~a)*(~d))) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)*simplify((~b)*(~c)+2*((~p)+1)*((~b)*(~c)-(~a)*(~d))+(~d)*(~b)*(2*((~p)+(~q)+2)+1)*(~x)^2,(~x)), (~x)) : nothing) + +("1_1_2_3_38", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + ext_isinteger((~p),(~q)) && + gt((~p)+(~q),0) ? +∫(ext_expand(((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)),(~x)) : nothing)) + +# ("1_1_2_3_39", +# @rule ∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),1) && +# !eq(2*((~p)+(~q))+1,0) && +# !(igt((~p),1)) && +# IntBinomialQ[(~a),(~b),(~c),(~d),2,(~p),(~q),(~x)] ? +# (~d)*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)⨸((~b)*(2*((~p)+(~q))+1)) + 1⨸((~b)*(2*((~p)+(~q))+1)) * ∫(((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^((~q)-2)*simplify((~c)*((~b)*(~c)*(2*((~p)+(~q))+1)-(~a)*(~d))+(~d)*((~b)*(~c)*(2*((~p)+2*(~q)-1)+1)-(~a)*(~d)*(2*((~q)-1)+1))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_3_40", +# @rule ∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),0) && +# gt((~p),0) && +# IntBinomialQ[(~a),(~b),(~c),(~d),2,(~p),(~q),(~x)] ? +# (~x)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q)⨸(2*((~p)+(~q))+1) + 2⨸(2*((~p)+(~q))+1) * ∫(((~a)+(~b)*(~x)^2)^((~p)-1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~a)*(~c)*((~p)+(~q))+((~q)*((~b)*(~c)-(~a)*(~d))+(~a)*(~d)*((~p)+(~q)))*(~x)^2,(~x)), (~x)) : nothing) + +("1_1_2_3_41", +:(∫(1/(sqrt((~a)+(~!b)*(~x)^2)*sqrt((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + pos((~d)/(~c)) && + pos((~b)/(~a)) && + !(simpler(rt((~b)/(~a),2),rt((~d)/(~c),2))) ? +sqrt((~a)+(~b)*(~x)^2)⨸((~a)*rt((~d)⨸(~c),2)*sqrt((~c)+(~d)*(~x)^2)*sqrt((~c)*((~a)+(~b)*(~x)^2)⨸((~a)*((~c)+(~d)*(~x)^2))))*elliptic_f(atan(rt((~d)⨸(~c),2)*(~x)),1-(~b)*(~c)⨸((~a)*(~d))) : nothing)) + +# (* Int[1/(Sqrt[a_+b_.*x_^2]*Sqrt[c_+d_.*x_^2]),x_Symbol] := Sqrt[c+d*x^2]*Sqrt[c*(a+b*x^2)/(a*(c+d*x^2))]/(c*Rt[d/c,2]*Sqrt[a+b*x^2])*EllipticF[ArcTan[Rt[d/c,2]*x],1-b*c/(a*d)] /;FreeQ[{a,b,c,d},x] && PosQ[d/c] && PosQ[b/a] && Not[SimplerSqrtQ[b/a,d/c]] *) + +("1_1_2_3_42", +:(∫(1/(sqrt((~a)+(~!b)*(~x)^2)*sqrt((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + neg((~d)/(~c)) && + gt((~c),0) && + gt((~a),0) && + !( + neg((~b)/(~a)) && + simpler(rt(-(~b)/(~a),2),rt(-(~d)/(~c),2)) + ) ? +1⨸(sqrt((~a))*sqrt((~c))*rt(-(~d)⨸(~c),2))*elliptic_f(asin(rt(-(~d)⨸(~c),2)*(~x)),(~b)*(~c)⨸((~a)*(~d))) : nothing)) + +("1_1_2_3_43", +:(∫(1/(sqrt((~a)+(~!b)*(~x)^2)*sqrt((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + neg((~d)/(~c)) && + gt((~c),0) && + gt((~a)-(~b)*(~c)/(~d),0) ? +-1⨸(sqrt((~c))*rt(-(~d)⨸(~c),2)*sqrt((~a)-(~b)*(~c)⨸(~d)))*elliptic_f(acos(rt(-(~d)⨸(~c),2)*(~x)),(~b)*(~c)⨸((~b)*(~c)-(~a)*(~d))) : nothing)) + +("1_1_2_3_44", +:(∫(1/(sqrt((~a)+(~!b)*(~x)^2)*sqrt((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !(gt((~c),0)) ? +sqrt(1+(~d)⨸(~c)*(~x)^2)⨸sqrt((~c)+(~d)*(~x)^2) * ∫(1⨸(sqrt((~a)+(~b)*(~x)^2)*sqrt(1+(~d)⨸(~c)*(~x)^2)), (~x)) : nothing)) + +("1_1_2_3_45", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + pos((~d)/(~c)) && + pos((~b)/(~a)) ? +(~a) * ∫(1⨸(sqrt((~a)+(~b)*(~x)^2)*sqrt((~c)+(~d)*(~x)^2)), (~x)) + (~b) * ∫((~x)^2⨸(sqrt((~a)+(~b)*(~x)^2)*sqrt((~c)+(~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_2_3_46", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + pos((~d)/(~c)) && + eq((~b)*(~c)+(~a)*(~d),0) && + lt((~a),0) && + gt((~c),0) ? +(~x)*sqrt((~a)+(~b)*(~x)^2)⨸sqrt((~c)+(~d)*(~x)^2) + sqrt(-2*(~a))*(~x)⨸sqrt((~d)*(~x)^2)*elliptic_e(asin(sqrt(2*(~c))⨸sqrt((~c)+(~d)*(~x)^2)),1⨸2) : nothing)) + +("1_1_2_3_47", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + pos((~d)/(~c)) && + neg((~b)/(~a)) ? +(~b)⨸(~d) * ∫(sqrt((~c)+(~d)*(~x)^2)⨸sqrt((~a)+(~b)*(~x)^2), (~x)) - ((~b)*(~c)-(~a)*(~d))⨸(~d) * ∫(1⨸(sqrt((~a)+(~b)*(~x)^2)*sqrt((~c)+(~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_2_3_48", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + neg((~d)/(~c)) && + gt((~c),0) && + gt((~a),0) ? +sqrt((~a))⨸(sqrt((~c))*rt(-(~d)⨸(~c),2))*elliptic_e(asin(rt(-(~d)⨸(~c),2)*(~x)),(~b)*(~c)⨸((~a)*(~d))) : nothing)) + +("1_1_2_3_49", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + neg((~d)/(~c)) && + gt((~c),0) && + gt((~a)-(~b)*(~c)/(~d),0) ? +-sqrt((~a)-(~b)*(~c)⨸(~d))⨸(sqrt((~c))*rt(-(~d)⨸(~c),2))*elliptic_e(acos(rt(-(~d)⨸(~c),2)*(~x)),(~b)*(~c)⨸((~b)*(~c)-(~a)*(~d))) : nothing)) + +("1_1_2_3_50", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + !( + lt((~a)*(~c),0) && + gt((~a)*(~b),0) + ) ? +(~a)*sqrt(1-(~b)^2*(~x)^4⨸(~a)^2)⨸(sqrt((~a)+(~b)*(~x)^2)*sqrt((~c)+(~d)*(~x)^2)) * ∫(sqrt(1+(~b)*(~x)^2⨸(~a))⨸sqrt(1-(~b)*(~x)^2⨸(~a)), (~x)) : nothing)) + +("1_1_2_3_51", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + neg((~d)/(~c)) && + gt((~c),0) && + !(gt((~a),0)) ? +sqrt((~a)+(~b)*(~x)^2)⨸sqrt(1+(~b)⨸(~a)*(~x)^2) * ∫(sqrt(1+(~b)⨸(~a)*(~x)^2)⨸sqrt((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_2_3_52", +:(∫(sqrt((~a)+(~!b)*(~x)^2)/sqrt((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + neg((~d)/(~c)) && + !(gt((~c),0)) ? +sqrt(1+(~d)⨸(~c)*(~x)^2)⨸sqrt((~c)+(~d)*(~x)^2) * ∫(sqrt((~a)+(~b)*(~x)^2)⨸sqrt(1+(~d)⨸(~c)*(~x)^2), (~x)) : nothing)) + +("1_1_2_3_53", +:(∫(((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + igt((~p),0) ? +∫(ext_expand(((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)),(~x)) : nothing)) + +# (* Int[(a_+b_.*x_^2)^p_.*(c_+d_.*x_^2)^q_.,x_Symbol] := Sqrt[x^2]/(2*x) * Subst[Int[(a+b*x)^p*(c+d*x)^q/Sqrt[x],x],x,x^2] /;FreeQ[{a,b,c,d,p,q},x] && NeQ[b*c-a*d,0] *) + +("1_1_2_3_54", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + ( + ext_isinteger((~p)) || + gt((~a),0) + ) && + ( + ext_isinteger((~q)) || + gt((~c),0) + ) ? +(~a)^(~p)*(~c)^(~q)*(~x)*appell_f1(1⨸2,-(~p),-(~q),3⨸2,-(~b)*(~x)^2⨸(~a),-(~d)*(~x)^2⨸(~c)) : nothing)) + +("1_1_2_3_55", +:(∫(((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + !( + ext_isinteger((~p)) || + gt((~a),0) + ) ? +(~a)^intpart((~p))*((~a)+(~b)*(~x)^2)^fracpart((~p))⨸(1+(~b)*(~x)^2⨸(~a))^fracpart((~p)) * ∫((1+(~b)*(~x)^2⨸(~a))^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)) : nothing)) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.4 (e x)^m (a+b x^2)^p (c+d x^2)^q.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.4 (e x)^m (a+b x^2)^p (c+d x^2)^q.jl new file mode 100644 index 0000000..2feefe3 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.2 Quadratic/1.1.2.4 (e x)^m (a+b x^2)^p (c+d x^2)^q.jl @@ -0,0 +1,578 @@ +file_rules = [ +# (* ::Package:: *) + +("1_1_2_4_1", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~!p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + ( + ext_isinteger((~p)) || + gt((~a),0) && + gt((~c),0) + ) ? +∫(((~e)*(~x))^(~m)*((~a)*(~c)+(~b)*(~d)*(~x)^4)^(~p), (~x)) : nothing)) + +("1_1_2_4_2", +:(∫((~x)^3*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) ? +((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1)⨸(4*(~b)*(~d)*((~p)+1)) : nothing)) + +("1_1_2_4_3", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + eq((~m)+4*(~p)+5,0) ? +-((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1)⨸(4*(~a)*(~c)*(~e)*((~p)+1)) : nothing)) + +("1_1_2_4_4", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + ext_isinteger(((~m)-1)/2) ? +1⨸2 * int_and_subst((~x)^(((~m)-1)⨸2)*((~a)+(~b)*(~x))^(~p)*((~c)+(~d)*(~x))^(~p), (~x), (~x), (~x)^2, "1_1_2_4_4") : nothing)) + +("1_1_2_4_5", +:(∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + gt((~p),0) && + lt((~m),-1) ? +((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~p)⨸((~e)*((~m)+1)) - 4*(~b)*(~d)*(~p)⨸((~e)^4*((~m)+1)) * ∫(((~e)*(~x))^((~m)+4)*((~a)+(~b)*(~x)^2)^((~p)-1)*((~c)+(~d)*(~x)^2)^((~p)-1), (~x)) : nothing)) + +("1_1_2_4_6", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + gt((~p),0) && + !eq((~m)+4*(~p)+1,0) && + ext_isinteger(2*(~m)) ? +((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~p)⨸((~e)*((~m)+4*(~p)+1)) + 4*(~a)*(~c)*(~p)⨸((~m)+4*(~p)+1) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)-1)*((~c)+(~d)*(~x)^2)^((~p)-1), (~x)) : nothing)) + +("1_1_2_4_7", +:(∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + lt((~p),-1) && + gt((~m),3) ? +(~e)^3*((~e)*(~x))^((~m)-3)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1)⨸(4*(~b)*(~d)*((~p)+1)) - (~e)^4*((~m)-3)⨸(4*(~b)*(~d)*((~p)+1)) * ∫(((~e)*(~x))^((~m)-4)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_4_8", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + lt((~p),-1) && + ext_isinteger(2*(~m)) ? +-((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1)⨸(4*(~a)*(~c)*(~e)*((~p)+1)) + ((~m)+4*(~p)+5)⨸(4*(~a)*(~c)*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_4_9", +:(∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + lt((~m),-1) ? +((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~p)+1)⨸((~a)*(~c)*(~e)*((~m)+1)) - (~b)*(~d)*((~m)+4*(~p)+5)⨸((~a)*(~c)*(~e)^4*((~m)+1)) * ∫(((~e)*(~x))^((~m)+4)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_4_10", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~p),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && + eq((~b)*(~c)+(~a)*(~d),0) && + !(ext_isinteger((~p))) ? +((~a)+(~b)*(~x)^2)^fracpart((~p))*((~c)+(~d)*(~x)^2)^fracpart((~p))⨸((~a)*(~c)+(~b)*(~d)*(~x)^4)^fracpart((~p)) * ∫(((~e)*(~x))^(~m)*((~a)*(~c)+(~b)*(~d)*(~x)^4)^(~p), (~x)) : nothing)) + +("1_1_2_4_11", +:(∫((~x)^(~!m)*((~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~b),(~c),(~d),(~m),(~p),(~q),(~x)) && + ext_isinteger(((~m)-1)/2) ? +1⨸(2*(~b)^(((~m)-1)⨸2)) * int_and_subst(((~b)*(~x))^((~p)+((~m)-1)⨸2)*((~c)+(~d)*(~x))^(~q), (~x), (~x), (~x)^2, "1_1_2_4_11") : nothing)) + +("1_1_2_4_12", +:(∫(((~!e)*(~x))^(~!m)*((~!b)*(~x)^2.)^(~p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~b),(~c),(~d),(~e),(~m),(~p),(~q),(~x)) && + ( + ext_isinteger((~m)) || + gt((~e),0) + ) ? +(~e)^(~m)*(~b)^intpart((~p))*((~b)*(~x)^2)^fracpart((~p))⨸(~x)^(2*fracpart((~p))) * ∫((~x)^((~m)+2*(~p))*((~c)+(~d)*(~x)^2)^(~q), (~x)) : nothing)) + +("1_1_2_4_13", +:(∫(((~e)*(~x))^(~m)*((~!b)*(~x)^2.)^(~p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~b),(~c),(~d),(~e),(~m),(~p),(~q),(~x)) && + !(ext_isinteger((~m))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m)) * ∫((~x)^(~m)*((~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)) : nothing)) + +("1_1_2_4_14", +:(∫((~x)/(((~a)+(~!b)*(~x)^2)^(1//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) && + pos((~a)) ? +-1⨸(sqrt(2)*rt((~a),4)*(~d))*atan((rt((~a),4)^2-sqrt((~a)+(~b)*(~x)^2))⨸(sqrt(2)*rt((~a),4)*((~a)+(~b)*(~x)^2)^(1⨸4))) - 1⨸(sqrt(2)*rt((~a),4)*(~d))*atanh((rt((~a),4)^2+sqrt((~a)+(~b)*(~x)^2))⨸(sqrt(2)*rt((~a),4)*((~a)+(~b)*(~x)^2)^(1⨸4))) : nothing)) + +("1_1_2_4_15", +:(∫((~x)^(~m)/(((~a)+(~!b)*(~x)^2)^(1//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) && + ext_isinteger((~m)) && + ( + pos((~a)) || + ext_isinteger((~m)/2) + ) ? +∫(ext_expand((~x)^(~m)⨸(((~a)+(~b)*(~x)^2)^(1⨸4)*((~c)+(~d)*(~x)^2)), (~x)),(~x)) : nothing)) + +("1_1_2_4_16", +:(∫((~x)^2/(((~a)+(~!b)*(~x)^2)^(3//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) && + pos((~b)^2/(~a)) ? +-(~b)⨸((~a)*(~d)*rt((~b)^2⨸(~a),4)^3)*atan(((~b)+rt((~b)^2⨸(~a),4)^2*sqrt((~a)+(~b)*(~x)^2))⨸(rt((~b)^2⨸(~a),4)^3*(~x)*((~a)+(~b)*(~x)^2)^(1⨸4))) + (~b)⨸((~a)*(~d)*rt((~b)^2⨸(~a),4)^3)*atanh(((~b)-rt((~b)^2⨸(~a),4)^2*sqrt((~a)+(~b)*(~x)^2))⨸(rt((~b)^2⨸(~a),4)^3*(~x)*((~a)+(~b)*(~x)^2)^(1⨸4))) : nothing)) + +("1_1_2_4_17", +:(∫((~x)^2/(((~a)+(~!b)*(~x)^2)^(3//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) && + neg((~b)^2/(~a)) ? +-(~b)⨸(sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a),4)^3)*atan((rt(-(~b)^2⨸(~a),4)*(~x))⨸(sqrt(2)*((~a)+(~b)*(~x)^2)^(1⨸4))) + (~b)⨸(sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a),4)^3)*atanh((rt(-(~b)^2⨸(~a),4)*(~x))⨸(sqrt(2)*((~a)+(~b)*(~x)^2)^(1⨸4))) : nothing)) + +("1_1_2_4_18", +:(∫((~x)^(~m)/(((~a)+(~!b)*(~x)^2)^(3//4)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + eq((~b)*(~c)-2*(~a)*(~d),0) && + ext_isinteger((~m)) && + ( + pos((~a)) || + ext_isinteger((~m)/2) + ) ? +∫(ext_expand((~x)^(~m)⨸(((~a)+(~b)*(~x)^2)^(3⨸4)*((~c)+(~d)*(~x)^2)), (~x)),(~x)) : nothing)) + +("1_1_2_4_19", +:(∫((~x)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) ? +1⨸2 * int_and_subst(((~a)+(~b)*(~x))^(~p)*((~c)+(~d)*(~x))^(~q), (~x), (~x), (~x)^2, "1_1_2_4_19") : nothing)) + +("1_1_2_4_20", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + ext_isinteger(((~m)-1)/2) ? +1⨸2 * int_and_subst((~x)^(((~m)-1)⨸2)*((~a)+(~b)*(~x))^(~p)*((~c)+(~d)*(~x))^(~q), (~x), (~x), (~x)^2, "1_1_2_4_20") : nothing)) + +("1_1_2_4_21", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + igt((~p),0) && + igt((~q),0) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)),(~x)) : nothing)) + +("1_1_2_4_22", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq((~a)*(~d)*((~m)+1)-(~b)*(~c)*((~m)+2*(~p)+3),0) && + !eq((~m),-1) ? +(~c)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~e)*((~m)+1)) : nothing)) + +("1_1_2_4_23", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq((~m)+2*(~p)+3,0) && + lt((~p),-1) ? +((~b)*(~c)-(~a)*(~d))*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~b)*(~e)*((~m)+1)) + (~d)⨸(~b) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_4_24", +:(∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + eq(simplify((~m)+2*(~p)+3),0) && + !eq((~m),-1) ? +(~c)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~e)*((~m)+1)) + (~d)⨸(~e)^2 * ∫(((~e)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_4_25", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + lt((~m),-1) && + !(ilt((~p),-1)) ? +(~c)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~e)*((~m)+1)) + ((~a)*(~d)*((~m)+1)-(~b)*(~c)*((~m)+2*(~p)+3))⨸((~a)*(~e)^2*((~m)+1)) * ∫(((~e)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_4_26", +:(∫((~x)^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + lt((~p),-1) && + igt((~m)/2,0) && + ( + ext_isinteger((~p)) || + eq((~m)+2*(~p)+1,0) + ) ? +(-(~a))^((~m)⨸2-1)*((~b)*(~c)-(~a)*(~d))*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~b)^((~m)⨸2+1)*((~p)+1)) + 1⨸(2*(~b)^((~m)⨸2+1)*((~p)+1)) * ∫(((~a)+(~b)*(~x)^2)^((~p)+1)* expand_to_sum(2*(~b)*((~p)+1)*(~x)^2*together(((~b)^((~m)⨸2)*(~x)^((~m)-2)*((~c)+(~d)*(~x)^2)-(-(~a))^((~m)⨸2-1)*((~b)*(~c)-(~a)*(~d)))⨸((~a)+(~b)*(~x)^2))-(-(~a))^((~m)⨸2-1)*((~b)*(~c)-(~a)*(~d)), (~x)),(~x)) : nothing)) + +("1_1_2_4_27", +:(∫((~x)^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + lt((~p),-1) && + ilt((~m)/2,0) && + ( + ext_isinteger((~p)) || + eq((~m)+2*(~p)+1,0) + ) ? +(-(~a))^((~m)⨸2-1)*((~b)*(~c)-(~a)*(~d))*(~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~b)^((~m)⨸2+1)*((~p)+1)) + 1⨸(2*(~b)^((~m)⨸2+1)*((~p)+1)) * ∫((~x)^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)* expand_to_sum(2*(~b)*((~p)+1)*together(((~b)^((~m)⨸2)*((~c)+(~d)*(~x)^2)-(-(~a))^((~m)⨸2-1)*((~b)*(~c)-(~a)*(~d))*(~x)^(-(~m)+2))⨸((~a)+(~b)*(~x)^2))- (-(~a))^((~m)⨸2-1)*((~b)*(~c)-(~a)*(~d))*(~x)^(-(~m)), (~x)),(~x)) : nothing)) + +("1_1_2_4_28", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + lt((~p),-1) && + ( + !(ext_isinteger((~p)+1/2)) && + !eq((~p),-5/4) || + !(isrational((~m))) || + ilt((~p)+1/2,0) && + le(-1,(~m),-2*((~p)+1)) + ) ? +-((~b)*(~c)-(~a)*(~d))*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~a)*(~b)*(~e)*((~p)+1)) - ((~a)*(~d)*((~m)+1)-(~b)*(~c)*((~m)+2*(~p)+3))⨸(2*(~a)*(~b)*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1), (~x)) : nothing)) + +("1_1_2_4_29", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + !eq((~m)+2*(~p)+3,0) ? +(~d)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~b)*(~e)*((~m)+2*(~p)+3)) - ((~a)*(~d)*((~m)+1)-(~b)*(~c)*((~m)+2*(~p)+3))⨸((~b)*((~m)+2*(~p)+3)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p), (~x)) : nothing)) + +("1_1_2_4_30", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)/((~c)+(~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + igt((~p),0) && + ( + ext_isinteger((~m)) || + igt(2*((~m)+1),0) || + !(isrational((~m))) + ) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p)⨸((~c)+(~d)*(~x)^2), (~x)),(~x)) : nothing)) + +("1_1_2_4_31", +:(∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^2,(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + lt((~m),-1) ? +(~c)^2*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~a)*(~e)*((~m)+1)) - 1⨸((~a)*(~e)^2*((~m)+1)) * ∫(((~e)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p)*simplify(2*(~b)*(~c)^2*((~p)+1)+(~c)*((~b)*(~c)-2*(~a)*(~d))*((~m)+1)-(~a)*(~d)^2*((~m)+1)*(~x)^2,(~x)), (~x)) : nothing)) + +("1_1_2_4_32", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^2,(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + lt((~p),-1) ? +-((~b)*(~c)-(~a)*(~d))^2*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸(2*(~a)*(~b)^2*(~e)*((~p)+1)) + 1⨸(2*(~a)*(~b)^2*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*simplify(((~b)*(~c)-(~a)*(~d))^2*((~m)+1)+2*(~b)^2*(~c)^2*((~p)+1)+2*(~a)*(~b)*(~d)^2*((~p)+1)*(~x)^2,(~x)), (~x)) : nothing)) + +("1_1_2_4_33", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^2,(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + !eq((~m)+2*(~p)+5,0) ? +(~d)^2*((~e)*(~x))^((~m)+3)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~b)*(~e)^3*((~m)+2*(~p)+5)) + 1⨸((~b)*((~m)+2*(~p)+5)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p)*simplify((~b)*(~c)^2*((~m)+2*(~p)+5)-(~d)*((~a)*(~d)*((~m)+3)-2*(~b)*(~c)*((~m)+2*(~p)+5))*(~x)^2,(~x)), (~x)) : nothing)) + +("1_1_2_4_34", +:(∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + isfraction((~m)) && + ext_isinteger((~p)) ? +ext_den((~m))⨸(~e) * int_and_subst((~x)^(ext_den((~m))*((~m)+1)-1)*((~a)+(~b)*(~x)^(ext_den((~m))*2)⨸(~e)^2)^(~p)*((~c)+(~d)*(~x)^(ext_den((~m))*2)⨸(~e)^2)^(~q), (~x), (~x), ((~e)*(~x))^(1⨸ext_den((~m))), "1_1_2_4_34") : nothing)) + +# ("1_1_2_4_35", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# gt((~q),0) && +# gt((~m),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# (~e)*((~e)*(~x))^((~m)-1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)⨸(2*(~b)*((~p)+1)) - (~e)^2⨸(2*(~b)*((~p)+1)) * ∫(((~e)*(~x))^((~m)-2)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~c)*((~m)-1)+(~d)*((~m)+2*(~q)-1)*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_36", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# gt((~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# -((~b)*(~c)-(~a)*(~d))*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)⨸(2*(~a)*(~b)*(~e)*((~p)+1)) + 1⨸(2*(~a)*(~b)*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-2)* simplify((~c)*(2*(~b)*(~c)*((~p)+1)+((~b)*(~c)-(~a)*(~d))*((~m)+1))+(~d)*(2*(~b)*(~c)*((~p)+1)+((~b)*(~c)-(~a)*(~d))*((~m)+2*(~q)-1))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_37", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# lt(0,(~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# -((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)⨸(2*(~a)*(~e)*((~p)+1)) + 1⨸(2*(~a)*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~c)*((~m)+2*(~p)+3)+(~d)*((~m)+2*(~p)+2*(~q)+3)*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_38", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# gt((~m),3) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# -(~a)*(~e)^3*((~e)*(~x))^((~m)-3)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸(2*(~b)*((~b)*(~c)-(~a)*(~d))*((~p)+1)) + (~e)^4⨸(2*(~b)*((~b)*(~c)-(~a)*(~d))*((~p)+1)) * ∫(((~e)*(~x))^((~m)-4)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)* simplify((~a)*(~c)*((~m)-3)+((~a)*(~d)*((~m)+2*(~q)-1)+2*(~b)*(~c)*((~p)+1))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_39", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# gt((~m),1) && +# le((~m),3) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# (~e)*((~e)*(~x))^((~m)-1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸(2*((~b)*(~c)-(~a)*(~d))*((~p)+1)) - (~e)^2⨸(2*((~b)*(~c)-(~a)*(~d))*((~p)+1)) * ∫(((~e)*(~x))^((~m)-2)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)*simplify((~c)*((~m)-1)+(~d)*((~m)+2*(~p)+2*(~q)+3)*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_40", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# -(~b)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸(2*(~a)*(~e)*((~b)*(~c)-(~a)*(~d))*((~p)+1)) + 1⨸(2*(~a)*((~b)*(~c)-(~a)*(~d))*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)*simplify((~b)*(~c)*((~m)+1)+2*((~b)*(~c)-(~a)*(~d))*((~p)+1)+(~b)*(~d)*((~m)+2*(~p)+2*(~q)+5)*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_41", +# @rule ∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),0) && +# lt((~m),-1) && +# gt((~p),0) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# ((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q)⨸((~e)*((~m)+1)) - 2⨸((~e)^2*((~m)+1)) * ∫(((~e)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^((~p)-1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~b)*(~c)*(~p)+(~a)*(~d)*(~q)+(~b)*(~d)*((~p)+(~q))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_42", +# @rule ∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),1) && +# lt((~m),-1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# (~c)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)⨸((~a)*(~e)*((~m)+1)) - 1⨸((~a)*(~e)^2*((~m)+1)) * ∫(((~e)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^((~q)-2)* simplify((~c)*((~b)*(~c)-(~a)*(~d))*((~m)+1)+2*(~c)*((~b)*(~c)*((~p)+1)+(~a)*(~d)*((~q)-1))+(~d)*(((~b)*(~c)-(~a)*(~d))*((~m)+1)+2*(~b)*(~c)*((~p)+(~q)))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_43", +# @rule ∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt(0,(~q),1) && +# lt((~m),-1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# ((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)⨸((~a)*(~e)*((~m)+1)) - 1⨸((~a)*(~e)^2*((~m)+1)) * ∫(((~e)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^((~q)-1)* simplify((~b)*(~c)*((~m)+1)+2*((~b)*(~c)*((~p)+1)+(~a)*(~d)*(~q))+(~d)*((~b)*((~m)+1)+2*(~b)*((~p)+(~q)+1))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_44", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),0) && +# gt((~p),0) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# ((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q)⨸((~e)*((~m)+2*((~p)+(~q))+1)) + 2⨸((~m)+2*((~p)+(~q))+1) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)-1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~a)*(~c)*((~p)+(~q))+((~q)*((~b)*(~c)-(~a)*(~d))+(~a)*(~d)*((~p)+(~q)))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_45", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# (~d)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)⨸((~b)*(~e)*((~m)+2*((~p)+(~q))+1)) + 1⨸((~b)*((~m)+2*((~p)+(~q))+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^((~q)-2)* simplify((~c)*(((~b)*(~c)-(~a)*(~d))*((~m)+1)+2*(~b)*(~c)*((~p)+(~q)))+((~d)*((~b)*(~c)-(~a)*(~d))*((~m)+1)+2*(~d)*((~q)-1)*((~b)*(~c)-(~a)*(~d))+2*(~b)*(~c)*(~d)*((~p)+(~q)))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_46", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),0) && +# gt((~m),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# (~e)*((~e)*(~x))^((~m)-1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)⨸((~b)*((~m)+2*((~p)+(~q))+1)) - (~e)^2⨸((~b)*((~m)+2*((~p)+(~q))+1)) * ∫(((~e)*(~x))^((~m)-2)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~a)*(~c)*((~m)-1)+((~a)*(~d)*((~m)-1)-2*(~q)*((~b)*(~c)-(~a)*(~d)))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_47", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~m),3) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# (~e)^3*((~e)*(~x))^((~m)-3)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸((~b)*(~d)*((~m)+2*((~p)+(~q))+1)) - (~e)^4⨸((~b)*(~d)*((~m)+2*((~p)+(~q))+1)) * ∫(((~e)*(~x))^((~m)-4)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q)*simplify((~a)*(~c)*((~m)-3)+((~a)*(~d)*((~m)+2*(~q)-1)+(~b)*(~c)*((~m)+2*(~p)-1))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_48", +# @rule ∫(((~!e)*(~x))^(~m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~p),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~m),-1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# ((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸((~a)*(~c)*(~e)*((~m)+1)) - 1⨸((~a)*(~c)*(~e)^2*((~m)+1)) * ∫(((~e)*(~x))^((~m)+2)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q)*simplify(((~b)*(~c)+(~a)*(~d))*((~m)+3)+2*((~b)*(~c)*(~p)+(~a)*(~d)*(~q))+(~b)*(~d)*((~m)+2*(~p)+2*(~q)+5)*(~x)^2,(~x)), (~x)) : nothing) + +("1_1_2_4_49", +:(∫(((~!e)*(~x))^(~!m)/(((~a)+(~!b)*(~x)^2)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + le(2,(~m),3) ? +-(~a)*(~e)^2⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~e)*(~x))^((~m)-2)⨸((~a)+(~b)*(~x)^2), (~x)) + (~c)*(~e)^2⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~e)*(~x))^((~m)-2)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_2_4_50", +:(∫(((~!e)*(~x))^(~!m)/(((~a)+(~!b)*(~x)^2)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) ? +(~b)⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~e)*(~x))^(~m)⨸((~a)+(~b)*(~x)^2), (~x)) - (~d)⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~e)*(~x))^(~m)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +# ("1_1_2_4_51", +# @rule ∫(((~!e)*(~x))^(~m)*((~c)+(~!d)*(~x)^2)^(~!q)/((~a)+(~!b)*(~x)^2),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# le(2,(~m),3) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,-1,(~q),(~x)] ? +# (~e)^2⨸(~b) * ∫(((~e)*(~x))^((~m)-2)*((~c)+(~d)*(~x)^2)^(~q), (~x)) - (~a)*(~e)^2⨸(~b) * ∫(((~e)*(~x))^((~m)-2)*((~c)+(~d)*(~x)^2)^(~q)⨸((~a)+(~b)*(~x)^2), (~x)) : nothing) +# +# ("1_1_2_4_52", +# @rule ∫((~x)*((~a)+(~!b)*(~x)^2)^(~p)/((~c)+(~!d)*(~x)^2),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~p),0) && +# IntBinomialQ[(~a),(~b),(~c),(~d),1,1,2,(~p),-1,(~x)] ? +# (~b)⨸(~d) * ∫((~x)*((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) - ((~b)*(~c)-(~a)*(~d))⨸(~d) * ∫((~x)*((~a)+(~b)*(~x)^2)^((~p)-1)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing) +# +# ("1_1_2_4_53", +# @rule ∫((~x)*((~a)+(~!b)*(~x)^2)^(~p)/((~c)+(~!d)*(~x)^2),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),1,1,2,(~p),-1,(~x)] ? +# (~b)⨸((~b)*(~c)-(~a)*(~d)) * ∫((~x)*((~a)+(~b)*(~x)^2)^((~p)-1), (~x)) - (~d)⨸((~b)*(~c)-(~a)*(~d)) * ∫((~x)*((~a)+(~b)*(~x)^2)^((~p)+1)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing) + +("1_1_2_4_54", +:(∫((~x)^2/(sqrt((~a)+(~!b)*(~x)^2)*sqrt((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + pos((~b)/(~a)) && + pos((~d)/(~c)) && + !(simpler(rt((~b)/(~a),2),rt((~d)/(~c),2))) ? +(~x)*sqrt((~a)+(~b)*(~x)^2)⨸((~b)*sqrt((~c)+(~d)*(~x)^2)) - (~c)⨸(~b) * ∫(sqrt((~a)+(~b)*(~x)^2)⨸((~c)+(~d)*(~x)^2)^(3⨸2), (~x)) : nothing)) + +("1_1_2_4_55", +:(∫((~x)^2/(sqrt((~a)+(~!b)*(~x)^2)*sqrt((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + !(simpler(rt(-(~b)/(~a),2),rt(-(~d)/(~c),2))) ? +1⨸(~b) * ∫(sqrt((~a)+(~b)*(~x)^2)⨸sqrt((~c)+(~d)*(~x)^2), (~x)) - (~a)⨸(~b) * ∫(1⨸(sqrt((~a)+(~b)*(~x)^2)*sqrt((~c)+(~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_2_4_56", +:(∫((~x)^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~x)) && + isrational((~m),(~p)) && + ext_isinteger((~p)+((~m)+1)/2,(~q)) && + lt(-1,(~p),0) ? +ext_den((~p))*(~a)^((~p)+((~m)+1)⨸2)⨸2 * int_and_subst((~x)^(ext_den((~p))*((~m)+1)⨸2-1)*((~c)-((~b)*(~c)-(~a)*(~d))*(~x)^ext_den((~p)))^(~q)⨸(1-(~b)*(~x)^ext_den((~p)))^((~p)+(~q)+((~m)+1)⨸2+1), (~x), (~x), (~x)^(2⨸ext_den((~p)))⨸((~a)+(~b)*(~x)^2)^(1⨸ext_den((~p))), "1_1_2_4_56") : nothing)) + +# ("1_1_2_4_57", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# gt((~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# -((~b)*(~c)-(~a)*(~d))*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)⨸((~a)*(~b)*(~e)*2*((~p)+1)) + 1⨸((~a)*(~b)*2*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-2)* simplify((~c)*((~b)*(~c)*2*((~p)+1)+((~b)*(~c)-(~a)*(~d))*((~m)+1))+(~d)*((~b)*(~c)*2*((~p)+1)+((~b)*(~c)-(~a)*(~d))*((~m)+2*((~q)-1)+1))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_58", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# lt(0,(~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# -((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)⨸((~a)*(~e)*2*((~p)+1)) + 1⨸((~a)*2*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~c)*((~m)+2*((~p)+1)+1)+(~d)*((~m)+2*((~p)+(~q)+1)+1)*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_59", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~q),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# lt((~p),-1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# -(~b)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)+1)⨸((~a)*(~e)*2*((~b)*(~c)-(~a)*(~d))*((~p)+1)) + 1⨸((~a)*2*((~b)*(~c)-(~a)*(~d))*((~p)+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^(~q)*simplify((~b)*(~c)*((~m)+1)+2*((~b)*(~c)-(~a)*(~d))*((~p)+1)+(~d)*(~b)*((~m)+2*((~p)+(~q)+2)+1)*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_60", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),0) && +# gt((~p),0) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# ((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q)⨸((~e)*((~m)+2*((~p)+(~q))+1)) + 2⨸((~m)+2*((~p)+(~q))+1) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^((~p)-1)*((~c)+(~d)*(~x)^2)^((~q)-1)*simplify((~a)*(~c)*((~p)+(~q))+((~q)*((~b)*(~c)-(~a)*(~d))+(~a)*(~d)*((~p)+(~q)))*(~x)^2,(~x)), (~x)) : nothing) +# +# ("1_1_2_4_61", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) => +# !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~x)) && +# !eq((~b)*(~c)-(~a)*(~d),0) && +# gt((~q),1) && +# IntBinomialQ[(~a),(~b),(~c),(~d),(~e),(~m),2,(~p),(~q),(~x)] ? +# (~d)*((~e)*(~x))^((~m)+1)*((~a)+(~b)*(~x)^2)^((~p)+1)*((~c)+(~d)*(~x)^2)^((~q)-1)⨸((~b)*(~e)*((~m)+2*((~p)+(~q))+1)) + 1⨸((~b)*((~m)+2*((~p)+(~q))+1)) * ∫(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^((~q)-2)* simplify((~c)*(((~b)*(~c)-(~a)*(~d))*((~m)+1)+(~b)*(~c)*2*((~p)+(~q)))+((~d)*((~b)*(~c)-(~a)*(~d))*((~m)+1)+(~d)*2*((~q)-1)*((~b)*(~c)-(~a)*(~d))+(~b)*(~c)*(~d)*2*((~p)+(~q)))*(~x)^2,(~x)), (~x)) : nothing) + +("1_1_2_4_62", +:(∫((~x)^(~m)/(((~a)+(~!b)*(~x)^2)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + ( + eq((~m),2) || + eq((~m),3) + ) ? +-(~a)⨸((~b)*(~c)-(~a)*(~d)) * ∫((~x)^((~m)-2)⨸((~a)+(~b)*(~x)^2), (~x)) + (~c)⨸((~b)*(~c)-(~a)*(~d)) * ∫((~x)^((~m)-2)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_2_4_63", +:(∫(((~!e)*(~x))^(~!m)/(((~a)+(~!b)*(~x)^2)*((~c)+(~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) ? +(~b)⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~e)*(~x))^(~m)⨸((~a)+(~b)*(~x)^2), (~x)) - (~d)⨸((~b)*(~c)-(~a)*(~d)) * ∫(((~e)*(~x))^(~m)⨸((~c)+(~d)*(~x)^2), (~x)) : nothing)) + +("1_1_2_4_64", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + igt((~p),-2) && + ( + igt((~q),-2) || + eq((~q),-3) && + ext_isinteger(((~m)-1)/2) + ) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~a)+(~b)*(~x)^2)^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)),(~x)) : nothing)) + +("1_1_2_4_65", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~!p)*((~c)+(~!d)*(~x)^2)^(~!q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + ext_isinteger(simplify((~m)+2*(~p))) && + !(ext_isinteger((~m))) ? +((~e)*(~x))^(~m)⨸(2*(~x)*((~x)^2)^(simplify(((~m)+1)⨸2)-1)) * int_and_subst((~x)^(simplify(((~m)+1)⨸2)-1)*((~a)+(~b)*(~x))^(~p)*((~c)+(~d)*(~x))^(~q), (~x), (~x), (~x)^2, "1_1_2_4_65") : nothing)) + +("1_1_2_4_66", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + !eq((~m),-1) && + !eq((~m),1) && + ( + ext_isinteger((~p)) || + gt((~a),0) + ) && + ( + ext_isinteger((~q)) || + gt((~c),0) + ) ? +(~a)^(~p)*(~c)^(~q)*((~e)*(~x))^((~m)+1)⨸((~e)*((~m)+1))*appell_f1(((~m)+1)⨸2,-(~p),-(~q),1+((~m)+1)⨸2,-(~b)*(~x)^2⨸(~a),-(~d)*(~x)^2⨸(~c)) : nothing)) + +("1_1_2_4_67", +:(∫(((~!e)*(~x))^(~!m)*((~a)+(~!b)*(~x)^2)^(~p)*((~c)+(~!d)*(~x)^2)^(~q),(~x)) ) => :( + !contains_var((~a),(~b),(~c),(~d),(~e),(~m),(~p),(~q),(~x)) && + !eq((~b)*(~c)-(~a)*(~d),0) && + !eq((~m),-1) && + !eq((~m),1) && + !( + ext_isinteger((~p)) || + gt((~a),0) + ) ? +(~a)^intpart((~p))*((~a)+(~b)*(~x)^2)^fracpart((~p))⨸(1+(~b)*(~x)^2⨸(~a))^fracpart((~p)) * ∫(((~e)*(~x))^(~m)*(1+(~b)*(~x)^2⨸(~a))^(~p)*((~c)+(~d)*(~x)^2)^(~q), (~x)) : nothing)) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.1 (a+b x^n)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.1 (a+b x^n)^p.jl new file mode 100644 index 0000000..5eb5c5c --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.1 (a+b x^n)^p.jl @@ -0,0 +1,528 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.1 (a+b x^n)^p *) +("1_1_3_1_1", +:(∫(((~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~b), (~n), (~p), (~x)) ? +(~b)^intpart((~p))*((~b)*(~x)^(~n))^fracpart((~p))⨸(~x)^((~n)*fracpart((~p)))* ∫((~x)^((~n)*(~p)), (~x)) : nothing)) + +("1_1_3_1_2", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~p), (~x)) && + isfraction((~n)) && + ext_isinteger(1/(~n)) ? +1⨸(~n)*int_and_subst((~x)^(1⨸(~n) - 1)*((~a) + (~b)*(~x))^(~p), (~x), (~x), (~x)^(~n), "1_1_3_1_2") : nothing)) + +("1_1_3_1_3", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~p), (~x)) && + eq(1/(~n) + (~p) + 1, 0) ? +(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸(~a) : nothing)) + +("1_1_3_1_4", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~p), (~x)) && + ilt(simplify(1/(~n) + (~p) + 1), 0) && + !eq((~p), -1) ? +-(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~n)*((~p) + 1)) + ((~n)*((~p) + 1) + 1)⨸((~a)*(~n)*((~p) + 1))*∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_1_5", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + lt((~n), 0) && + ext_isinteger((~p)) ? +∫((~x)^((~n)*(~p))*((~b) + (~a)*(~x)^(-(~n)))^(~p), (~x)) : nothing)) + +("1_1_3_1_6", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n), 0) && + igt((~p), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing)) + +("1_1_3_1_7", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n), 0) && + gt((~p), 0) && + ( + ext_isinteger(2*(~p)) || + eq((~n), 2) && + ext_isinteger(4*(~p)) || + eq((~n), 2) && + ext_isinteger(3*(~p)) || + lt(ext_den((~p) + 1/(~n)), ext_den((~p))) + ) ? +(~x)*((~a) + (~b)*(~x)^(~n))^(~p)⨸((~n)*(~p) + 1) + (~a)*(~n)*(~p)⨸((~n)*(~p) + 1)*∫(((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_1_8", +:(∫(1/((~a) + (~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)/(~a)) ? +2⨸((~a)^(5⨸4)*rt((~b)⨸(~a), 2))*elliptic_e(1⨸2*atan(rt((~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_3_1_9", +:(∫(1/((~a) + (~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) && + pos((~b)/(~a)) ? +(1 + (~b)*(~x)^2⨸(~a))^(1⨸4)⨸((~a)*((~a) + (~b)*(~x)^2)^(1⨸4))* ∫(1⨸(1 + (~b)*(~x)^2⨸(~a))^(5⨸4), (~x)) : nothing)) + +("1_1_3_1_10", +:(∫(1/((~a) + (~!b)*(~x)^2)^(7//6),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +1⨸(((~a) + (~b)*(~x)^2)^(2⨸3)*((~a)⨸((~a) + (~b)*(~x)^2))^(2⨸3))* int_and_subst(1⨸(1 - (~b)*(~x)^2)^(1⨸3), (~x), (~x), (~x)⨸sqrt((~a) + (~b)*(~x)^2), "1_1_3_1_10") : nothing)) + +("1_1_3_1_11", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n), 0) && + lt((~p), -1) && + ( + ext_isinteger(2*(~p)) || + (~n) == 2 && + ext_isinteger(4*(~p)) || + (~n) == 2 && + ext_isinteger(3*(~p)) || + ext_den((~p) + 1/(~n)) < ext_den((~p)) + ) ? +-(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~n)*((~p) + 1)) + ((~n)*((~p) + 1) + 1)⨸((~a)*(~n)*((~p) + 1))*∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_1_12", +:(∫(1/((~a) + (~!b)*(~x)^3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +1⨸(3*rt((~a), 3)^2)*∫(1⨸(rt((~a), 3) + rt((~b), 3)*(~x)), (~x)) + 1⨸(3*rt((~a), 3)^2)* ∫((2*rt((~a), 3) - rt((~b), 3)*(~x))⨸(rt((~a), 3)^2 - rt((~a), 3)*rt((~b), 3)*(~x) + rt((~b), 3)^2*(~x)^2), (~x)) : nothing)) + +#(* Int[1/(a_+b_.*x_^5),x_Symbol] := With[{r=Numerator[Rt[a/b,5]], s=Denominator[Rt[a/b,5]]}, r/(5*a)*Int[1/(r+s*x),x] + 2*r/(5*a)*Int[(r-1/4*(1-Sqrt[5])*s*x)/(r^2-1/2*(1-Sqrt[5])*r*s*x+s^ 2*x^2),x] + 2*r/(5*a)*Int[(r-1/4*(1+Sqrt[5])*s*x)/(r^2-1/2*(1+Sqrt[5])*r*s*x+s^ 2*x^2),x]] /; FreeQ[{a,b},x] && PosQ[a/b] *) +#(* Int[1/(a_+b_.*x_^5),x_Symbol] := With[{r=Numerator[Rt[-a/b,5]], s=Denominator[Rt[-a/b,5]]}, r/(5*a)*Int[1/(r-s*x),x] + 2*r/(5*a)*Int[(r+1/4*(1-Sqrt[5])*s*x)/(r^2+1/2*(1-Sqrt[5])*r*s*x+s^ 2*x^2),x] + 2*r/(5*a)*Int[(r+1/4*(1+Sqrt[5])*s*x)/(r^2+1/2*(1+Sqrt[5])*r*s*x+s^ 2*x^2),x]] /; FreeQ[{a,b},x] && NegQ[a/b] *) +# ("1_1_3_1_13", +# @rule ∫(1/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 3)/2, 0) && +# pos((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt((~a)⨸(~b), (~n))), (~s) = ext_den(rt((~a)⨸(~b), (~n))), (~k), (~u)}, (~u) = ∫(((~r) - (~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x))⨸((~r)^2 - 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); (~r)⨸((~a)*(~n))*∫(1⨸((~r) + (~s)*(~x)), (~x)) + dist(2*(~r)⨸((~a)*(~n)), Sum[(~u), {(~k), 1, ((~n) - 1)⨸2}], (~x))] : nothing) +# +# ("1_1_3_1_14", +# @rule ∫(1/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 3)/2, 0) && +# neg((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt(-(~a)⨸(~b), (~n))), (~s) = ext_den(rt(-(~a)⨸(~b), (~n))), (~k), (~u)}, (~u) = ∫(((~r) + (~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x))⨸((~r)^2 + 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); (~r)⨸((~a)*(~n))*∫(1⨸((~r) - (~s)*(~x)), (~x)) + dist(2*(~r)⨸((~a)*(~n)), Sum[(~u), {(~k), 1, ((~n) - 1)⨸2}], (~x))] : nothing) + +("1_1_3_1_15", +:(∫(1/((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)/(~b)) && + ( + gt((~a), 0) || + gt((~b), 0) + ) ? +1⨸(rt((~a), 2)*rt((~b), 2))*atan(rt((~b), 2)*(~x)⨸rt((~a), 2)) : nothing)) + +("1_1_3_1_16", +:(∫(1/((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)/(~b)) && + ( + lt((~a), 0) || + lt((~b), 0) + ) ? +-1⨸(rt(-(~a), 2)*rt(-(~b), 2))*atan(rt(-(~b), 2)*(~x)⨸rt(-(~a), 2)) : nothing)) + +#(* this had a comment Int[1/(a_ + b_.*x_^2), x_Symbol] := (*Rt[b/a,2]/b*ArcTan[Rt[b/a,2]*x] /; *) Rt[a/b, 2]/a*ArcTan[x/Rt[a/b, 2]] /; FreeQ[{a, b}, x] && PosQ[a/b]*) +("1_1_3_1_17", +:(∫(1/((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)/(~b)) ? +rt((~a)⨸(~b), 2)⨸(~a)*atan((~x)⨸rt((~a)⨸(~b), 2)) : nothing)) + +("1_1_3_1_18", +:(∫(1/((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)/(~b)) && + ( + gt((~a), 0) || + lt((~b), 0) + ) ? +1⨸(rt((~a), 2)*rt(-(~b), 2))*atanh(rt(-(~b), 2)*(~x)⨸rt((~a), 2)) : nothing)) + +("1_1_3_1_19", +:(∫(1/((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)/(~b)) && + ( + lt((~a), 0) || + gt((~b), 0) + ) ? +-1⨸(rt(-(~a), 2)*rt((~b), 2))*atanh(rt((~b), 2)*(~x)⨸rt(-(~a), 2)) : nothing)) + +#(* this had a comment Int[1/(a_ + b_.*x_^2), x_Symbol] := (*-Rt[-b/a,2]/b*ArcTanh[Rt[-b/a,2]*x] /; *) Rt[-a/b, 2]/a*ArcTanh[x/Rt[-a/b, 2]] /; FreeQ[{a, b}, x] && NegQ[a/b]*) +("1_1_3_1_20", +:(∫(1/((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)/(~b)) ? +rt(-(~a)⨸(~b), 2)⨸(~a)*atanh((~x)⨸rt(-(~a)⨸(~b), 2)) : nothing)) + +# ("1_1_3_1_21", +# @rule ∫(1/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 2)/4, 0) && +# pos((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt((~a)⨸(~b), (~n))), (~s) = ext_den(rt((~a)⨸(~b), (~n))), (~k), (~u), (~v)}, (~u) = ∫(((~r) - (~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x))⨸((~r)^2 - 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)) + ∫(((~r) + (~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x))⨸((~r)^2 + 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); 2*(~r)^2⨸((~a)*(~n))*∫(1⨸((~r)^2 + (~s)^2*(~x)^2), (~x)) + dist(2*(~r)⨸((~a)*(~n)), Sum[(~u), {(~k), 1, ((~n) - 2)⨸4}], (~x))] : nothing) +# +# ("1_1_3_1_22", +# @rule ∫(1/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 2)/4, 0) && +# neg((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt(-(~a)⨸(~b), (~n))), (~s) = ext_den(rt(-(~a)⨸(~b), (~n))), (~k), (~u)}, (~u) = ∫(((~r) - (~s)*cos((2*(~k)*π)⨸(~n))*(~x))⨸((~r)^2 - 2*(~r)*(~s)*cos((2*(~k)*π)⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)) + ∫(((~r) + (~s)*cos((2*(~k)*π)⨸(~n))*(~x))⨸((~r)^2 + 2*(~r)*(~s)*cos((2*(~k)*π)⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); 2*(~r)^2⨸((~a)*(~n))*∫(1⨸((~r)^2 - (~s)^2*(~x)^2), (~x)) + dist(2*(~r)⨸((~a)*(~n)), Sum[(~u), {(~k), 1, ((~n) - 2)⨸4}], (~x))] : nothing) + +("1_1_3_1_23", +:(∫(1/((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + ( + gt((~a)/(~b), 0) || + pos((~a)/(~b)) + # atom(SplitProduct[SumBaseQ, (~a))] && + # atom(SplitProduct[SumBaseQ, (~b))] + ) ? +1⨸(2*ext_num(rt((~a)⨸(~b), 2)))*∫((ext_num(rt((~a)⨸(~b), 2)) - ext_den(rt((~a)⨸(~b), 2))*(~x)^2)⨸((~a) + (~b)*(~x)^4), (~x)) + 1⨸(2*ext_num(rt((~a)⨸(~b), 2)))*∫((ext_num(rt((~a)⨸(~b), 2)) + ext_den(rt((~a)⨸(~b), 2))*(~x)^2)⨸((~a) + (~b)*(~x)^4), (~x)) : nothing)) + +("1_1_3_1_24", +:(∫(1/((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + !(gt((~a)/(~b), 0)) ? +ext_num(rt(-(~a)⨸(~b), 2))⨸(2*(~a))*∫(1⨸(ext_num(rt(-(~a)⨸(~b), 2)) - ext_den(rt(-(~a)⨸(~b), 2))*(~x)^2), (~x)) + ext_num(rt(-(~a)⨸(~b), 2))⨸(2*(~a))*∫(1⨸(ext_num(rt(-(~a)⨸(~b), 2)) + ext_den(rt(-(~a)⨸(~b), 2))*(~x)^2), (~x)) : nothing)) + +("1_1_3_1_25", +:(∫(1/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n)/4, 1) && + gt((~a)/(~b), 0) ? +ext_num(rt((~a)⨸(~b), 4))⨸(2*sqrt(2)*(~a))* ∫((sqrt(2)*ext_num(rt((~a)⨸(~b), 4)) - ext_den(rt((~a)⨸(~b), 4))*(~x)^((~n)⨸4))⨸(ext_num(rt((~a)⨸(~b), 4))^2 - sqrt(2)*ext_num(rt((~a)⨸(~b), 4))*ext_den(rt((~a)⨸(~b), 4))*(~x)^((~n)⨸4) + ext_den(rt((~a)⨸(~b), 4))^2*(~x)^((~n)⨸2)), (~x)) + ext_num(rt((~a)⨸(~b), 4))⨸(2*sqrt(2)*(~a))* ∫((sqrt(2)*ext_num(rt((~a)⨸(~b), 4)) + ext_den(rt((~a)⨸(~b), 4))*(~x)^((~n)⨸4))⨸(ext_num(rt((~a)⨸(~b), 4))^2 + sqrt(2)*ext_num(rt((~a)⨸(~b), 4))*ext_den(rt((~a)⨸(~b), 4))*(~x)^((~n)⨸4) + ext_den(rt((~a)⨸(~b), 4))^2*(~x)^((~n)⨸2)), (~x)) : nothing)) + +("1_1_3_1_26", +:(∫(1/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n)/4, 1) && + !(gt((~a)/(~b), 0)) ? +ext_num(rt(-(~a)⨸(~b), 2))⨸(2*(~a))*∫(1⨸(ext_num(rt(-(~a)⨸(~b), 2)) - ext_den(rt(-(~a)⨸(~b), 2))*(~x)^((~n)⨸2)), (~x)) + ext_num(rt(-(~a)⨸(~b), 2))⨸(2*(~a))*∫(1⨸(ext_num(rt(-(~a)⨸(~b), 2)) + ext_den(rt(-(~a)⨸(~b), 2))*(~x)^((~n)⨸2)), (~x)) : nothing)) + +("1_1_3_1_27", +:(∫(1/sqrt((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)) ? +asinh(rt((~b), 2)*(~x)⨸sqrt((~a)))⨸rt((~b), 2) : nothing)) + +("1_1_3_1_28", +:(∫(1/sqrt((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + neg((~b)) ? +asin(rt(-(~b), 2)*(~x)⨸sqrt((~a)))⨸rt(-(~b), 2) : nothing)) + +("1_1_3_1_29", +:(∫(1/sqrt((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + !(gt((~a), 0)) ? +int_and_subst(1⨸(1 - (~b)*(~x)^2), (~x), (~x), (~x)⨸sqrt((~a) + (~b)*(~x)^2), "1_1_3_1_29") : nothing)) + +#(* Int[1/Sqrt[a_+b_.*x_^3],x_Symbol] := With[{q=Rt[b/a,3]}, -Sqrt[2]*(1+Sqrt[3])*(1+Sqrt[3]+q*x)^2*Sqrt[(1+q^3*x^3)/(1+Sqrt[3]+ q*x)^4]/(3^(1/4)*q*Sqrt[a+b*x^3])* EllipticF[ArcSin[(-1+Sqrt[3]-q*x)/(1+Sqrt[3]+q*x)],-7-4*Sqrt[3]]] /; FreeQ[{a,b},x] && PosQ[a] *) +#(* Int[1/Sqrt[a_+b_.*x_^3],x_Symbol] := With[{q=Rt[a/b,3]}, 2*Sqrt[2+Sqrt[3]]*(q+x)*Sqrt[(q^2-q*x+x^2)/((1+Sqrt[3])*q+x)^2]/ (3^(1/4)*Sqrt[a+b*x^3]*Sqrt[q*(q+x)/((1+Sqrt[3])*q+x)^2])* EllipticF[ArcSin[((1-Sqrt[3])*q+x)/((1+Sqrt[3])*q+x)],-7-4*Sqrt[3] ]] /; FreeQ[{a,b},x] && PosQ[a] && EqQ[b^2,1] *) +#(* Int[1/Sqrt[a_+b_.*x_^3],x_Symbol] := With[{q=Rt[b/a,3]}, -2*Sqrt[2+Sqrt[3]]*(1+q*x)*Sqrt[(1-q*x+q^2*x^2)/(1+Sqrt[3]+q*x)^2]/ (3^(1/4)*q*Sqrt[a+b*x^3]*Sqrt[(1+q*x)/(1+Sqrt[3]+q*x)^2])* EllipticF[ArcSin[(-1+Sqrt[3]-q*x)/(1+Sqrt[3]+q*x)],-7-4*Sqrt[3]]] /; FreeQ[{a,b},x] && PosQ[a] *) +("1_1_3_1_30", +:(∫(1/sqrt((~a) + (~!b)*(~x)^3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) ? +2*sqrt(2 + sqrt(3))*(ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))* sqrt((ext_den(rt((~b)⨸(~a), 3))^2 - ext_num(rt((~b)⨸(~a), 3))*ext_den(rt((~b)⨸(~a), 3))*(~x) + ext_num(rt((~b)⨸(~a), 3))^2*(~x)^2)⨸((1 + sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))^2)⨸ (3^(1⨸4)*ext_num(rt((~b)⨸(~a), 3))*sqrt((~a) + (~b)*(~x)^3)* sqrt(ext_den(rt((~b)⨸(~a), 3))*(ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))⨸((1 + sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))^2))* elliptic_f( asin(((1 - sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))⨸((1 + sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))), -7 - 4*sqrt(3)) : nothing)) + +#(* Int[1/Sqrt[a_+b_.*x_^3],x_Symbol] := With[{q=Rt[a/b,3]}, 2*Sqrt[2-Sqrt[3]]*(q+x)*Sqrt[(q^2-q*x+x^2)/((1-Sqrt[3])*q+x)^2]/ (3^(1/4)*Sqrt[a+b*x^3]*Sqrt[-q*(q+x)/((1-Sqrt[3])*q+x)^2])* EllipticF[ArcSin[((1+Sqrt[3])*q+x)/((1-Sqrt[3])*q+x)],-7+4*Sqrt[3] ]] /; FreeQ[{a,b},x] && NegQ[a] && EqQ[b^2,1] *) +#(* Int[1/Sqrt[a_+b_.*x_^3],x_Symbol] := With[{q=Rt[b/a,3]}, -2*Sqrt[2-Sqrt[3]]*(1+q*x)*Sqrt[(1-q*x+q^2*x^2)/(1-Sqrt[3]+q*x)^2]/ (3^(1/4)*q*Sqrt[a+b*x^3]*Sqrt[-(1+q*x)/(1-Sqrt[3]+q*x)^2])* EllipticF[ArcSin[(1+Sqrt[3]+q*x)/(-1+Sqrt[3]-q*x)],-7+4*Sqrt[3]]] /; FreeQ[{a,b},x] && NegQ[a] *) +("1_1_3_1_31", +:(∫(1/sqrt((~a) + (~!b)*(~x)^3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)) ? +2*sqrt(2 - sqrt(3))*(ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))* sqrt((ext_den(rt((~b)⨸(~a), 3))^2 - ext_num(rt((~b)⨸(~a), 3))*ext_den(rt((~b)⨸(~a), 3))*(~x) + ext_num(rt((~b)⨸(~a), 3))^2*(~x)^2)⨸((1 - sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))^2)⨸ (3^(1⨸4)*ext_num(rt((~b)⨸(~a), 3))*sqrt((~a) + (~b)*(~x)^3)* sqrt(-ext_den(rt((~b)⨸(~a), 3))*(ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))⨸((1 - sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))^2))* elliptic_f( asin(((1 + sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))⨸((1 - sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))), -7 + 4*sqrt(3)) : nothing)) + +("1_1_3_1_32", +:(∫(1/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~b)/(~a)) ? +(1 + rt((~b)⨸(~a), 4)^2*(~x)^2)* sqrt(((~a) + (~b)*(~x)^4)⨸((~a)*(1 + rt((~b)⨸(~a), 4)^2*(~x)^2)^2))⨸(2*rt((~b)⨸(~a), 4)*sqrt((~a) + (~b)*(~x)^4))* elliptic_f(2*atan(rt((~b)⨸(~a), 4)*(~x)), 1⨸2) : nothing)) + +("1_1_3_1_33", +:(∫(1/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~b)/(~a)) && + gt((~a), 0) ? +elliptic_f(asin(rt(-(~b), 4)*(~x)⨸rt((~a), 4)), -1)⨸(rt((~a), 4)*rt(-(~b), 4)) : nothing)) + +("1_1_3_1_34", +:(∫(1/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + lt((~a), 0) && + gt((~b), 0) && + ext_isinteger(rt(-(~a)*(~b), 2)) ? +sqrt(-(~a) + rt(-(~a)*(~b), 2)*(~x)^2)* sqrt(((~a) + rt(-(~a)*(~b), 2)*(~x)^2)⨸rt(-(~a)*(~b), 2))⨸(sqrt(2)*sqrt(-(~a))*sqrt((~a) + (~b)*(~x)^4))* elliptic_f(asin((~x)⨸sqrt(((~a) + rt(-(~a)*(~b), 2)*(~x)^2)⨸(2*rt(-(~a)*(~b), 2)))), 1⨸2) : nothing)) + +("1_1_3_1_35", +:(∫(1/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + lt((~a), 0) && + gt((~b), 0) ? +sqrt(((~a) - rt(-(~a)*(~b), 2)*(~x)^2)⨸((~a) + rt(-(~a)*(~b), 2)*(~x)^2))* sqrt(((~a) + rt(-(~a)*(~b), 2)*(~x)^2)⨸rt(-(~a)*(~b), 2))⨸(sqrt(2)*sqrt((~a) + (~b)*(~x)^4)* sqrt((~a)⨸((~a) + rt(-(~a)*(~b), 2)*(~x)^2)))* elliptic_f(asin((~x)⨸sqrt(((~a) + rt(-(~a)*(~b), 2)*(~x)^2)⨸(2*rt(-(~a)*(~b), 2)))), 1⨸2) : nothing)) + +("1_1_3_1_36", +:(∫(1/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~b)/(~a)) && + !(gt((~a), 0)) ? +sqrt(1 + (~b)*(~x)^4⨸(~a))⨸sqrt((~a) + (~b)*(~x)^4)*∫(1⨸sqrt(1 + (~b)*(~x)^4⨸(~a)), (~x)) : nothing)) + +("1_1_3_1_37", +:(∫(1/sqrt((~a) + (~!b)*(~x)^6),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +(~x)*(ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x)^2)* sqrt((ext_den(rt((~b)⨸(~a), 3))^2 - ext_num(rt((~b)⨸(~a), 3))*ext_den(rt((~b)⨸(~a), 3))*(~x)^2 + ext_num(rt((~b)⨸(~a), 3))^2*(~x)^4)⨸(ext_den(rt((~b)⨸(~a), 3)) + (1 + sqrt(3))*ext_num(rt((~b)⨸(~a), 3))*(~x)^2)^2)⨸ (2*3^(1⨸4)*ext_den(rt((~b)⨸(~a), 3))*sqrt((~a) + (~b)*(~x)^6)* sqrt(ext_num(rt((~b)⨸(~a), 3))*(~x)^2*(ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x)^2)⨸(ext_den(rt((~b)⨸(~a), 3)) + (1 + sqrt(3))*ext_num(rt((~b)⨸(~a), 3))*(~x)^2)^2))* elliptic_f( acos((ext_den(rt((~b)⨸(~a), 3)) + (1 - sqrt(3))*ext_num(rt((~b)⨸(~a), 3))*(~x)^2)⨸(ext_den(rt((~b)⨸(~a), 3)) + (1 + sqrt(3))*ext_num(rt((~b)⨸(~a), 3))*(~x)^2)), (2 + sqrt(3))⨸4) : nothing)) + +("1_1_3_1_38", +:(∫(1/sqrt((~a) + (~!b)*(~x)^8),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +1⨸2*∫((1 - rt((~b)⨸(~a), 4)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^8), (~x)) + 1⨸2*∫((1 + rt((~b)⨸(~a), 4)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^8), (~x)) : nothing)) + +("1_1_3_1_39", +:(∫(1/((~a) + (~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)/(~a)) ? +2*(~x)⨸((~a) + (~b)*(~x)^2)^(1⨸4) - (~a)*∫(1⨸((~a) + (~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_3_1_40", +:(∫(1/((~a) + (~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + neg((~b)/(~a)) ? +2⨸((~a)^(1⨸4)*rt(-(~b)⨸(~a), 2))*elliptic_e(1⨸2*asin(rt(-(~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_3_1_41", +:(∫(1/((~a) + (~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) ? +(1 + (~b)*(~x)^2⨸(~a))^(1⨸4)⨸((~a) + (~b)*(~x)^2)^(1⨸4)* ∫(1⨸(1 + (~b)*(~x)^2⨸(~a))^(1⨸4), (~x)) : nothing)) + +("1_1_3_1_42", +:(∫(1/((~a) + (~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)) ? +2*sqrt(-(~b)*(~x)^2⨸(~a))⨸((~b)*(~x))* int_and_subst((~x)^2⨸sqrt(1 - (~x)^4⨸(~a)), (~x), (~x), ((~a) + (~b)*(~x)^2)^(1⨸4), "1_1_3_1_42") : nothing)) + +("1_1_3_1_43", +:(∫(1/((~a) + (~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + pos((~b)/(~a)) ? +2⨸((~a)^(3⨸4)*rt((~b)⨸(~a), 2))*elliptic_f(1⨸2*atan(rt((~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_3_1_44", +:(∫(1/((~a) + (~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt((~a), 0) && + neg((~b)/(~a)) ? +2⨸((~a)^(3⨸4)*rt(-(~b)⨸(~a), 2))*elliptic_f(1⨸2*asin(rt(-(~b)⨸(~a), 2)*(~x)), 2) : nothing)) + +("1_1_3_1_45", +:(∫(1/((~a) + (~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) ? +(1 + (~b)*(~x)^2⨸(~a))^(3⨸4)⨸((~a) + (~b)*(~x)^2)^(3⨸4)* ∫(1⨸(1 + (~b)*(~x)^2⨸(~a))^(3⨸4), (~x)) : nothing)) + +("1_1_3_1_46", +:(∫(1/((~a) + (~!b)*(~x)^2)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)) ? +2*sqrt(-(~b)*(~x)^2⨸(~a))⨸((~b)*(~x))* int_and_subst(1⨸sqrt(1 - (~x)^4⨸(~a)), (~x), (~x), ((~a) + (~b)*(~x)^2)^(1⨸4), "1_1_3_1_46") : nothing)) + +("1_1_3_1_47", +:(∫(1/((~a) + (~!b)*(~x)^2)^(1//3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +3*sqrt((~b)*(~x)^2)⨸(2*(~b)*(~x))* int_and_subst((~x)⨸sqrt(-(~a) + (~x)^3), (~x), (~x), ((~a) + (~b)*(~x)^2)^(1⨸3), "1_1_3_1_47") : nothing)) + +("1_1_3_1_48", +:(∫(1/((~a) + (~!b)*(~x)^2)^(2//3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +3*sqrt((~b)*(~x)^2)⨸(2*(~b)*(~x))* int_and_subst(1⨸sqrt(-(~a) + (~x)^3), (~x), (~x), ((~a) + (~b)*(~x)^2)^(1⨸3), "1_1_3_1_48") : nothing)) + +("1_1_3_1_49", +:(∫(1/((~a) + (~!b)*(~x)^4)^(3//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +(~x)^3*(1 + (~a)⨸((~b)*(~x)^4))^(3⨸4)⨸((~a) + (~b)*(~x)^4)^(3⨸4)* ∫(1⨸((~x)^3*(1 + (~a)⨸((~b)*(~x)^4))^(3⨸4)), (~x)) : nothing)) + +("1_1_3_1_50", +:(∫(1/((~a) + (~!b)*(~x)^2)^(1//6),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +3*(~x)⨸(2*((~a) + (~b)*(~x)^2)^(1⨸6)) - (~a)⨸2*∫(1⨸((~a) + (~b)*(~x)^2)^(7⨸6), (~x)) : nothing)) + +("1_1_3_1_51", +:(∫(1/((~a) + (~!b)*(~x)^3)^(1//3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +atan((1 + 2*rt((~b), 3)*(~x)⨸((~a) + (~b)*(~x)^3)^(1⨸3))⨸sqrt(3))⨸(sqrt(3)* rt((~b), 3)) - log(((~a) + (~b)*(~x)^3)^(1⨸3) - rt((~b), 3)*(~x))⨸(2*rt((~b), 3)) : nothing)) + +("1_1_3_1_52", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n), 0) && + lt(-1, (~p), 0) && + !eq((~p), -1/2) && + ext_isinteger((~p) + 1/(~n)) ? +(~a)^((~p) + 1⨸(~n))* int_and_subst(1⨸(1 - (~b)*(~x)^(~n))^((~p) + 1⨸(~n) + 1), (~x), (~x), (~x)⨸((~a) + (~b)*(~x)^(~n))^(1⨸(~n)), "1_1_3_1_52") : nothing)) + +("1_1_3_1_53", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n), 0) && + lt(-1, (~p), 0) && + !eq((~p), -1/2) && + lt(ext_den((~p) + 1/(~n)), ext_den((~p))) ? +((~a)⨸((~a) + (~b)*(~x)^(~n)))^((~p) + 1⨸(~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1⨸(~n))* int_and_subst(1⨸(1 - (~b)*(~x)^(~n))^((~p) + 1⨸(~n) + 1), (~x), (~x), (~x)⨸((~a) + (~b)*(~x)^(~n))^(1⨸(~n)), "1_1_3_1_53") : nothing)) + +("1_1_3_1_54", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~p), (~x)) && + ilt((~n), 0) ? +-int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)⨸(~x)^2, (~x), (~x), 1⨸(~x), "1_1_3_1_54") : nothing)) + +("1_1_3_1_55", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~p), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*(~x)^(ext_den((~n))*(~n)))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "1_1_3_1_55") : nothing)) + +("1_1_3_1_56", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing)) + +("1_1_3_1_57", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~p), (~x)) && + !(igt((~p), 0)) && + !(ext_isinteger(1/(~n))) && + !(ilt(simplify(1/(~n) + (~p)), 0)) && + ( + ext_isinteger((~p)) || + gt((~a), 0) + ) ? +(~a)^(~p)*(~x)*hypergeometric2f1(-(~p), 1⨸(~n), 1⨸(~n) + 1, -(~b)*(~x)^(~n)⨸(~a)) : nothing)) + +#(* Int[(a_+b_.*x_^n_)^p_,x_Symbol] := x*(a+b*x^n)^(p+1)/a*Hypergeometric2F1[1,1/n+p+1,1/n+1,-b*x^n/a] /; FreeQ[{a,b,n,p},x] && Not[IGtQ[p,0]] && Not[IntegerQ[1/n]] && Not[ILtQ[Simplify[1/n+p],0]] && Not[IntegerQ[p] || GtQ[a,0]] *) +("1_1_3_1_58", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~p), (~x)) && + !(igt((~p), 0)) && + !(ext_isinteger(1/(~n))) && + !(ilt(simplify(1/(~n) + (~p)), 0)) && + !( + ext_isinteger((~p)) || + gt((~a), 0) + ) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^(~n))^fracpart((~p))⨸(1 + (~b)*(~x)^(~n)⨸(~a))^fracpart((~p))* ∫((1 + (~b)*(~x)^(~n)⨸(~a))^(~p), (~x)) : nothing)) + +("1_1_3_1_59", +:(∫(((~!a) + (~!b)*(~v)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~p), (~x)) && + linear((~v), (~x)) && + !eq((~v), (~x)) ? +1⨸ext_coeff((~v), (~x), 1)*int_and_subst(((~a) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~v), "1_1_3_1_59") : nothing)) + +("1_1_3_1_60", +:(∫(((~!a1) + (~!b1)*(~x)^(~n))^(~!p)*((~!a2) + (~!b2)*(~x)^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + ext_isinteger((~p)) || + gt((~a1), 0) && + gt((~a2), 0) + ) ? +∫(((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing)) + +("1_1_3_1_61", +:(∫(((~a1) + (~!b1)*(~x)^(~!n))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n))^(~!p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + gt((~p), 0) && + ( + ext_isinteger(2*(~p)) || + ext_den((~p) + 1/(~n)) < ext_den((~p)) + ) ? +(~x)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p)⨸(2*(~n)*(~p) + 1) + 2*(~a1)*(~a2)*(~n)*(~p)⨸(2*(~n)*(~p) + 1)* ∫(((~a1) + (~b1)*(~x)^(~n))^((~p) - 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_1_62", +:(∫(((~a1) + (~!b1)*(~x)^(~!n))^(~p)*((~a2) + (~!b2)*(~x)^(~!n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + lt((~p), -1) && + ( + ext_isinteger(2*(~p)) || + ext_den((~p) + 1/(~n)) < ext_den((~p)) + ) ? +-(~x)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸(2*(~a1)*(~a2)* (~n)*((~p) + 1)) + (2*(~n)*((~p) + 1) + 1)⨸(2*(~a1)*(~a2)*(~n)*((~p) + 1))* ∫(((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_1_63", +:(∫(((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ilt(2*(~n), 0) ? +-int_and_subst(((~a1) + (~b1)*(~x)^(-(~n)))^(~p)*((~a2) + (~b2)*(~x)^(-(~n)))^(~p)⨸(~x)^2, (~x), (~x), 1⨸(~x), "1_1_3_1_63") : nothing)) + +("1_1_3_1_64", +:(∫(((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + isfraction(2*(~n)) ? +ext_den(2*(~n))*int_and_subst((~x)^(ext_den(2*(~n)) - 1)*((~a1) + (~b1)*(~x)^(ext_den(2*(~n))*(~n)))^(~p)*((~a2) + (~b2)*(~x)^(ext_den(2*(~n))*(~n)))^(~p), (~x), (~x), (~x)^(1⨸ext_den(2*(~n))), "1_1_3_1_64") : nothing)) + +("1_1_3_1_65", +:(∫(((~!a1) + (~!b1)*(~x)^(~n))^(~p)*((~!a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + !(ext_isinteger((~p))) ? +((~a1) + (~b1)*(~x)^(~n))^ fracpart((~p))*((~a2) + (~b2)*(~x)^(~n))^fracpart((~p))⨸((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^ fracpart((~p))*∫(((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing)) + +("1_1_3_1_66", +:(∫(((~a) + (~!b)*((~!c)*(~x)^(~!q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~n), (~p), (~q), (~x)) && + ext_isinteger((~n)*(~q)) && + !eq((~x), ((~c)*(~x)^(~q))^(1/(~q))) ? +(~x)⨸((~c)*(~x)^(~q))^(1⨸(~q))* int_and_subst(((~a) + (~b)*(~x)^((~n)*(~q)))^(~p), (~x), (~x), ((~c)*(~x)^(~q))^(1⨸(~q)), "1_1_3_1_66") : nothing)) + +("1_1_3_1_67", +:(∫(((~a) + (~!b)*((~!c)*(~x)^(~!q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~p), (~q), (~x)) && + isfraction((~n)) ? +int_and_subst(((~a) + (~b)*(~c)^(~n)*(~x)^((~n)*(~q)))^(~p), (~x), (~x)^(1⨸ext_den((~n))), ((~c)*(~x)^(~q))^(1⨸ext_den((~n)))⨸((~c)^(1⨸ext_den((~n)))*((~x)^(1⨸ext_den((~n))))^((~q) - 1)), "1_1_3_1_67") : nothing)) + +("1_1_3_1_68", +:(∫(((~a) + (~!b)*((~!c)*(~x)^(~!q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~n), (~p), (~q), (~x)) && + !(isrational((~n))) ? +int_and_subst(((~a) + (~b)*(~c)^(~n)*(~x)^((~n)*(~q)))^(~p), (~x), (~x)^((~n)*(~q)), ((~c)*(~x)^(~q))^(~n)⨸(~c)^(~n), "1_1_3_1_68") : nothing)) + +("1_1_3_1_69", +:(∫(((~a) + (~!b)*((~!d)*(~x)^(~!q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~d), (~n), (~p), (~x)) && + ilt((~q), 0) ? +-int_and_subst(((~a) + (~b)*((~d)*(~x)^(-(~q)))^(~n))^(~p)⨸(~x)^2, (~x), (~x), 1⨸(~x), "1_1_3_1_69") : nothing)) + +("1_1_3_1_70", +:(∫(((~a) + (~!b)*((~!d)*(~x)^(~!q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~d), (~n), (~p), (~x)) && + isfraction((~q)) ? +ext_den((~q))*int_and_subst((~x)^(ext_den((~q)) - 1)*((~a) + (~b)*((~d)*(~x)^((~q)*ext_den((~q))))^(~n))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~q))), "1_1_3_1_70") : nothing)) + +#(* Int[(a_+b_.*(d_.*x_^q_.)^n_)^p_.,x_Symbol] := Subst[Int[(a+b*x^(n*q))^p,x],x^(n*q),(d*x^q)^n] /; FreeQ[{a,b,d,n,p,q},x] && Not[IntegerQ[n*q]] && NeQ[x^(n*q),(d*x^q)^n] *) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.2 (c x)^m (a+b x^n)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.2 (c x)^m (a+b x^n)^p.jl new file mode 100644 index 0000000..bcb217a --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.2 (c x)^m (a+b x^n)^p.jl @@ -0,0 +1,902 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.2 (c x)^m (a+b x^n)^p *) +("1_1_3_2_1", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + ext_isinteger((~p)) || + gt((~a1), 0) && + gt((~a2), 0) + ) ? +∫(((~c)*(~x))^(~m)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing)) + +("1_1_3_2_2", +:(∫((~x)^(~!m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq((~m), (~n) - 1) ? +log((~a) + (~b)*(~x)^(~n))⨸((~b)*(~n)) : nothing)) + +("1_1_3_2_3", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && + eq((~m), (~n) - 1) && + !eq((~p), -1) ? +((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) : nothing)) + +("1_1_3_2_4", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~!n))^(~p)*((~a2) + (~!b2)*(~x)^(~!n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + eq((~m), 2*(~n) - 1) && + !eq((~p), -1) ? +((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸(2*(~b1)*(~b2)*(~n)*((~p) + 1)) : nothing)) + +("1_1_3_2_5", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~x)) && + ext_isinteger((~p)) && + neg((~n)) ? +∫((~x)^((~m) + (~n)*(~p))*((~b) + (~a)*(~x)^(-(~n)))^(~p), (~x)) : nothing)) + +("1_1_3_2_6", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + eq(((~m) + 1)/(~n) + (~p) + 1, 0) && + !eq((~m), -1) ? +((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)*((~m) + 1)) : nothing)) + +("1_1_3_2_7", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + eq(((~m) + 1)/(2*(~n)) + (~p) + 1, 0) && + !eq((~m), -1) ? +((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸((~a1)*(~a2)* (~c)*((~m) + 1)) : nothing)) + +("1_1_3_2_8", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*(~x))^(~p), (~x), (~x), (~x)^(~n), "1_1_3_2_8") : nothing)) + +("1_1_3_2_9", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger(simplify(((~m) + 1)/(2*(~n)))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a1) + (~b1)*(~x))^(~p)*((~a2) + (~b2)*(~x))^(~p), (~x), (~x), (~x)^(~n), "1_1_3_2_9") : nothing)) + +("1_1_3_2_10", +:(∫(((~c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_11", +:(∫(((~c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger(simplify(((~m) + 1)/(2*(~n)))) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_12", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing)) + +("1_1_3_2_13", +:(∫((~x)^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && + ilt(simplify(((~m) + 1)/(~n) + (~p) + 1), 0) && + !eq((~m), -1) ? +(~x)^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~m) + 1)) - (~b)*((~m) + (~n)*((~p) + 1) + 1)⨸((~a)*((~m) + 1))* ∫((~x)^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_14", +:(∫((~x)^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ilt(simplify(((~m) + 1)/(2*(~n)) + (~p) + 1), 0) && + !eq((~m), -1) ? +(~x)^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸((~a1)* (~a2)*((~m) + 1)) - (~b1)*(~b2)*((~m) + 2*(~n)*((~p) + 1) + 1)⨸((~a1)*(~a2)*((~m) + 1))* ∫((~x)^((~m) + 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_15", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + ilt(simplify(((~m) + 1)/(~n) + (~p) + 1), 0) && + !eq((~p), -1) ? +-((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)*(~n)*((~p) + 1)) + ((~m) + (~n)*((~p) + 1) + 1)⨸((~a)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_2_16", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ilt(simplify(((~m) + 1)/(2*(~n)) + (~p) + 1), 0) && + !eq((~p), -1) ? +-((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸(2*(~a1)* (~a2)*(~c)*(~n)*((~p) + 1)) + ((~m) + 2*(~n)*((~p) + 1) + 1)⨸(2*(~a1)*(~a2)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^(~m)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_2_17", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~p), (~x)) && + igt((~n), 0) && + ext_isinteger((~m)) && + !(eq(gcd((~m) + 1, (~n)),1)) ? +1⨸gcd((~m) + 1, (~n))*int_and_subst((~x)^(((~m) + 1)⨸gcd((~m) + 1, (~n)) - 1)*((~a) + (~b)*(~x)^((~n)⨸gcd((~m) + 1, (~n))))^(~p), (~x), (~x), (~x)^gcd((~m) + 1, (~n)), "1_1_3_2_17") : nothing)) + +("1_1_3_2_18", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + ext_isinteger((~m))&& + !(eq(gcd((~m) + 1, (~n)),1)) ? +1⨸gcd((~m) + 1, 2*(~n))* int_and_subst( (~x)^(((~m) + 1)⨸gcd((~m) + 1, 2*(~n)) - 1)*((~a1) + (~b1)*(~x)^((~n)⨸gcd((~m) + 1, 2*(~n))))^(~p)*((~a2) + (~b2)*(~x)^((~n)⨸gcd((~m) + 1, 2*(~n))))^(~p), (~x), (~x), (~x)^gcd((~m) + 1, 2*(~n)), "1_1_3_2_18") : nothing)) + +("1_1_3_2_19", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + igt((~n), 0) && + gt((~p), 0) && + lt((~m), -1) && + !(ilt(((~m) + (~n)*(~p) + (~n) + 1)/(~n), 0)) && + int_binomial((~a), (~b), (~c), (~n), (~m), (~p), (~x)) ? +((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^(~p)⨸((~c)*((~m) + 1)) - (~b)*(~n)*(~p)⨸((~c)^(~n)*((~m) + 1))*∫(((~c)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_20", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + gt((~p), 0) && + lt((~m), -1) && + !eq((~m) + 2*(~n)*(~p) + 1, 0) && + int_binomial((~a1)*(~a2), (~b1)*(~b2), (~c), 2*(~n), (~m), (~p), (~x)) ? +((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p)⨸((~c)*((~m) + 1)) - 2*(~b1)*(~b2)*(~n)*(~p)⨸((~c)^(2*(~n))*((~m) + 1))* ∫(((~c)*(~x))^((~m) + 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^((~p) - 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_21", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~x)) && + igt((~n), 0) && + gt((~p), 0) && + !eq((~m) + (~n)*(~p) + 1, 0) && + int_binomial((~a), (~b), (~c), (~n), (~m), (~p), (~x)) ? +((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^(~p)⨸((~c)*((~m) + (~n)*(~p) + 1)) + (~a)*(~n)*(~p)⨸((~m) + (~n)*(~p) + 1)*∫(((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_22", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + gt((~p), 0) && + !eq((~m) + 2*(~n)*(~p) + 1, 0) && + int_binomial((~a1)*(~a2), (~b1)*(~b2), (~c), 2*(~n), (~m), (~p), (~x)) ? +((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p)⨸((~c)*((~m) + 2*(~n)*(~p) + 1)) + 2*(~a1)*(~a2)*(~n)*(~p)⨸((~m) + 2*(~n)*(~p) + 1)* ∫(((~c)*(~x))^(~m)*((~a1) + (~b1)*(~x)^(~n))^((~p) - 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_23", +:(∫((~x)^2/((~a) + (~!b)*(~x)^4)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~b)/(~a)) ? +(~x)*(1 + (~a)⨸((~b)*(~x)^4))^(1⨸4)⨸((~b)*((~a) + (~b)*(~x)^4)^(1⨸4))* ∫(1⨸((~x)^3*(1 + (~a)⨸((~b)*(~x)^4))^(5⨸4)), (~x)) : nothing)) + +("1_1_3_2_24", +:(∫((~x)^(~m)/((~a) + (~!b)*(~x)^4)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~b)/(~a)) && + igt(((~m) - 2)/4, 0) ? +(~x)^((~m) - 3)⨸((~b)*((~m) - 4)*((~a) + (~b)*(~x)^4)^(1⨸4)) - (~a)*((~m) - 3)⨸((~b)*((~m) - 4))*∫((~x)^((~m) - 4)⨸((~a) + (~b)*(~x)^4)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_25", +:(∫((~x)^(~m)/((~a) + (~!b)*(~x)^4)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~b)/(~a)) && + ilt(((~m) - 2)/4, 0) ? +(~x)^((~m) + 1)⨸((~a)*((~m) + 1)*((~a) + (~b)*(~x)^4)^(1⨸4)) - (~b)*(~m)⨸((~a)*((~m) + 1))*∫((~x)^((~m) + 4)⨸((~a) + (~b)*(~x)^4)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_26", +:(∫(sqrt((~!c)*(~x))/((~a) + (~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + pos((~b)/(~a)) ? +sqrt((~c)*(~x))*(1 + (~a)⨸((~b)*(~x)^2))^(1⨸4)⨸((~b)*((~a) + (~b)*(~x)^2)^(1⨸4))* ∫(1⨸((~x)^2*(1 + (~a)⨸((~b)*(~x)^2))^(5⨸4)), (~x)) : nothing)) + +("1_1_3_2_27", +:(∫(((~!c)*(~x))^(~m)/((~a) + (~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + pos((~b)/(~a)) && + ext_isinteger(2*(~m)) && + gt((~m), 3/2) ? +2*(~c)*((~c)*(~x))^((~m) - 1)⨸((~b)*(2*(~m) - 3)*((~a) + (~b)*(~x)^2)^(1⨸4)) - 2*(~a)*(~c)^2*((~m) - 1)⨸((~b)*(2*(~m) - 3))* ∫(((~c)*(~x))^((~m) - 2)⨸((~a) + (~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_28", +:(∫(((~!c)*(~x))^(~m)/((~a) + (~!b)*(~x)^2)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + pos((~b)/(~a)) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~c)*(~x))^((~m) + 1)⨸((~a)*(~c)*((~m) + 1)*((~a) + (~b)*(~x)^2)^(1⨸4)) - (~b)*(2*(~m) + 1)⨸(2*(~a)*(~c)^2*((~m) + 1))* ∫(((~c)*(~x))^((~m) + 2)⨸((~a) + (~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_29", +:(∫((~x)^2/((~a) + (~!b)*(~x)^4)^(5//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~b)/(~a)) ? +-1⨸((~b)*(~x)*((~a) + (~b)*(~x)^4)^(1⨸4)) - 1⨸(~b)*∫(1⨸((~x)^2*((~a) + (~b)*(~x)^4)^(1⨸4)), (~x)) : nothing)) + +("1_1_3_2_30", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + igt((~n), 0) && + lt((~p), -1) && + gt((~m) + 1, (~n)) && + !(ilt(((~m) + (~n)*((~p) + 1) + 1)/(~n), 0)) && + int_binomial((~a), (~b), (~c), (~n), (~m), (~p), (~x)) ? +(~c)^((~n) - 1)*((~c)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - (~c)^(~n)*((~m) - (~n) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +#(* Int[(c_.*x_)^m_.*u_^p_*v_^p_,x_Symbol] := With[{a=BinomialParts[u,x][[1]],b=BinomialParts[u,x][[2]],n= BinomialParts[u,x][[3]]}, c^(n-1)*(c*x)^(m-n+1)*u^(p+1)*v^(p+1)/(b*n*(p+1)) - c^n*(m-n+1)/(b*n*(p+1))*Int[(c*x)^(m-n)*u^(p+1)*v^(p+1),x] /; IGtQ[n,0] && m+1>n && Not[ILtQ[(m+n*(p+1)+1)/n,0]] && IntBinomialQ[a,b,c,n,m,p,x]] /; FreeQ[c,x] && BinomialQ[u*v,x] && LtQ[p,-1] *) +("1_1_3_2_31", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + lt((~p), -1) && + (~m) + 1 > 2*(~n) && + !(ilt(((~m) + 2*(~n)*((~p) + 1) + 1)/(2*(~n)), 0)) && + int_binomial((~a1)*(~a2), (~b1)*(~b2), (~c), 2*(~n), (~m), (~p), (~x)) ? +(~c)^(2*(~n) - 1)*((~c)*(~x))^((~m) - 2*(~n) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸(2*(~b1)*(~b2)*(~n)*((~p) + 1)) - (~c)^(2*(~n))*((~m) - 2*(~n) + 1)⨸(2*(~b1)*(~b2)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^((~m) - 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_2_32", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~x)) && + igt((~n), 0) && + lt((~p), -1) && + int_binomial((~a), (~b), (~c), (~n), (~m), (~p), (~x)) ? +-((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)*(~n)*((~p) + 1)) + ((~m) + (~n)*((~p) + 1) + 1)⨸((~a)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_2_33", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + lt((~p), -1) && + int_binomial((~a1)*(~a2), (~b1)*(~b2), (~c), 2*(~n), (~m), (~p), (~x)) ? +-((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸(2*(~a1)* (~a2)*(~c)*(~n)*((~p) + 1)) + ((~m) + 2*(~n)*((~p) + 1) + 1)⨸(2*(~a1)*(~a2)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^(~m)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_2_34", +:(∫((~x)/((~a) + (~!b)*(~x)^3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +-1⨸(3*rt((~a), 3)*rt((~b), 3))*∫(1⨸(rt((~a), 3) + rt((~b), 3)*(~x)), (~x)) + 1⨸(3*rt((~a), 3)*rt((~b), 3))* ∫((rt((~a), 3) + rt((~b), 3)*(~x))⨸(rt((~a), 3)^2 - rt((~a), 3)*rt((~b), 3)*(~x) + rt((~b), 3)^2*(~x)^2), (~x)) : nothing)) + +("1_1_3_2_35", +:(∫((~x)^(~!m)/((~a)+(~!b)*(~x)^5),(~x)) ) => :( + !contains_var((~a),(~b),(~x)) && + igt((~m),0) && + lt((~m),4) && + pos((~a)/(~b)) ? +(-1)^(~m)*ext_num(rt((~a)⨸(~b),5))^((~m)+1)⨸(5*(~a)*ext_den(rt((~a)⨸(~b),5))^(~m))*∫(1⨸(ext_num(rt((~a)⨸(~b),5))+ext_den(rt((~a)⨸(~b),5))*(~x)),(~x)) + 2*ext_num(rt((~a)⨸(~b),5))^((~m)+1)⨸(5*(~a)*ext_den(rt((~a)⨸(~b),5))^(~m))*∫((ext_num(rt((~a)⨸(~b),5))*cos((~m)*π⨸5)-ext_den(rt((~a)⨸(~b),5))*cos(((~m)+1)*π⨸5)*(~x))⨸(ext_num(rt((~a)⨸(~b),5))^2-1⨸ 2*(1+sqrt(5))*ext_num(rt((~a)⨸(~b),5))*ext_den(rt((~a)⨸(~b),5))*(~x)+ext_den(rt((~a)⨸(~b),5))^2*(~x)^2),(~x)) + 2*ext_num(rt((~a)⨸(~b),5))^((~m)+1)⨸(5*(~a)*ext_den(rt((~a)⨸(~b),5))^(~m))*∫((ext_num(rt((~a)⨸(~b),5))*cos(3*(~m)*π⨸5)-ext_den(rt((~a)⨸(~b),5))*cos(3*((~m)+1)*π⨸5)*(~x))⨸(ext_num(rt((~a)⨸(~b),5))^ 2-1⨸2*(1-sqrt(5))*ext_num(rt((~a)⨸(~b),5))*ext_den(rt((~a)⨸(~b),5))*(~x)+ext_den(rt((~a)⨸(~b),5))^2*(~x)^2),(~x)) : nothing)) + +("1_1_3_2_36", +:(∫((~x)^(~!m)/((~a)+(~!b)*(~x)^5),(~x)) ) => :( + !contains_var((~a),(~b),(~x)) && + igt((~m),0) && + lt((~m),4) && + neg((~a)/(~b)) ? +(ext_num(rt(-(~a)⨸(~b),5))^((~m)+1)⨸(5*(~a)*ext_den(rt(-(~a)⨸(~b),5))^(~m)))*∫(1⨸(ext_num(rt(-(~a)⨸(~b),5))-ext_den(rt(-(~a)⨸(~b),5))*(~x)),(~x)) + 2*(-1)^(~m)*ext_num(rt(-(~a)⨸(~b),5))^((~m)+1)⨸(5*(~a)*ext_den(rt(-(~a)⨸(~b),5))^(~m))*∫((ext_num(rt(-(~a)⨸(~b),5))*cos((~m)*π⨸5)+ext_den(rt(-(~a)⨸(~b),5))*cos(((~m)+1)*π⨸5)*(~x))⨸( ext_num(rt(-(~a)⨸(~b),5))^2+1⨸2*(1+sqrt(5))*ext_num(rt(-(~a)⨸(~b),5))*ext_den(rt(-(~a)⨸(~b),5))*(~x)+ext_den(rt(-(~a)⨸(~b),5))^2*(~x)^2),(~x)) + 2*(-1)^(~m)*ext_num(rt(-(~a)⨸(~b),5))^((~m)+1)⨸(5*(~a)*ext_den(rt(-(~a)⨸(~b),5))^(~m))*∫((ext_num(rt(-(~a)⨸(~b),5))*cos(3*(~m)*π⨸5)+ext_den(rt(-(~a)⨸(~b),5))*cos(3*((~m)+1)*π⨸5)* (~x))⨸(ext_num(rt(-(~a)⨸(~b),5))^2+1⨸2*(1-sqrt(5))*ext_num(rt(-(~a)⨸(~b),5))*ext_den(rt(-(~a)⨸(~b),5))*(~x)+ext_den(rt(-(~a)⨸(~b),5))^2*(~x)^2),(~x)) : nothing)) + +# ("1_1_3_2_37", +# @rule ∫((~x)^(~!m)/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 1)/2, 0) && +# igt((~m), 0) && +# lt((~m), (~n) - 1) && +# pos((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt((~a)⨸(~b), (~n))), (~s) = ext_den(rt((~a)⨸(~b), (~n))), (~k), (~u)}, (~u) = ∫(((~r)*cos((2*(~k) - 1)*(~m)*π⨸(~n)) - (~s)*cos((2*(~k) - 1)*((~m) + 1)*π⨸(~n))*(~x))⨸((~r)^2 - 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); -(-(~r))^((~m) + 1)⨸((~a)*(~n)*(~s)^(~m))*∫(1⨸((~r) + (~s)*(~x)), (~x)) + dist(2*(~r)^((~m) + 1)⨸((~a)*(~n)*(~s)^(~m)), sum([(~u) for (~k) in ( 1):( ((~n) - 1)⨸2)]), (~x))] : nothing) +# +# ("1_1_3_2_38", +# @rule ∫((~x)^(~!m)/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 1)/2, 0) && +# igt((~m), 0) && +# lt((~m), (~n) - 1) && +# neg((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt(-(~a)⨸(~b), (~n))), (~s) = ext_den(rt(-(~a)⨸(~b), (~n))), (~k), (~u)}, (~u) = ∫(((~r)*cos((2*(~k) - 1)*(~m)*π⨸(~n)) + (~s)*cos((2*(~k) - 1)*((~m) + 1)*π⨸(~n))*(~x))⨸((~r)^2 + 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); (~r)^((~m) + 1)⨸((~a)*(~n)*(~s)^(~m))*∫(1⨸((~r) - (~s)*(~x)), (~x)) - dist(2*(-(~r))^((~m) + 1)⨸((~a)*(~n)*(~s)^(~m)), sum([(~u) for (~k) in ( 1):( ((~n) - 1)⨸2)]), (~x))] : nothing) +# +# ("1_1_3_2_39", +# @rule ∫((~x)^(~!m)/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 2)/4, 0) && +# igt((~m), 0) && +# lt((~m), (~n) - 1) && +# pos((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt((~a)⨸(~b), (~n))), (~s) = ext_den(rt((~a)⨸(~b), (~n))), (~k), (~u)}, (~u) = ∫(((~r)*cos((2*(~k) - 1)*(~m)*π⨸(~n)) - (~s)*cos((2*(~k) - 1)*((~m) + 1)*π⨸(~n))*(~x))⨸((~r)^2 - 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)) + ∫(((~r)*cos((2*(~k) - 1)*(~m)*π⨸(~n)) + (~s)*cos((2*(~k) - 1)*((~m) + 1)*π⨸(~n))*(~x))⨸((~r)^2 + 2*(~r)*(~s)*cos((2*(~k) - 1)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); 2*(-1)^((~m)⨸2)*(~r)^((~m) + 2)⨸((~a)*(~n)*(~s)^(~m))*∫(1⨸((~r)^2 + (~s)^2*(~x)^2), (~x)) + dist(2*(~r)^((~m) + 1)⨸((~a)*(~n)*(~s)^(~m)), sum([(~u) for (~k) in ( 1):( ((~n) - 2)⨸4)]), (~x))] : nothing) +# +# ("1_1_3_2_40", +# @rule ∫((~x)^(~!m)/((~a) + (~!b)*(~x)^(~n)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# igt(((~n) - 2)/4, 0) && +# igt((~m), 0) && +# lt((~m), (~n) - 1) && +# neg((~a)/(~b)) ? +# Module[{(~r) = ext_num(rt(-(~a)⨸(~b), (~n))), (~s) = ext_den(rt(-(~a)⨸(~b), (~n))), (~k), (~u)}, (~u) = ∫(((~r)*cos(2*(~k)*(~m)*π⨸(~n)) - (~s)*cos(2*(~k)*((~m) + 1)*π⨸(~n))*(~x))⨸((~r)^2 - 2*(~r)*(~s)*cos(2*(~k)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)) + ∫(((~r)*cos(2*(~k)*(~m)*π⨸(~n)) + (~s)*cos(2*(~k)*((~m) + 1)*π⨸(~n))*(~x))⨸((~r)^2 + 2*(~r)*(~s)*cos(2*(~k)*π⨸(~n))*(~x) + (~s)^2*(~x)^2), (~x)); 2*(~r)^((~m) + 2)⨸((~a)*(~n)*(~s)^(~m))*∫(1⨸((~r)^2 - (~s)^2*(~x)^2), (~x)) + dist(2*(~r)^((~m) + 1)⨸((~a)*(~n)*(~s)^(~m)), sum([(~u) for (~k) in ( 1):( ((~n) - 2)⨸4)]), (~x))] : nothing) +# +# ("1_1_3_2_41", +# @rule ∫((~x)^2/((~a) + (~!b)*(~x)^4),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# ( +# gt((~a)/(~b), 0) || +# pos((~a)/(~b)) && +# atom(SplitProduct[SumBaseQ, (~a))] && +# atom(SplitProduct[SumBaseQ, (~b))] +# ) ? +# 1⨸(2*ext_den(rt((~a)⨸(~b), 2)))*∫((ext_num(rt((~a)⨸(~b), 2)) + ext_den(rt((~a)⨸(~b), 2))*(~x)^2)⨸((~a) + (~b)*(~x)^4), (~x)) - 1⨸(2*ext_den(rt((~a)⨸(~b), 2)))*∫((ext_num(rt((~a)⨸(~b), 2)) - ext_den(rt((~a)⨸(~b), 2))*(~x)^2)⨸((~a) + (~b)*(~x)^4), (~x)) : nothing) + +("1_1_3_2_42", +:(∫((~x)^2/((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + !(gt((~a)/(~b), 0)) ? +ext_den(rt(-(~a)⨸(~b), 2))⨸(2*(~b))*∫(1⨸(ext_num(rt(-(~a)⨸(~b), 2)) + ext_den(rt(-(~a)⨸(~b), 2))*(~x)^2), (~x)) - ext_den(rt(-(~a)⨸(~b), 2))⨸(2*(~b))*∫(1⨸(ext_num(rt(-(~a)⨸(~b), 2)) - ext_den(rt(-(~a)⨸(~b), 2))*(~x)^2), (~x)) : nothing)) + +("1_1_3_2_43", +:(∫((~x)^(~!m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n)/4, 0) && + igt((~m), 0) && + lt((~m), (~n) - 1) && + gt((~a)/(~b), 0) ? +ext_den(rt((~a)⨸(~b), 4))^3⨸(2*sqrt(2)*(~b)*ext_num(rt((~a)⨸(~b), 4)))* ∫((~x)^((~m) - (~n)⨸4)⨸(ext_num(rt((~a)⨸(~b), 4))^2 - sqrt(2)*ext_num(rt((~a)⨸(~b), 4))*ext_den(rt((~a)⨸(~b), 4))*(~x)^((~n)⨸4) + ext_den(rt((~a)⨸(~b), 4))^2*(~x)^((~n)⨸2)), (~x)) - ext_den(rt((~a)⨸(~b), 4))^3⨸(2*sqrt(2)*(~b)*ext_num(rt((~a)⨸(~b), 4)))* ∫((~x)^((~m) - (~n)⨸4)⨸(ext_num(rt((~a)⨸(~b), 4))^2 + sqrt(2)*ext_num(rt((~a)⨸(~b), 4))*ext_den(rt((~a)⨸(~b), 4))*(~x)^((~n)⨸4) + ext_den(rt((~a)⨸(~b), 4))^2*(~x)^((~n)⨸2)), (~x)) : nothing)) + +("1_1_3_2_44", +:(∫((~x)^(~m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n)/4, 0) && + igt((~m), 0) && + lt((~m), (~n)/2) && + !(gt((~a)/(~b), 0)) ? +ext_num(rt(-(~a)⨸(~b), 2))⨸(2*(~a))*∫((~x)^(~m)⨸(ext_num(rt(-(~a)⨸(~b), 2)) + ext_den(rt(-(~a)⨸(~b), 2))*(~x)^((~n)⨸2)), (~x)) + ext_num(rt(-(~a)⨸(~b), 2))⨸(2*(~a))*∫((~x)^(~m)⨸(ext_num(rt(-(~a)⨸(~b), 2)) - ext_den(rt(-(~a)⨸(~b), 2))*(~x)^((~n)⨸2)), (~x)) : nothing)) + +("1_1_3_2_45", +:(∫((~x)^(~m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n)/4, 0) && + igt((~m), 0) && + le((~n)/2, (~m)) && + lt((~m), (~n)) && + !(gt((~a)/(~b), 0)) ? +ext_den(rt(-(~a)⨸(~b), 2))⨸(2*(~b))*∫((~x)^((~m) - (~n)⨸2)⨸(ext_num(rt(-(~a)⨸(~b), 2)) + ext_den(rt(-(~a)⨸(~b), 2))*(~x)^((~n)⨸2)), (~x)) - ext_den(rt(-(~a)⨸(~b), 2))⨸(2*(~b))*∫((~x)^((~m) - (~n)⨸2)⨸(ext_num(rt(-(~a)⨸(~b), 2)) - ext_den(rt(-(~a)⨸(~b), 2))*(~x)^((~n)⨸2)), (~x)) : nothing)) + +("1_1_3_2_46", +:(∫((~x)^(~m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~m), 0) && + igt((~n), 0) && + gt((~m), 2*(~n) - 1) ? +∫(polynomial_divide((~x)^(~m), ((~a) + (~b)*(~x)^(~n)), (~x)), (~x)) : nothing)) + +("1_1_3_2_47", +:(∫((~x)/sqrt((~a) + (~!b)*(~x)^3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~a)) ? +-(1 - sqrt(3))*ext_den(rt((~b)⨸(~a), 3))⨸ext_num(rt((~b)⨸(~a), 3))*∫(1⨸sqrt((~a) + (~b)*(~x)^3), (~x)) + 1⨸ext_num(rt((~b)⨸(~a), 3))*∫(((1 - sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))⨸sqrt((~a) + (~b)*(~x)^3), (~x)) : nothing)) + +("1_1_3_2_48", +:(∫((~x)/sqrt((~a) + (~!b)*(~x)^3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~a)) ? +-(1 + sqrt(3))*ext_den(rt((~b)⨸(~a), 3))⨸ext_num(rt((~b)⨸(~a), 3))*∫(1⨸sqrt((~a) + (~b)*(~x)^3), (~x)) + 1⨸ext_num(rt((~b)⨸(~a), 3))*∫(((1 + sqrt(3))*ext_den(rt((~b)⨸(~a), 3)) + ext_num(rt((~b)⨸(~a), 3))*(~x))⨸sqrt((~a) + (~b)*(~x)^3), (~x)) : nothing)) + +("1_1_3_2_49", +:(∫((~x)^2/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~b)/(~a)) ? +1⨸rt((~b)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~b)*(~x)^4), (~x)) - 1⨸rt((~b)⨸(~a), 2)*∫((1 - rt((~b)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^4), (~x)) : nothing)) + +("1_1_3_2_50", +:(∫((~x)^2/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + lt((~a), 0) && + gt((~b), 0) ? +1⨸rt(-(~b)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~b)*(~x)^4), (~x)) - 1⨸rt(-(~b)⨸(~a), 2)*∫((1 - rt(-(~b)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^4), (~x)) : nothing)) + +("1_1_3_2_51", +:(∫((~x)^2/sqrt((~a) + (~!b)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~b)/(~a)) ? +-1⨸rt(-(~b)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~b)*(~x)^4), (~x)) + 1⨸rt(-(~b)⨸(~a), 2)*∫((1 + rt(-(~b)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^4), (~x)) : nothing)) + +("1_1_3_2_52", +:(∫((~x)^4/sqrt((~a) + (~!b)*(~x)^6),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +(sqrt(3) - 1)*ext_den(rt((~b)⨸(~a), 3))^2⨸(2*ext_num(rt((~b)⨸(~a), 3))^2)*∫(1⨸sqrt((~a) + (~b)*(~x)^6), (~x)) - 1⨸(2*ext_num(rt((~b)⨸(~a), 3))^2)* ∫(((sqrt(3) - 1)*ext_den(rt((~b)⨸(~a), 3))^2 - 2*ext_num(rt((~b)⨸(~a), 3))^2*(~x)^4)⨸sqrt((~a) + (~b)*(~x)^6), (~x)) : nothing)) + +#(* Int[x_^4/Sqrt[a_+b_.*x_^6],x_Symbol] := With[{r=Numer[Rt[b/a,3]], s=Denom[Rt[b/a,3]]}, (1+Sqrt[3])*r*x*Sqrt[a+b*x^6]/(2*b*(s+(1+Sqrt[3])*r*x^2)) - 3^(1/4)*s*x*(s+r*x^2)*Sqrt[(s^2-r*s*x^2+r^2*x^4)/(s+(1+Sqrt[3])*r*x^ 2)^2]/ (2*r^2*Sqrt[a+b*x^6]*Sqrt[r*x^2*(s+r*x^2)/(s+(1+Sqrt[3])*r*x^2)^2] )* EllipticE[ArcCos[(s+(1-Sqrt[3])*r*x^2)/(s+(1+Sqrt[3])*r*x^2)],(2+ Sqrt[3])/4] - (1-Sqrt[3])*s*x*(s+r*x^2)*Sqrt[(s^2-r*s*x^2+r^2*x^4)/(s+(1+Sqrt[3])* r*x^2)^2]/ (4*3^(1/4)*r^2*Sqrt[a+b*x^6]*Sqrt[r*x^2*(s+r*x^2)/(s+(1+Sqrt[3])* r*x^2)^2])* EllipticF[ArcCos[(s+(1-Sqrt[3])*r*x^2)/(s+(1+Sqrt[3])*r*x^2)],(2+ Sqrt[3])/4]] /; FreeQ[{a,b},x] *) +("1_1_3_2_53", +:(∫((~x)^2/sqrt((~a) + (~!b)*(~x)^8),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +1⨸(2*rt((~b)⨸(~a), 4))*∫((1 + rt((~b)⨸(~a), 4)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^8), (~x)) - 1⨸(2*rt((~b)⨸(~a), 4))*∫((1 - rt((~b)⨸(~a), 4)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^8), (~x)) : nothing)) + +("1_1_3_2_54", +:(∫((~x)^2/((~a) + (~!b)*(~x)^4)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~b)/(~a)) ? +(~x)^3⨸(2*((~a) + (~b)*(~x)^4)^(1⨸4)) - (~a)⨸2*∫((~x)^2⨸((~a) + (~b)*(~x)^4)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_55", +:(∫((~x)^2/((~a) + (~!b)*(~x)^4)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~b)/(~a)) ? +((~a) + (~b)*(~x)^4)^(3⨸4)⨸(2*(~b)*(~x)) + (~a)⨸(2*(~b))*∫(1⨸((~x)^2*((~a) + (~b)*(~x)^4)^(1⨸4)), (~x)) : nothing)) + +("1_1_3_2_56", +:(∫(1/((~x)^2*((~a) + (~!b)*(~x)^4)^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + pos((~b)/(~a)) ? +-1⨸((~x)*((~a) + (~b)*(~x)^4)^(1⨸4)) - (~b)*∫((~x)^2⨸((~a) + (~b)*(~x)^4)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_57", +:(∫(1/((~x)^2*((~a) + (~!b)*(~x)^4)^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + neg((~b)/(~a)) ? +(~x)*(1 + (~a)⨸((~b)*(~x)^4))^(1⨸4)⨸((~a) + (~b)*(~x)^4)^(1⨸4)* ∫(1⨸((~x)^3*(1 + (~a)⨸((~b)*(~x)^4))^(1⨸4)), (~x)) : nothing)) + +("1_1_3_2_58", +:(∫(sqrt((~c)*(~x))/((~a) + (~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + pos((~b)/(~a)) ? +(~x)*sqrt((~c)*(~x))⨸((~a) + (~b)*(~x)^2)^(1⨸4) - (~a)⨸2*∫(sqrt((~c)*(~x))⨸((~a) + (~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_59", +:(∫(sqrt((~c)*(~x))/((~a) + (~!b)*(~x)^2)^(1//4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + neg((~b)/(~a)) ? +(~c)*((~a) + (~b)*(~x)^2)^(3⨸4)⨸((~b)*sqrt((~c)*(~x))) + (~a)*(~c)^2⨸(2*(~b))*∫(1⨸(((~c)*(~x))^(3⨸2)*((~a) + (~b)*(~x)^2)^(1⨸4)), (~x)) : nothing)) + +("1_1_3_2_60", +:(∫(1/(((~!c)*(~x))^(3//2)*((~a) + (~!b)*(~x)^2)^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + pos((~b)/(~a)) ? +-2⨸((~c)*sqrt((~c)*(~x))*((~a) + (~b)*(~x)^2)^(1⨸4)) - (~b)⨸(~c)^2*∫(sqrt((~c)*(~x))⨸((~a) + (~b)*(~x)^2)^(5⨸4), (~x)) : nothing)) + +("1_1_3_2_61", +:(∫(1/(((~!c)*(~x))^(3//2)*((~a) + (~!b)*(~x)^2)^(1//4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + neg((~b)/(~a)) ? +sqrt((~c)*(~x))*(1 + (~a)⨸((~b)*(~x)^2))^(1⨸4)⨸((~c)^2*((~a) + (~b)*(~x)^2)^(1⨸4))* ∫(1⨸((~x)^2*(1 + (~a)⨸((~b)*(~x)^2))^(1⨸4)), (~x)) : nothing)) + +("1_1_3_2_62", +:(∫(sqrt((~x))/sqrt((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt(-(~b)/(~a), 0) && + gt((~a), 0) ? +-2⨸(sqrt((~a))*(-(~b)⨸(~a))^(3⨸4))* int_and_subst(sqrt(1 - 2*(~x)^2)⨸sqrt(1 - (~x)^2), (~x), (~x), sqrt(1 - sqrt(-(~b)⨸(~a))*(~x))⨸sqrt(2), "1_1_3_2_62") : nothing)) + +("1_1_3_2_63", +:(∫(sqrt((~x))/sqrt((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + gt(-(~b)/(~a), 0) && + !(gt((~a), 0)) ? +sqrt(1 + (~b)*(~x)^2⨸(~a))⨸sqrt((~a) + (~b)*(~x)^2)* ∫(sqrt((~x))⨸sqrt(1 + (~b)*(~x)^2⨸(~a)), (~x)) : nothing)) + +("1_1_3_2_64", +:(∫(sqrt((~c)*(~x))/sqrt((~a) + (~!b)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~x)) && + gt(-(~b)/(~a), 0) ? +sqrt((~c)*(~x))⨸sqrt((~x))*∫(sqrt((~x))⨸sqrt((~a) + (~b)*(~x)^2), (~x)) : nothing)) + +("1_1_3_2_65", +:(∫(((~!c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~p), (~x)) && + igt((~n), 0) && + gt((~m), (~n) - 1) && + !eq((~m) + (~n)*(~p) + 1, 0) && + int_binomial((~a), (~b), (~c), (~n), (~m), (~p), (~x)) ? +(~c)^((~n) - 1)*((~c)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*((~m) + (~n)*(~p) + 1)) - (~a)*(~c)^(~n)*((~m) - (~n) + 1)⨸((~b)*((~m) + (~n)*(~p) + 1))* ∫(((~c)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_66", +:(∫(((~!c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + igt((~n), 0) && + sumsimpler((~m), -(~n)) && + !eq((~m) + (~n)*(~p) + 1, 0) && + ilt(simplify(((~m) + 1)/(~n) + (~p)), 0) ? +(~c)^((~n) - 1)*((~c)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*((~m) + (~n)*(~p) + 1)) - (~a)*(~c)^(~n)*((~m) - (~n) + 1)⨸((~b)*((~m) + (~n)*(~p) + 1))* ∫(((~c)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_67", +:(∫(((~!c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + gt((~m), 2*(~n) - 1) && + !eq((~m) + 2*(~n)*(~p) + 1, 0) && + int_binomial((~a1)*(~a2), (~b1)*(~b2), (~c), 2*(~n), (~m), (~p), (~x)) ? +(~c)^(2*(~n) - 1)*((~c)*(~x))^((~m) - 2*(~n) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸((~b1)*(~b2)*((~m) + 2*(~n)*(~p) + 1)) - (~a1)*(~a2)*(~c)^(2*(~n))*((~m) - 2*(~n) + 1)⨸((~b1)*(~b2)*((~m) + 2*(~n)*(~p) + 1))* ∫(((~c)*(~x))^((~m) - 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_68", +:(∫(((~!c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + sumsimpler((~m), -2*(~n)) && + !eq((~m) + 2*(~n)*(~p) + 1, 0) && + ilt(simplify(((~m) + 1)/(2*(~n)) + (~p)), 0) ? +(~c)^(2*(~n) - 1)*((~c)*(~x))^((~m) - 2*(~n) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸((~b1)*(~b2)*((~m) + 2*(~n)*(~p) + 1)) - (~a1)*(~a2)*(~c)^(2*(~n))*((~m) - 2*(~n) + 1)⨸((~b1)*(~b2)*((~m) + 2*(~n)*(~p) + 1))* ∫(((~c)*(~x))^((~m) - 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_69", +:(∫(((~!c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~p), (~x)) && + igt((~n), 0) && + lt((~m), -1) && + int_binomial((~a), (~b), (~c), (~n), (~m), (~p), (~x)) ? +((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)*((~m) + 1)) - (~b)*((~m) + (~n)*((~p) + 1) + 1)⨸((~a)*(~c)^(~n)*((~m) + 1))* ∫(((~c)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_70", +:(∫(((~!c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + igt((~n), 0) && + sumsimpler((~m), (~n)) && + ilt(simplify(((~m) + 1)/(~n) + (~p)), 0) ? +((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)*((~m) + 1)) - (~b)*((~m) + (~n)*((~p) + 1) + 1)⨸((~a)*(~c)^(~n)*((~m) + 1))* ∫(((~c)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_71", +:(∫(((~!c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + lt((~m), -1) && + int_binomial((~a1)*(~a2), (~b1)*(~b2), (~c), 2*(~n), (~m), (~p), (~x)) ? +((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸((~a1)*(~a2)* (~c)*((~m) + 1)) - (~b1)*(~b2)*((~m) + 2*(~n)*((~p) + 1) + 1)⨸((~a1)*(~a2)*(~c)^(2*(~n))*((~m) + 1))* ∫(((~c)*(~x))^((~m) + 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_72", +:(∫(((~!c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + sumsimpler((~m), 2*(~n)) && + ilt(simplify(((~m) + 1)/(2*(~n)) + (~p)), 0) ? +((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸((~a1)*(~a2)* (~c)*((~m) + 1)) - (~b1)*(~b2)*((~m) + 2*(~n)*((~p) + 1) + 1)⨸((~a1)*(~a2)*(~c)^(2*(~n))*((~m) + 1))* ∫(((~c)*(~x))^((~m) + 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_73", +:(∫(((~!c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~p), (~x)) && + igt((~n), 0) && + isfraction((~m)) && + int_binomial((~a), (~b), (~c), (~n), (~m), (~p), (~x)) ? +ext_den((~m))⨸(~c)* int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*(~x)^(ext_den((~m))*(~n))⨸(~c)^(~n))^(~p), (~x), (~x), ((~c)*(~x))^(1⨸ext_den((~m))), "1_1_3_2_73") : nothing)) + +("1_1_3_2_74", +:(∫(((~!c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + isfraction((~m)) && + int_binomial((~a1)*(~a2), (~b1)*(~b2), (~c), 2*(~n), (~m), (~p), (~x)) ? +ext_den((~m))⨸(~c)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a1) + (~b1)*(~x)^(ext_den((~m))*(~n))⨸(~c)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(ext_den((~m))*(~n))⨸(~c)^(~n))^ (~p), (~x), (~x), ((~c)*(~x))^(1⨸ext_den((~m))), "1_1_3_2_74") : nothing)) + +("1_1_3_2_75", +:(∫((~x)/((~a) + (~!b)*(~x)^3)^(2//3),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) ? +-atan((1 + 2*rt((~b), 3)*(~x)⨸((~a) + (~b)*(~x)^3)^(1⨸3))⨸sqrt(3))⨸(sqrt(3)*rt((~b), 3)^2) - log(rt((~b), 3)*(~x) - ((~a) + (~b)*(~x)^3)^(1⨸3))⨸(2*rt((~b), 3)^2) : nothing)) + +("1_1_3_2_76", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n), 0) && + lt(-1, (~p), 0) && + !eq((~p), -1/2) && + ext_isinteger((~m), (~p) + ((~m) + 1)/(~n)) ? +(~a)^((~p) + ((~m) + 1)⨸(~n))* int_and_subst((~x)^(~m)⨸(1 - (~b)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(~n) + 1), (~x), (~x), (~x)⨸((~a) + (~b)*(~x)^(~n))^(1⨸(~n)), "1_1_3_2_76") : nothing)) + +("1_1_3_2_77", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + lt(-1, (~p), 0) && + !eq((~p), -1/2) && + ext_isinteger((~m), (~p) + ((~m) + 1)/(2*(~n))) ? +((~a1)*(~a2))^((~p) + ((~m) + 1)⨸(2*(~n)))* int_and_subst((~x)^(~m)⨸((1 - (~b1)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(2*(~n)) + 1)*(1 - (~b2)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(2*(~n)) + 1)), (~x), (~x), (~x)⨸(((~a1) + (~b1)*(~x)^(~n))^(1⨸(2*(~n)))*((~a2) + (~b2)*(~x)^(~n))^(1⨸(2*(~n)))), "1_1_3_2_77") : nothing)) + +("1_1_3_2_78", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~x)) && + igt((~n), 0) && + lt(-1, (~p), 0) && + !eq((~p), -1/2) && + ext_isinteger((~m)) && + lt(ext_den((~p) + ((~m) + 1)/(~n)), ext_den((~p))) ? +((~a)⨸((~a) + (~b)*(~x)^(~n)))^((~p) + ((~m) + 1)⨸(~n))*((~a) + (~b)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(~n))* int_and_subst((~x)^(~m)⨸(1 - (~b)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(~n) + 1), (~x), (~x), (~x)⨸((~a) + (~b)*(~x)^(~n))^(1⨸(~n)), "1_1_3_2_78") : nothing)) + +("1_1_3_2_79", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + igt(2*(~n), 0) && + lt(-1, (~p), 0) && + !eq((~p), -1/2) && + ext_isinteger((~m)) && + lt(ext_den((~p) + ((~m) + 1)/(2*(~n))), ext_den((~p))) ? +((~a1)⨸((~a1) + (~b1)*(~x)^(~n)))^((~p) + ((~m) + 1)⨸(2*(~n)))*((~a1) + (~b1)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(2*(~n)))*((~a2)⨸((~a2) + (~b2)*(~x)^(~n)))^((~p) + ((~m) + 1)⨸(2*(~n)))*((~a2) + (~b2)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(2*(~n)))* int_and_subst((~x)^(~m)⨸((1 - (~b1)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(2*(~n)) + 1)*(1 - (~b2)*(~x)^(~n))^((~p) + ((~m) + 1)⨸(2*(~n)) + 1)), (~x), (~x), (~x)⨸(((~a1) + (~b1)*(~x)^(~n))^(1⨸(2*(~n)))*((~a2) + (~b2)*(~x)^(~n))^(1⨸(2*(~n)))), "1_1_3_2_79") : nothing)) + +("1_1_3_2_80", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~p), (~x)) && + ilt((~n), 0) && + ext_isinteger((~m)) ? +-int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_2_80") : nothing)) + +("1_1_3_2_81", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ilt(2*(~n), 0) && + ext_isinteger((~m)) ? +-int_and_subst(((~a1) + (~b1)*(~x)^(-(~n)))^(~p)*((~a2) + (~b2)*(~x)^(-(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_2_81") : nothing)) + +("1_1_3_2_82", +:(∫(((~!c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~p), (~x)) && + ilt((~n), 0) && + isfraction((~m)) ? +-ext_den((~m))⨸(~c)* int_and_subst(((~a) + (~b)*(~c)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~p)⨸(~x)^(ext_den((~m))*((~m) + 1) + 1), (~x), (~x), 1⨸((~c)*(~x))^(1⨸ext_den((~m))), "1_1_3_2_82") : nothing)) + +("1_1_3_2_83", +:(∫(((~!c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ilt(2*(~n), 0) && + isfraction((~m)) ? +-ext_den((~m))⨸(~c)* int_and_subst(((~a1) + (~b1)*(~c)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~p)*((~a2) + (~b2)*(~c)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~p)⨸ (~x)^(ext_den((~m))*((~m) + 1) + 1), (~x), (~x), 1⨸((~c)*(~x))^(1⨸ext_den((~m))), "1_1_3_2_83") : nothing)) + +("1_1_3_2_84", +:(∫(((~!c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + ilt((~n), 0) && + !(isrational((~m))) ? +-1⨸(~c)*((~c)*(~x))^((~m) + 1)*(1⨸(~x))^((~m) + 1)* int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_2_84") : nothing)) + +("1_1_3_2_85", +:(∫(((~!c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ilt(2*(~n), 0) && + !(isrational((~m))) ? +-1⨸(~c)*((~c)*(~x))^((~m) + 1)*(1⨸(~x))^((~m) + 1)* int_and_subst(((~a1) + (~b1)*(~x)^(-(~n)))^(~p)*((~a2) + (~b2)*(~x)^(-(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_2_85") : nothing)) + +("1_1_3_2_86", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~p), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*(~x)^(ext_den((~n))*(~n)))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "1_1_3_2_86") : nothing)) + +("1_1_3_2_87", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + isfraction(2*(~n)) ? +ext_den(2*(~n))*int_and_subst((~x)^(ext_den(2*(~n))*((~m) + 1) - 1)*((~a1) + (~b1)*(~x)^(ext_den(2*(~n))*(~n)))^(~p)*((~a2) + (~b2)*(~x)^(ext_den(2*(~n))*(~n)))^(~p), (~x), (~x), (~x)^(1⨸ext_den(2*(~n))), "1_1_3_2_87") : nothing)) + +("1_1_3_2_88", +:(∫(((~c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + isfraction((~n)) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_89", +:(∫(((~c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + isfraction(2*(~n)) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_90", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +1⨸((~m) + 1)* int_and_subst(((~a) + (~b)*(~x)^simplify((~n)⨸((~m) + 1)))^(~p), (~x), (~x), (~x)^((~m) + 1), "1_1_3_2_90") : nothing)) + +("1_1_3_2_91", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger(simplify(2*(~n)/((~m) + 1))) && + !(ext_isinteger(2*(~n))) ? +1⨸((~m) + 1)* int_and_subst(((~a1) + (~b1)*(~x)^simplify((~n)⨸((~m) + 1)))^ (~p)*((~a2) + (~b2)*(~x)^simplify((~n)⨸((~m) + 1)))^(~p), (~x), (~x), (~x)^((~m) + 1), "1_1_3_2_91") : nothing)) + +("1_1_3_2_92", +:(∫(((~c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_93", +:(∫(((~c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger(simplify(2*(~n)/((~m) + 1))) && + !(ext_isinteger(2*(~n))) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_94", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq(((~m) + 1)/(~n) + (~p), 0) && + gt((~p), 0) ? +(~x)^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^(~p)⨸((~m) + 1) - (~b)*(~n)*(~p)⨸((~m) + 1)*∫((~x)^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_95", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~n), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + eq(((~m) + 1)/(2*(~n)) + (~p), 0) && + gt((~p), 0) ? +(~x)^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p)⨸((~m) + 1) - 2*(~b1)*(~b2)*(~n)*(~p)⨸((~m) + 1)* ∫((~x)^((~m) + 2*(~n))*((~a1) + (~b1)*(~x)^(~n))^((~p) - 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_96", +:(∫(((~c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + eq(((~m) + 1)/(~n) + (~p), 0) && + gt((~p), 0) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_97", +:(∫(((~c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + eq(((~m) + 1)/(2*(~n)) + (~p), 0) && + gt((~p), 0) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_98", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + ext_isinteger((~p) + simplify(((~m) + 1)/(~n))) && + gt((~p), 0) && + !eq((~m) + (~n)*(~p) + 1, 0) ? +((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^(~p)⨸((~c)*((~m) + (~n)*(~p) + 1)) + (~a)*(~n)*(~p)⨸((~m) + (~n)*(~p) + 1)*∫(((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_99", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger((~p) + simplify(((~m) + 1)/(2*(~n)))) && + gt((~p), 0) && + !eq((~m) + 2*(~n)*(~p) + 1, 0) ? +((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^ (~p)*((~a2) + (~b2)*(~x)^(~n))^(~p)⨸((~c)*((~m) + 2*(~n)*(~p) + 1)) + 2*(~a1)*(~a2)*(~n)*(~p)⨸((~m) + 2*(~n)*(~p) + 1)* ∫(((~c)*(~x))^(~m)*((~a1) + (~b1)*(~x)^(~n))^((~p) - 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) - 1), (~x)) : nothing)) + +("1_1_3_2_100", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~x)) && + ext_isinteger((~p) + simplify(((~m) + 1)/(~n))) && + lt(-1, (~p), 0) ? +ext_den((~p))*(~a)^((~p) + simplify(((~m) + 1)⨸(~n)))⨸(~n)* int_and_subst((~x)^(ext_den((~p))*simplify(((~m) + 1)⨸(~n)) - 1)⨸(1 - (~b)*(~x)^ext_den((~p)))^((~p) + simplify(((~m) + 1)⨸(~n)) + 1), (~x), (~x), (~x)^((~n)⨸ext_den((~p)))⨸((~a) + (~b)*(~x)^(~n))^(1⨸ext_den((~p))), "1_1_3_2_100") : nothing)) + +("1_1_3_2_101", +:(∫((~x)^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~m), (~n), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger((~p) + simplify(((~m) + 1)/(2*(~n)))) && + lt(-1, (~p), 0) ? +ext_den((~p))*((~a1)*(~a2))^((~p) + simplify(((~m) + 1)⨸(2*(~n))))⨸(2*(~n))* int_and_subst((~x)^(ext_den((~p))*simplify(((~m) + 1)⨸(2*(~n))) - 1)⨸(1 - (~b1)*(~b2)*(~x)^ext_den((~p)))^((~p) + simplify(((~m) + 1)⨸(2*(~n))) + 1), (~x), (~x), (~x)^(2*(~n)⨸ext_den((~p)))⨸(((~a1) + (~b1)*(~x)^(~n))^(1⨸ext_den((~p)))*((~a2) + (~b2)*(~x)^(~n))^(1⨸ext_den((~p)))), "1_1_3_2_101") : nothing)) + +("1_1_3_2_102", +:(∫(((~c)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + ext_isinteger((~p) + simplify(((~m) + 1)/(~n))) && + lt(-1, (~p), 0) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_103", +:(∫(((~c)*(~x))^(~m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger((~p) + simplify(((~m) + 1)/(2*(~n)))) && + lt(-1, (~p), 0) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a1) + (~b1)*(~x)^(~n))^(~p)*((~a2) + (~b2)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_2_104", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + ext_isinteger((~p) + simplify(((~m) + 1)/(~n))) && + lt((~p), -1) ? +-((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)*(~n)*((~p) + 1)) + ((~m) + (~n)*((~p) + 1) + 1)⨸((~a)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_2_105", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ext_isinteger((~p) + simplify(((~m) + 1)/(2*(~n)))) && + lt((~p), -1) ? +-((~c)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1)⨸(2*(~a1)* (~a2)*(~c)*(~n)*((~p) + 1)) + ((~m) + 2*(~n)*((~p) + 1) + 1)⨸(2*(~a1)*(~a2)*(~n)*((~p) + 1))* ∫(((~c)*(~x))^(~m)*((~a1) + (~b1)*(~x)^(~n))^((~p) + 1)*((~a2) + (~b2)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_2_106", +:(∫((~x)^(~!m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~x)) && + isfraction(simplify(((~m) + 1)/(~n))) && + sumsimpler((~m), -(~n)) ? +(~x)^(simplify((~m) - (~n)) + 1)⨸((~b)*(simplify((~m) - (~n)) + 1)) - (~a)⨸(~b)*∫((~x)^simplify((~m) - (~n))⨸((~a) + (~b)*(~x)^(~n)), (~x)) : nothing)) + +("1_1_3_2_107", +:(∫((~x)^(~m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~x)) && + isfraction(simplify(((~m) + 1)/(~n))) && + sumsimpler((~m), (~n)) ? +(~x)^((~m) + 1)⨸((~a)*((~m) + 1)) - (~b)⨸(~a)*∫((~x)^simplify((~m) + (~n))⨸((~a) + (~b)*(~x)^(~n)), (~x)) : nothing)) + +("1_1_3_2_108", +:(∫(((~c)*(~x))^(~m)/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + isfraction( simplify(((~m) + 1)/(~n))) && + ( + sumsimpler((~m), (~n)) || + sumsimpler((~m), -(~n)) + ) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)⨸((~a) + (~b)*(~x)^(~n)), (~x)) : nothing)) + +("1_1_3_2_109", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + !(igt((~p), 0)) && + ( + ilt((~p), 0) || + gt((~a), 0) + ) ? +(~a)^(~p)*((~c)*(~x))^((~m) + 1)⨸((~c)*((~m) + 1))* hypergeometric2f1(-(~p), ((~m) + 1)⨸(~n), ((~m) + 1)⨸(~n) + 1, -(~b)*(~x)^(~n)⨸(~a)) : nothing)) + +#(* Int[(c_.*x_)^m_.*(a_+b_.*x_^n_)^p_,x_Symbol] := (c*x)^(m+1)*(a+b*x^n)^(p+1)/(a*c*(m+1))*Hypergeometric2F1[1,(m+1)/n+ p+1,(m+1)/n+1,-b*x^n/a] /; FreeQ[{a,b,c,m,n,p},x] && Not[IGtQ[p,0]] && Not[ILtQ[p,0] || GtQ[a,0]] *) +("1_1_3_2_110", +:(∫(((~!c)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + !(igt((~p), 0)) && + !( + ilt((~p), 0) || + gt((~a), 0) + ) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^(~n))^fracpart((~p))⨸(1 + (~b)*(~x)^(~n)⨸(~a))^fracpart((~p))* ∫(((~c)*(~x))^(~m)*(1 + (~b)*(~x)^(~n)⨸(~a))^(~p), (~x)) : nothing)) + +("1_1_3_2_111", +:(∫(((~!c)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~n))^(~p)*((~a2) + (~!b2)*(~x)^(~n))^(~p),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + !(ext_isinteger((~p))) ? +((~a1) + (~b1)*(~x)^(~n))^ fracpart((~p))*((~a2) + (~b2)*(~x)^(~n))^fracpart((~p))⨸((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^ fracpart((~p))*∫(((~c)*(~x))^(~m)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing)) + +("1_1_3_2_112", +:(∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*((~c)*(~x))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) ? +1⨸(~c)*int_and_subst(((~d)*(~x)⨸(~c))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~c)*(~x), "1_1_3_2_112") : nothing)) + +("1_1_3_2_113", +:(∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*((~!c)*(~x)^(~q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) && + ext_isinteger((~n)*(~q)) && + !eq((~x), ((~c)*(~x)^(~q))^(1/(~q))) ? +((~d)*(~x))^((~m) + 1)⨸((~d)*(((~c)*(~x)^(~q))^(1⨸(~q)))^((~m) + 1))* int_and_subst((~x)^(~m)*((~a) + (~b)*(~x)^((~n)*(~q)))^(~p), (~x), (~x), ((~c)*(~x)^(~q))^(1⨸(~q)), "1_1_3_2_113") : nothing)) + +("1_1_3_2_114", +:(∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*((~!c)*(~x)^(~q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~q), (~x)) && + isfraction((~n)) ? +int_and_subst(((~d)*(~x))^(~m)*((~a) + (~b)*(~c)^(~n)*(~x)^((~n)*(~q)))^(~p), (~x), (~x)^(1⨸ext_den((~n))), ((~c)*(~x)^(~q))^(1⨸ext_den((~n)))⨸((~c)^(1⨸ext_den((~n)))*((~x)^(1⨸ext_den((~n))))^((~q) - 1)), "1_1_3_2_114") : nothing)) + +("1_1_3_2_115", +:(∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*((~!c)*(~x)^(~q))^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) && + !(isrational((~n))) ? +int_and_subst(((~d)*(~x))^(~m)*((~a) + (~b)*(~c)^(~n)*(~x)^((~n)*(~q)))^(~p), (~x), (~x)^((~n)*(~q)), ((~c)*(~x)^(~q))^(~n)⨸(~c)^(~n), "1_1_3_2_115") : nothing)) + +("1_1_3_2_116", +:(∫((~x)^(~!m)*((~a) + (~!b)*(~v)^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~n), (~p), (~x)) && + linear((~v), (~x)) && + ext_isinteger((~m)) && + !eq(ext_coeff((~v), (~x), 0), 0) ? +1⨸ext_coeff((~v), (~x), 1)^((~m) + 1)* int_and_subst(ext_simplify(((~x) - ext_coeff((~v), (~x), 0))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x), (~x), (~v), "1_1_3_2_116") : nothing)) + +("1_1_3_2_117", +:(∫((~u)^(~!m)*((~a) + (~!b)*(~v)^(~n))^(~!p),(~x)) ) => :( + !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && + linear_pair((~u), (~v), (~x)) ? +(~u)^(~m)⨸(ext_coeff((~v), (~x), 1)*(~v)^(~m))* int_and_subst((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~v), "1_1_3_2_117") : nothing)) + + +] \ No newline at end of file diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.3 (a+b x^n)^p (c+d x^n)^q.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.3 (a+b x^n)^p (c+d x^n)^q.jl new file mode 100644 index 0000000..64dded9 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.3 (a+b x^n)^p (c+d x^n)^q.jl @@ -0,0 +1,553 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.3 (a+b x^n)^p (c+d x^n)^q *) +("1_1_3_3_1", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~p), 0) && + igt((~q), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)), (~x)) : nothing)) + +("1_1_3_3_2", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~p), (~q)) && + neg((~n)) ? +∫((~x)^((~n)*((~p) + (~q)))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*((~d) + (~c)*(~x)^(-(~n)))^(~q), (~x)) : nothing)) + +("1_1_3_3_3", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ilt((~n), 0) ? +-int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)⨸(~x)^2, (~x), (~x), 1⨸(~x), "1_1_3_3_3") : nothing)) + +("1_1_3_3_4", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*(~x)^(ext_den((~n))*(~n)))^(~p)*((~c) + (~d)*(~x)^(ext_den((~n))*(~n)))^(~q), (~x), (~x), (~x)^(1⨸ext_den((~n))), "1_1_3_3_4") : nothing)) + +("1_1_3_3_5", +:(∫(1/(((~a) + (~!b)*(~x)^3)^(1//3)*((~c) + (~!d)*(~x)^3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +atan((1 + (2*rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)*(~x))⨸((~a) + (~b)*(~x)^3)^(1⨸3))⨸sqrt(3))⨸(sqrt(3)*(~c)*rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)) + log((~c) + (~d)*(~x)^3)⨸(6*(~c)*rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)) - log(rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)*(~x) - ((~a) + (~b)*(~x)^3)^(1⨸3))⨸(2*(~c)*rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)) : nothing)) + +("1_1_3_3_6", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)/((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~n)*(~p) + 1, 0) && + ext_isinteger((~n)) ? +int_and_subst(1⨸((~c) - ((~b)*(~c) - (~a)*(~d))*(~x)^(~n)), (~x), (~x), (~x)⨸((~a) + (~b)*(~x)^(~n))^(1⨸(~n)), "1_1_3_3_6") : nothing)) + +("1_1_3_3_7", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~n)*((~p) + (~q) + 1) + 1, 0) && + gt((~q), 0) && + !eq((~p), -1) ? +-(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~a)*(~n)*((~p) + 1)) - (~c)*(~q)⨸((~a)*((~p) + 1))*∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1), (~x)) : nothing)) + +("1_1_3_3_8", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~n)*((~p) + (~q) + 1) + 1, 0) && + ilt((~p), 0) ? +(~a)^(~p)*(~x)⨸((~c)^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(1⨸(~n)))* hypergeometric2f1(1⨸(~n), -(~p), 1 + 1⨸(~n), -((~b)*(~c) - (~a)*(~d))*(~x)^(~n)⨸((~a)*((~c) + (~d)*(~x)^(~n)))) : nothing)) + +("1_1_3_3_9", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~n)*((~p) + (~q) + 1) + 1, 0) ? +(~x)*((~a) + (~b)*(~x)^(~n))^ (~p)⨸((~c)*((~c)*((~a) + (~b)*(~x)^(~n))⨸((~a)*((~c) + (~d)*(~x)^(~n))))^(~p)*((~c) + (~d)*(~x)^(~n))^(1⨸(~n) + (~p)))* hypergeometric2f1(1⨸(~n), -(~p), 1 + 1⨸(~n), -((~b)*(~c) - (~a)*(~d))*(~x)^(~n)⨸((~a)*((~c) + (~d)*(~x)^(~n)))) : nothing)) + +("1_1_3_3_10", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~n)*((~p) + (~q) + 2) + 1, 0) && + eq((~a)*(~d)*((~p) + 1) + (~b)*(~c)*((~q) + 1), 0) ? +(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)*(~c)) : nothing)) + +#(* Int[(a1_+b1_.*x_^n2_.)^p_*(a2_+b2_.*x_^n2_.)^p_*(c_+d_.*x_^n_)^q_, x_Symbol] := x*(a1+b1*x^(n/2))^(p+1)*(a2+b2*x^(n/2))^(p+1)*(c+d*x^n)^(q+1)/(a1* a2*c) /; FreeQ[{a1,b1,a2,b2,c,d,n,p,q},x] && EqQ[n2,n/2] && EqQ[a2*b1+a1*b2,0] && EqQ[n*(p+q+2)+1,0] && EqQ[a1*a2*d*(p+1)+b1*b2*c*(q+1),0] *) +("1_1_3_3_11", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~n)*((~p) + (~q) + 2) + 1, 0) && + ( + lt((~p), -1) || + !(lt((~q), -1)) + ) && + !eq((~p), -1) ? +-(~b)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)* (~n)*((~p) + 1)*((~b)*(~c) - (~a)*(~d))) + ((~b)*(~c) + (~n)*((~p) + 1)*((~b)*(~c) - (~a)*(~d)))⨸((~a)*(~n)*((~p) + 1)*((~b)*(~c) - (~a)*(~d)))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing)) + +("1_1_3_3_12", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)*(~d) - (~b)*(~c)*((~n)*((~p) + 1) + 1), 0) ? +(~c)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸(~a) : nothing)) + +("1_1_3_3_13", +:(∫(((~a1) + (~!b1)*(~x)^(~!n2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n2))^ (~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~n), (~p), (~x)) && + eq((~n2), (~n)⨸2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + eq((~a1)*(~a2)*(~d) - (~b1)*(~b2)*(~c)*((~n)*((~p) + 1) + 1), 0) ? +(~c)*(~x)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1)⨸((~a1)*(~a2)) : nothing)) + +("1_1_3_3_14", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + lt((~p), -1) || + ilt(1⨸(~n) + (~p), 0) + ) ? +-((~b)*(~c) - (~a)*(~d))*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~b)*(~n)*((~p) + 1)) - ((~a)*(~d) - (~b)*(~c)*((~n)*((~p) + 1) + 1))⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_3_15", +:(∫(((~a1) + (~!b1)*(~x)^(~!n2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n2))^ (~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~n), (~x)) && + eq((~n2), (~n)⨸2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + lt((~p), -1) || + ilt(1⨸(~n) + (~p), 0) + ) ? +-((~b1)*(~b2)*(~c) - (~a1)*(~a2)*(~d))* (~x)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1)⨸((~a1)*(~a2)*(~b1)* (~b2)*(~n)*((~p) + 1)) - ((~a1)*(~a2)*(~d) - (~b1)*(~b2)*(~c)*((~n)*((~p) + 1) + 1))⨸((~a1)*(~a2)*(~b1)*(~b2)*(~n)*((~p) + 1))* ∫(((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1), (~x)) : nothing)) + +("1_1_3_3_16", +:(∫(((~c) + (~!d)*(~x)^(~n))/((~a) + (~!b)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~n), 0) ? +(~c)*(~x)⨸(~a) - ((~b)*(~c) - (~a)*(~d))⨸(~a)*∫(1⨸((~b) + (~a)*(~x)^(-(~n))), (~x)) : nothing)) + +("1_1_3_3_17", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~n)*((~p) + 1) + 1, 0) ? +(~d)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*((~n)*((~p) + 1) + 1)) - ((~a)*(~d) - (~b)*(~c)*((~n)*((~p) + 1) + 1))⨸((~b)*((~n)*((~p) + 1) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing)) + +("1_1_3_3_18", +:(∫(((~a1) + (~!b1)*(~x)^(~!n2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n2))^ (~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~n), (~p), (~x)) && + eq((~n2), (~n)⨸2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + !eq((~n)*((~p) + 1) + 1, 0) ? +(~d)*(~x)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1)⨸((~b1)* (~b2)*((~n)*((~p) + 1) + 1)) - ((~a1)*(~a2)*(~d) - (~b1)*(~b2)*(~c)*((~n)*((~p) + 1) + 1))⨸((~b1)*(~b2)*((~n)*((~p) + 1) + 1))* ∫(((~a1) + (~b1)*(~x)^((~n)⨸2))^(~p)*((~a2) + (~b2)*(~x)^((~n)⨸2))^(~p), (~x)) : nothing)) + +("1_1_3_3_19", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + igt((~p), 0) && + ilt((~q), 0) && + ge((~p), -(~q)) ? +∫(polynomial_divide(((~a) + (~b)*(~x)^(~n))^(~p), ((~c) + (~d)*(~x)^(~n))^(-(~q)), (~x)), (~x)) : nothing)) + +("1_1_3_3_20", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)/((~c) + (~!d)*(~x)^(~n)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~n)*((~p) - 1) + 1, 0) && + ext_isinteger((~n)) ? +(~b)⨸(~d)*∫(((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing)) + +("1_1_3_3_21", +:(∫(1/(((~a) + (~!b)*(~x)^(~n))*((~c) + (~!d)*(~x)^(~n))),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~a) + (~b)*(~x)^(~n)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing)) + +# same as 1_1_2_3_25 wtf +# ("1_1_3_3_22", +# @rule ∫(1/(((~a) + (~!b)*(~x)^2)^(1//3)*((~c) + (~!d)*(~x)^2)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# eq((~b)*(~c) + 3*(~a)*(~d), 0) && +# pos((~b)⨸(~a)) ? +# rt((~b)⨸(~a), 2)*atanh(sqrt(3)⨸(rt((~b)⨸(~a), 2)*(~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) + rt((~b)⨸(~a), 2)*atanh( sqrt(3)*((~a)^(1⨸3) - 2^(1⨸3)*((~a) + (~b)*(~x)^2)^(1⨸3))⨸((~a)^(1⨸3)*rt((~b)⨸(~a), 2)* (~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) + rt((~b)⨸(~a), 2)*atan(rt((~b)⨸(~a), 2)*(~x))⨸(6*2^(2⨸3)*(~a)^(1⨸3)*(~d)) - rt((~b)⨸(~a), 2)*atan(((~a)^(1⨸3)*rt((~b)⨸(~a), 2)*(~x))⨸((~a)^(1⨸3) + 2^(1⨸3)*((~a) + (~b)*(~x)^2)^(1⨸3)))⨸(2*2^(2⨸3)*(~a)^(1⨸3)*(~d)) : nothing) + +# same as 1_1_2_3_26 wtf +# ("1_1_3_3_23", +# @rule ∫(1/(((~a) + (~!b)*(~x)^2)^(1//3)*((~c) + (~!d)*(~x)^2)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# eq((~b)*(~c) + 3*(~a)*(~d), 0) && +# neg((~b)⨸(~a)) ? +# rt(-(~b)⨸(~a), 2)*atan(sqrt(3)⨸(rt(-(~b)⨸(~a), 2)*(~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) + rt(-(~b)⨸(~a), 2)*atan( sqrt(3)*((~a)^(1⨸3) - 2^(1⨸3)*((~a) + (~b)*(~x)^2)^(1⨸3))⨸((~a)^(1⨸3)*rt(-(~b)⨸(~a), 2)* (~x)))⨸(2*2^(2⨸3)*sqrt(3)*(~a)^(1⨸3)*(~d)) - rt(-(~b)⨸(~a), 2)*atanh(rt(-(~b)⨸(~a), 2)*(~x))⨸(6*2^(2⨸3)*(~a)^(1⨸3)*(~d)) + rt(-(~b)⨸(~a), 2)*atanh(((~a)^(1⨸3)*rt(-(~b)⨸(~a), 2)*(~x))⨸((~a)^(1⨸3) + 2^(1⨸3)*((~a) + (~b)*(~x)^2)^(1⨸3)))⨸(2*2^(2⨸3)*(~a)^(1⨸3)*(~d)) : nothing) + +# same as 1_1_2_3_27 wtf +# ("1_1_3_3_24", +# @rule ∫(1/(((~a) + (~!b)*(~x)^2)^(1//3)*((~c) + (~!d)*(~x)^2)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# eq((~b)*(~c) - 9*(~a)*(~d), 0) && +# pos((~b)⨸(~a)) ? +# rt((~b)⨸(~a), 2)*atan(rt((~b)⨸(~a), 2)*(~x)⨸3)⨸(12*rt((~a), 3)*(~d)) + rt((~b)⨸(~a), 2)*atan((rt((~a), 3) - ((~a) + (~b)*(~x)^2)^(1⨸3))^2⨸(3*rt((~a), 3)^2*rt((~b)⨸(~a), 2)* (~x)))⨸(12*rt((~a), 3)*(~d)) - rt((~b)⨸(~a), 2)*atanh((sqrt(3)*(rt((~a), 3) - ((~a) + (~b)*(~x)^2)^(1⨸3)))⨸(rt((~a), 3)*rt((~b)⨸(~a), 2)* (~x)))⨸(4*sqrt(3)*rt((~a), 3)*(~d)) : nothing) + +# same as 1_1_2_3_28 wtf +# ("1_1_3_3_25", +# @rule ∫(1/(((~a) + (~!b)*(~x)^2)^(1//3)*((~c) + (~!d)*(~x)^2)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# eq((~b)*(~c) - 9*(~a)*(~d), 0) && +# neg((~b)⨸(~a)) ? +# -rt(-(~b)⨸(~a), 2)*atanh(rt(-(~b)⨸(~a), 2)*(~x)⨸3)⨸(12*rt((~a), 3)*(~d)) + rt(-(~b)⨸(~a), 2)*atanh((rt((~a), 3) - ((~a) + (~b)*(~x)^2)^(1⨸3))^2⨸(3*rt((~a), 3)^2*rt(-(~b)⨸(~a), 2)* (~x)))⨸(12*rt((~a), 3)*(~d)) - rt(-(~b)⨸(~a), 2)*atan((sqrt(3)*(rt((~a), 3) - ((~a) + (~b)*(~x)^2)^(1⨸3)))⨸(rt((~a), 3)*rt(-(~b)⨸(~a), 2)* (~x)))⨸(4*sqrt(3)*rt((~a), 3)*(~d)) : nothing) + +("1_1_3_3_26", +:(∫(((~a) + (~!b)*(~x)^2)^(2//3)/((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~c) + 3*(~a)*(~d), 0) ? +(~b)⨸(~d)*∫(1⨸((~a) + (~b)*(~x)^2)^(1⨸3), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(1⨸(((~a) + (~b)*(~x)^2)^(1⨸3)*((~c) + (~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_3_3_27", +:(∫(1/(((~a) + (~!b)*(~x)^2)^(1//4)*((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) && + pos((~b)^2⨸(~a)) ? +-(~b)⨸(2*(~a)*(~d)*rt((~b)^2⨸(~a), 4))* atan(((~b) + rt((~b)^2⨸(~a), 4)^2*sqrt((~a) + (~b)*(~x)^2))⨸(rt((~b)^2⨸(~a), 4)^3*(~x)*((~a) + (~b)*(~x)^2)^(1⨸4))) - (~b)⨸(2*(~a)*(~d)*rt((~b)^2⨸(~a), 4))* atanh(((~b) - rt((~b)^2⨸(~a), 4)^2*sqrt((~a) + (~b)*(~x)^2))⨸(rt((~b)^2⨸(~a), 4)^3*(~x)*((~a) + (~b)*(~x)^2)^(1⨸4))) : nothing)) + +("1_1_3_3_28", +:(∫(1/(((~a) + (~!b)*(~x)^2)^(1//4)*((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) && + neg((~b)^2⨸(~a)) ? +(~b)⨸(2*sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a), 4))*atan(rt(-(~b)^2⨸(~a), 4)*(~x)⨸(sqrt(2)*((~a) + (~b)*(~x)^2)^(1⨸4))) + (~b)⨸(2*sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a), 4))*atanh(rt(-(~b)^2⨸(~a), 4)*(~x)⨸(sqrt(2)*((~a) + (~b)*(~x)^2)^(1⨸4))) : nothing)) + +#(* Int[1/((a_+b_.*x_^2)^(1/4)*(c_+d_.*x_^2)),x_Symbol] := With[{q=Rt[-b^2/a,4]}, b/(2*Sqrt[2]*a*d*q)*ArcTan[q*x/(Sqrt[2]*(a+b*x^2)^(1/4))] + b/(4*Sqrt[2]*a*d*q)*Log[(Sqrt[2]*q*x+2*(a+b*x^2)^(1/4))/(Sqrt[2]*q* x-2*(a+b*x^2)^(1/4))]] /; FreeQ[{a,b,c,d},x] && EqQ[b*c-2*a*d,0] && NegQ[b^2/a] *) +("1_1_3_3_29", +:(∫(1/(((~a) + (~!b)*(~x)^2)^(1//4)*((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +2*sqrt(-(~b)*(~x)^2⨸(~a))⨸(~x)* int_and_subst((~x)^2⨸(sqrt(1 - (~x)^4⨸(~a))*((~b)*(~c) - (~a)*(~d) + (~d)*(~x)^4)), (~x), (~x), ((~a) + (~b)*(~x)^2)^(1⨸4), "1_1_3_3_29") : nothing)) + +("1_1_3_3_30", +:(∫(1/(((~a) + (~!b)*(~x)^2)^(3//4)*((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) ? +1⨸(~c)*∫(1⨸((~a) + (~b)*(~x)^2)^(3⨸4), (~x)) - (~d)⨸(~c)*∫((~x)^2⨸(((~a) + (~b)*(~x)^2)^(3⨸4)*((~c) + (~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_3_3_31", +:(∫(1/(((~a) + (~!b)*(~x)^2)^(3//4)*((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +sqrt(-(~b)*(~x)^2⨸(~a))⨸(2*(~x))* int_and_subst(1⨸(sqrt(-(~b)*(~x)⨸(~a))*((~a) + (~b)*(~x))^(3⨸4)*((~c) + (~d)*(~x))), (~x), (~x), (~x)^2, "1_1_3_3_31") : nothing)) + +("1_1_3_3_32", +:(∫(((~a) + (~!b)*(~x)^2)^(~!p)/((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~p), 0) && + ( + eq((~p), 1⨸2) || + eq(ext_den((~p)), 4) + ) ? +(~b)⨸(~d)*∫(((~a) + (~b)*(~x)^2)^((~p) - 1), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(((~a) + (~b)*(~x)^2)^((~p) - 1)⨸((~c) + (~d)*(~x)^2), (~x)) : nothing)) + +("1_1_3_3_33", +:(∫(((~a) + (~!b)*(~x)^2)^(~p)/((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + eq(ext_den((~p)), 4) && + ( + eq((~p), -5⨸4) || + eq((~p), -7⨸4) + ) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(((~a) + (~b)*(~x)^2)^(~p), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~a) + (~b)*(~x)^2)^((~p) + 1)⨸((~c) + (~d)*(~x)^2), (~x)) : nothing)) + +("1_1_3_3_34", +:(∫(sqrt((~a) + (~!b)*(~x)^4)/((~c) + (~!d)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + pos((~a)*(~b)) ? +(~a)⨸(~c)*int_and_subst(1⨸(1 - 4*(~a)*(~b)*(~x)^4), (~x), (~x), (~x)⨸sqrt((~a) + (~b)*(~x)^4), "1_1_3_3_34") : nothing)) + +("1_1_3_3_35", +:(∫(sqrt((~a) + (~!b)*(~x)^4)/((~c) + (~!d)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + neg((~a)*(~b)) ? +(~a)⨸(2*(~c)*rt(-(~a)*(~b), 4))*atan(rt(-(~a)*(~b), 4)*(~x)*((~a) + rt(-(~a)*(~b), 4)^2*(~x)^2)⨸((~a)*sqrt((~a) + (~b)*(~x)^4))) + (~a)⨸(2*(~c)*rt(-(~a)*(~b), 4))*atanh(rt(-(~a)*(~b), 4)*(~x)*((~a) - rt(-(~a)*(~b), 4)^2*(~x)^2)⨸((~a)*sqrt((~a) + (~b)*(~x)^4))) : nothing)) + +("1_1_3_3_36", +:(∫(sqrt((~a) + (~!b)*(~x)^4)/((~c) + (~!d)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)⨸(~d)*∫(1⨸sqrt((~a) + (~b)*(~x)^4), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(1⨸(sqrt((~a) + (~b)*(~x)^4)*((~c) + (~d)*(~x)^4)), (~x)) : nothing)) + +("1_1_3_3_37", +:(∫(((~a) + (~!b)*(~x)^4)^(1//4)/((~c) + (~!d)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +sqrt((~a) + (~b)*(~x)^4)*sqrt((~a)⨸((~a) + (~b)*(~x)^4))* int_and_subst(1⨸(sqrt(1 - (~b)*(~x)^4)*((~c) - ((~b)*(~c) - (~a)*(~d))*(~x)^4)), (~x), (~x), (~x)⨸((~a) + (~b)*(~x)^4)^(1⨸4), "1_1_3_3_37") : nothing)) + +("1_1_3_3_38", +:(∫(((~a) + (~!b)*(~x)^4)^(5//4)/((~c) + (~!d)*(~x)^4),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)⨸(~d)*∫(((~a) + (~b)*(~x)^4)^(1⨸4), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(((~a) + (~b)*(~x)^4)^(1⨸4)⨸((~c) + (~d)*(~x)^4), (~x)) : nothing)) + +("1_1_3_3_39", +:(∫(1/(sqrt((~a) + (~!b)*(~x)^4)*((~c) + (~!d)*(~x)^4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +1⨸(2*(~c))*∫(1⨸(sqrt((~a) + (~b)*(~x)^4)*(1 - rt(-(~d)⨸(~c), 2)*(~x)^2)), (~x)) + 1⨸(2*(~c))*∫(1⨸(sqrt((~a) + (~b)*(~x)^4)*(1 + rt(-(~d)⨸(~c), 2)*(~x)^2)), (~x)) : nothing)) + +("1_1_3_3_40", +:(∫(1/(((~a) + (~!b)*(~x)^4)^(3//4)*((~c) + (~!d)*(~x)^4)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~a) + (~b)*(~x)^4)^(3⨸4), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~a) + (~b)*(~x)^4)^(1⨸4)⨸((~c) + (~d)*(~x)^4), (~x)) : nothing)) + +("1_1_3_3_41", +:(∫(((~a) + (~!b)*(~x)^3)^(1//3)/((~c) + (~!d)*(~x)^3),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~c) + (~a)*(~d), 0) ? +9*(~a)⨸((~c)*rt((~b)⨸(~a), 3))* int_and_subst((~x)⨸((4 - (~a)*(~x)^3)*(1 + 2*(~a)*(~x)^3)), (~x), (~x), (1 + rt((~b)⨸(~a), 3)*(~x))⨸((~a) + (~b)*(~x)^3)^(1⨸3), "1_1_3_3_41") : nothing)) + +("1_1_3_3_42", +:(∫(1/(((~a) + (~!b)*(~x)^3)^(2//3)*((~c) + (~!d)*(~x)^3)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~c) + (~a)*(~d), 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~a) + (~b)*(~x)^3)^(2⨸3), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~a) + (~b)*(~x)^3)^(1⨸3)⨸((~c) + (~d)*(~x)^3), (~x)) : nothing)) + +("1_1_3_3_43", +:(∫(sqrt((~a) + (~!b)*(~x)^2)/((~c) + (~!d)*(~x)^2)^(3//2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos((~b)⨸(~a)) && + pos((~d)⨸(~c)) ? +sqrt((~a) + (~b)*(~x)^2)⨸((~c)*rt((~d)⨸(~c), 2)*sqrt((~c) + (~d)*(~x)^2)* sqrt((~c)*((~a) + (~b)*(~x)^2)⨸((~a)*((~c) + (~d)*(~x)^2))))* elliptic_e(atan(rt((~d)⨸(~c), 2)*(~x)), 1 - (~b)*(~c)⨸((~a)*(~d))) : nothing)) + +#(* Int[Sqrt[a_+b_.*x_^2]/(c_+d_.*x_^2)^(3/2),x_Symbol] := a*Sqrt[c+d*x^2]*Sqrt[(c*(a+b*x^2))/(a*(c+d*x^2))]/(c^2*Rt[d/c,2]* Sqrt[a+b*x^2])*EllipticE[ArcTan[Rt[d/c,2]*x],1-b*c/(a*d)] /; FreeQ[{a,b,c,d},x] && PosQ[b/a] && PosQ[d/c] *) +("1_1_3_3_44", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + lt(0, (~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) ? +-(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~a)*(~n)*((~p) + 1)) + 1⨸((~a)*(~n)*((~p) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~n)*((~p) + 1) + 1) + (~d)*((~n)*((~p) + (~q) + 1) + 1)*(~x)^(~n), (~x)), (~x)) : nothing)) + +("1_1_3_3_45", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + gt((~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) ? +((~a)*(~d) - (~c)*(~b))* (~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)⨸((~a)*(~b)*(~n)*((~p) + 1)) - 1⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 2)* simp((~c)*((~a)*(~d) - (~c)*(~b)*((~n)*((~p) + 1) + 1)) + (~d)*((~a)*(~d)*((~n)*((~q) - 1) + 1) - (~b)*(~c)*((~n)*((~p) + (~q)) + 1))*(~x)^(~n), (~x)), (~x)) : nothing)) + +("1_1_3_3_46", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + !( + !(ext_isinteger((~p))) && + ext_isinteger((~q)) && + lt((~q), -1) + ) && + int_binomial((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) ? +-(~b)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)* (~n)*((~p) + 1)*((~b)*(~c) - (~a)*(~d))) + 1⨸((~a)*(~n)*((~p) + 1)*((~b)*(~c) - (~a)*(~d)))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~b)*(~c) + (~n)*((~p) + 1)*((~b)*(~c) - (~a)*(~d)) + (~d)*(~b)*((~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing)) + +("1_1_3_3_47", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + ext_isinteger((~p), (~q)) && + gt((~p) + (~q), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)), (~x)) : nothing)) + +("1_1_3_3_48", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~q), 1) && + !eq((~n)*((~p) + (~q)) + 1, 0) && + !(igt((~p), 1)) && + int_binomial((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) ? +(~d)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)⨸((~b)*((~n)*((~p) + (~q)) + 1)) + 1⨸((~b)*((~n)*((~p) + (~q)) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 2)* simp((~c)*((~b)*(~c)*((~n)*((~p) + (~q)) + 1) - (~a)*(~d)) + (~d)*((~b)*(~c)*((~n)*((~p) + 2*(~q) - 1) + 1) - (~a)*(~d)*((~n)*((~q) - 1) + 1))*(~x)^(~n), (~x)), (~x)) : nothing)) + +("1_1_3_3_49", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~q), 0) && + gt((~p), 0) && + int_binomial((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) ? +(~x)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~n)*((~p) + (~q)) + 1) + (~n)⨸((~n)*((~p) + (~q)) + 1)* ∫(((~a) + (~b)*(~x)^(~n))^((~p) - 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~a)*(~c)*((~p) + (~q)) + ((~q)*((~b)*(~c) - (~a)*(~d)) + (~a)*(~d)*((~p) + (~q)))*(~x)^(~n), (~x)), (~x)) : nothing)) + +("1_1_3_3_50", +:(∫(1/(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos((~d)⨸(~c)) && + pos((~b)⨸(~a)) && + !(simpler(rt((~b)⨸(~a),2),rt( (~d)⨸(~c),2))) ? +sqrt((~a) + (~b)*(~x)^2)⨸((~a)*rt((~d)⨸(~c), 2)*sqrt((~c) + (~d)*(~x)^2)* sqrt((~c)*((~a) + (~b)*(~x)^2)⨸((~a)*((~c) + (~d)*(~x)^2))))* elliptic_f(atan(rt((~d)⨸(~c), 2)*(~x)), 1 - (~b)*(~c)⨸((~a)*(~d))) : nothing)) + +#(* Int[1/(Sqrt[a_+b_.*x_^2]*Sqrt[c_+d_.*x_^2]),x_Symbol] := Sqrt[c+d*x^2]*Sqrt[c*(a+b*x^2)/(a*(c+d*x^2))]/(c*Rt[d/c,2]*Sqrt[a+b* x^2])*EllipticF[ArcTan[Rt[d/c,2]*x],1-b*c/(a*d)] /; FreeQ[{a,b,c,d},x] && PosQ[d/c] && PosQ[b/a] && Not[SimplerSqrtQ[b/a,d/c]] *) +("1_1_3_3_51", +:(∫(1/(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~d)⨸(~c)) && + gt((~c), 0) && + gt((~a), 0) && + !( + neg((~b)⨸(~a)) && + simpler(rt(-(~b)⨸(~a),2),rt( -(~d)⨸(~c),2)) + ) ? +1⨸(sqrt((~a))*sqrt((~c))*rt(-(~d)⨸(~c), 2))* elliptic_f(asin(rt(-(~d)⨸(~c), 2)*(~x)), (~b)*(~c)⨸((~a)*(~d))) : nothing)) + +("1_1_3_3_52", +:(∫(1/(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~d)⨸(~c)) && + gt((~c), 0) && + gt((~a) - (~b)*(~c)⨸(~d), 0) ? +-1⨸(sqrt((~c))*rt(-(~d)⨸(~c), 2)*sqrt((~a) - (~b)*(~c)⨸(~d)))* elliptic_f(acos(rt(-(~d)⨸(~c), 2)*(~x)), (~b)*(~c)⨸((~b)*(~c) - (~a)*(~d))) : nothing)) + +("1_1_3_3_53", +:(∫(1/(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !(gt((~c), 0)) ? +sqrt(1 + (~d)⨸(~c)*(~x)^2)⨸sqrt((~c) + (~d)*(~x)^2)* ∫(1⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt(1 + (~d)⨸(~c)*(~x)^2)), (~x)) : nothing)) + +("1_1_3_3_54", +:(∫(sqrt((~a) + (~!b)*(~x)^2)/sqrt((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos((~d)⨸(~c)) && + pos((~b)⨸(~a)) ? +(~a)*∫(1⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) + (~b)*∫((~x)^2⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_3_3_55", +:(∫(sqrt((~a) + (~!b)*(~x)^2)/sqrt((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos((~d)⨸(~c)) && + neg((~b)⨸(~a)) ? +(~b)⨸(~d)*∫(sqrt((~c) + (~d)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(1⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) : nothing)) + +("1_1_3_3_56", +:(∫(sqrt((~a) + (~!b)*(~x)^2)/sqrt((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~d)⨸(~c)) && + gt((~c), 0) && + gt((~a), 0) ? +sqrt((~a))⨸(sqrt((~c))*rt(-(~d)⨸(~c), 2))* elliptic_e(asin(rt(-(~d)⨸(~c), 2)*(~x)), (~b)*(~c)⨸((~a)*(~d))) : nothing)) + +("1_1_3_3_57", +:(∫(sqrt((~a) + (~!b)*(~x)^2)/sqrt((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~d)⨸(~c)) && + gt((~c), 0) && + gt((~a) - (~b)*(~c)⨸(~d), 0) ? +-sqrt((~a) - (~b)*(~c)⨸(~d))⨸(sqrt((~c))*rt(-(~d)⨸(~c), 2))* elliptic_e(acos(rt(-(~d)⨸(~c), 2)*(~x)), (~b)*(~c)⨸((~b)*(~c) - (~a)*(~d))) : nothing)) + +("1_1_3_3_58", +:(∫(sqrt((~a) + (~!b)*(~x)^2)/sqrt((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~d)⨸(~c)) && + gt((~c), 0) && + !(gt((~a), 0)) ? +sqrt((~a) + (~b)*(~x)^2)⨸sqrt(1 + (~b)⨸(~a)*(~x)^2)* ∫(sqrt(1 + (~b)⨸(~a)*(~x)^2)⨸sqrt((~c) + (~d)*(~x)^2), (~x)) : nothing)) + +("1_1_3_3_59", +:(∫(sqrt((~a) + (~!b)*(~x)^2)/sqrt((~c) + (~!d)*(~x)^2),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~d)⨸(~c)) && + !(gt((~c), 0)) ? +sqrt(1 + (~d)⨸(~c)*(~x)^2)⨸sqrt((~c) + (~d)*(~x)^2)* ∫(sqrt((~a) + (~b)*(~x)^2)⨸sqrt(1 + (~d)⨸(~c)*(~x)^2), (~x)) : nothing)) + +("1_1_3_3_60", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~p), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)), (~x)) : nothing)) + +("1_1_3_3_61", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~n), -1) && + ( + ext_isinteger((~p)) || + gt((~a), 0) + ) && + ( + ext_isinteger((~q)) || + gt((~c), 0) + ) ? +(~a)^(~p)*(~c)^(~q)*(~x)*appell_f1(1⨸(~n), -(~p), -(~q), 1 + 1⨸(~n), -(~b)*(~x)^(~n)⨸(~a), -(~d)*(~x)^(~n)⨸(~c)) : nothing)) + +("1_1_3_3_62", +:(∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~n), -1) && + !( + ext_isinteger((~p)) || + gt((~a), 0) + ) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^(~n))^fracpart((~p))⨸(1 + (~b)*(~x)^(~n)⨸(~a))^fracpart((~p))* ∫((1 + (~b)*(~x)^(~n)⨸(~a))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing)) + +("1_1_3_3_63", +:(∫(((~!a) + (~!b)*(~u)^(~n))^(~!p)*((~!c) + (~!d)*(~u)^(~n))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x), (~x), (~u), "1_1_3_3_63") : nothing)) + +# ("1_1_3_3_64", +# @rule ∫((~u)^(~!p)*(~v)^(~!q),(~x)) => +# !contains_var((~p), (~q), (~x)) && +# PseudoBinomialPairQ[(~u), (~v), (~x)] ? +# ∫(NormalizePseudoBinomial[(~u), (~x)]^(~p)* NormalizePseudoBinomial[(~v), (~x)]^(~q), (~x)) : nothing) +# +# ("1_1_3_3_65", +# @rule ∫((~x)^(~!m)*(~u)^(~!p)*(~v)^(~!q),(~x)) => +# !contains_var((~p), (~q), (~x)) && +# ext_isinteger((~p), (~m)⨸(~p)) && +# PseudoBinomialPairQ[(~x)^((~m)⨸(~p))*(~u), (~v), (~x)] ? +# ∫(NormalizePseudoBinomial[(~x)^((~m)⨸(~p))*(~u), (~x)]^(~p)* NormalizePseudoBinomial[(~v), (~x)]^(~q), (~x)) : nothing) + +#(* IntBinomialQ[a,b,c,d,n,p,q,x] returns True iff (a+b*x^n)^p*(c+d*x^n)^q is integrable wrt x in terms of non-Appell functions. *) IntBinomialQ[a_, b_, c_, d_, n_, p_, q_, x_Symbol] := IntegersQ[p, q] || IGtQ[p, 0] || IGtQ[q, 0] || (EqQ[n, 2] || EqQ[n, 4]) && (IntegersQ[p, 4*q] || IntegersQ[4*p, q]) || EqQ[n, 2] && (IntegersQ[2*p, 2*q] || IntegersQ[3*p, q] && EqQ[b*c + 3*a*d, 0] || IntegersQ[p, 3*q] && EqQ[3*b*c + a*d, 0]) || EqQ[n, 3] && (IntegersQ[p + 1/3, q] || IntegersQ[q + 1/3, p]) || EqQ[n, 3] && (IntegersQ[p + 2/3, q] || IntegersQ[q + 2/3, p]) && EqQ[b*c + a*d, 0] +("1_1_3_3_66", +:(∫(((~a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^(~!q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + eq((~mn), -(~n)) && + ext_isinteger((~q)) && + ( + pos((~n)) || + !(ext_isinteger((~p))) + ) ? +∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q)⨸(~x)^((~n)*(~q)), (~x)) : nothing)) + +("1_1_3_3_67", +:(∫(((~a) + (~!b)*(~x)^(~!n))^(~p)*((~c) + (~!d)*(~x)^(~!mn))^(~q),(~x)) ) => :( + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) && + eq((~mn), -(~n)) && + !(ext_isinteger((~q))) && + !(ext_isinteger((~p))) ? +(~x)^((~n)*fracpart((~q)))*((~c) + (~d)*(~x)^(-(~n)))^fracpart((~q))⨸((~d) + (~c)*(~x)^(~n))^ fracpart((~q))*∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q)⨸(~x)^((~n)*(~q)), (~x)) : nothing)) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.4 (e x)^m (a+b x^n)^p (c+d x^n)^q.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.4 (e x)^m (a+b x^n)^p (c+d x^n)^q.jl new file mode 100644 index 0000000..40e6a24 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.4 (e x)^m (a+b x^n)^p (c+d x^n)^q.jl @@ -0,0 +1,828 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.4 (e x)^m (a+b x^n)^p (c+d x^n)^q *) +("1_1_3_4_1", +@rule ∫(((~!e)*(~x))^(~!m)*((~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + ( + ext_isinteger((~m)) || + gt((~e), 0) + ) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~e)^(~m)⨸((~n)*(~b)^(simplify(((~m) + 1)⨸(~n)) - 1))* int_and_subst(((~b)*(~x))^((~p) + simplify(((~m) + 1)⨸(~n)) - 1)*((~c) + (~d)*(~x))^(~q), (~x), (~x), (~x)^(~n), "1_1_3_4_1") : nothing) + +("1_1_3_4_2", +@rule ∫(((~!e)*(~x))^(~!m)*((~!b)*(~x)^(~!n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + ( + ext_isinteger((~m)) || + gt((~e), 0) + ) && + !(ext_isinteger(simplify(((~m) + 1)/(~n)))) ? +(~e)^(~m)*(~b)^intpart((~p))*((~b)*(~x)^(~n))^fracpart((~p))⨸(~x)^((~n)*fracpart((~p)))* ∫((~x)^((~m) + (~n)*(~p))*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_3", +@rule ∫(((~e)*(~x))^(~m)*((~!b)*(~x)^(~!n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + !(ext_isinteger((~m))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_4", +@rule ∫((~x)/(((~a) + (~!b)*(~x)^2)^(1//4)*((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) && + pos((~a)) ? +-1⨸(sqrt(2)*rt((~a), 4)*(~d))* atan((rt((~a), 4)^2 - sqrt((~a) + (~b)*(~x)^2))⨸(sqrt(2)* rt((~a), 4)*((~a) + (~b)*(~x)^2)^(1⨸4))) - 1⨸(sqrt(2)*rt((~a), 4)*(~d))* atanh((rt((~a), 4)^2 + sqrt((~a) + (~b)*(~x)^2))⨸(sqrt(2)* rt((~a), 4)*((~a) + (~b)*(~x)^2)^(1⨸4))) : nothing) + +("1_1_3_4_5", +@rule ∫((~x)^(~m)/(((~a) + (~!b)*(~x)^2)^(1//4)*((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) && + ext_isinteger((~m)) && + ( + pos((~a)) || + ext_isinteger((~m)/2) + ) ? +∫(ext_expand((~x)^(~m)⨸(((~a) + (~b)*(~x)^2)^(1⨸4)*((~c) + (~d)*(~x)^2)), (~x)), (~x)) : nothing) + +("1_1_3_4_6", +@rule ∫((~x)^2/(((~a) + (~!b)*(~x)^2)^(3//4)*((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) && + pos((~b)^2/(~a)) ? +-(~b)⨸((~a)*(~d)*rt((~b)^2⨸(~a), 4)^3)* atan(((~b) + rt((~b)^2⨸(~a), 4)^2*sqrt((~a) + (~b)*(~x)^2))⨸(rt((~b)^2⨸(~a), 4)^3* (~x)*((~a) + (~b)*(~x)^2)^(1⨸4))) + (~b)⨸((~a)*(~d)*rt((~b)^2⨸(~a), 4)^3)* atanh(((~b) - rt((~b)^2⨸(~a), 4)^2*sqrt((~a) + (~b)*(~x)^2))⨸(rt((~b)^2⨸(~a), 4)^3* (~x)*((~a) + (~b)*(~x)^2)^(1⨸4))) : nothing) + +("1_1_3_4_7", +@rule ∫((~x)^2/(((~a) + (~!b)*(~x)^2)^(3//4)*((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) && + neg((~b)^2/(~a)) ? +-(~b)⨸(sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a), 4)^3)* atan((rt(-(~b)^2⨸(~a), 4)*(~x))⨸(sqrt(2)*((~a) + (~b)*(~x)^2)^(1⨸4))) + (~b)⨸(sqrt(2)*(~a)*(~d)*rt(-(~b)^2⨸(~a), 4)^3)* atanh((rt(-(~b)^2⨸(~a), 4)*(~x))⨸(sqrt(2)*((~a) + (~b)*(~x)^2)^(1⨸4))) : nothing) + +("1_1_3_4_8", +@rule ∫((~x)^(~m)/(((~a) + (~!b)*(~x)^2)^(3//4)*((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - 2*(~a)*(~d), 0) && + ext_isinteger((~m)) && + ( + pos((~a)) || + ext_isinteger((~m)/2) + ) ? +∫(ext_expand((~x)^(~m)⨸(((~a) + (~b)*(~x)^2)^(3⨸4)*((~c) + (~d)*(~x)^2)), (~x)), (~x)) : nothing) + +("1_1_3_4_9", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~m) - (~n) + 1, 0) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q), (~x), (~x), (~x)^(~n), "1_1_3_4_9") : nothing) + +("1_1_3_4_10", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~p), (~q)) && + neg((~n)) ? +∫((~x)^((~m) + (~n)*((~p) + (~q)))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*((~d) + (~c)*(~x)^(-(~n)))^(~q), (~x)) : nothing) + +("1_1_3_4_11", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q), (~x), (~x), (~x)^(~n), "1_1_3_4_11") : nothing) + +("1_1_3_4_12", +@rule ∫(((~e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_13", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~p), 0) && + igt((~q), 0) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)), (~x)) : nothing) + +("1_1_3_4_14", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)*(~d)*((~m) + 1) - (~b)*(~c)*((~m) + (~n)*((~p) + 1) + 1), 0) && + !eq((~m), -1) ? +(~c)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~e)*((~m) + 1)) : nothing) + +("1_1_3_4_15", +@rule ∫(((~!e)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~!N2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~N2), (~n)/2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + eq((~a1)*(~a2)*(~d)*((~m) + 1) - (~b1)*(~b2)*(~c)*((~m) + (~n)*((~p) + 1) + 1), 0) && + !eq((~m), -1) ? +(~c)*((~e)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1)⨸((~a1)*(~a2)*(~e)*((~m) + 1)) : nothing) + +("1_1_3_4_16", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~m) + (~n)*((~p) + 1) + 1, 0) && + ( + ext_isinteger((~n)) || + gt((~e), 0) + ) && + ( + gt((~n), 0) && + lt((~m), -1) || + lt((~n), 0) && + gt((~m) + (~n), -1) + ) ? +(~c)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~e)*((~m) + 1)) + (~d)⨸(~e)^(~n)*∫(((~e)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_3_4_17", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~m) + (~n)*((~p) + 1) + 1, 0) && + !eq((~m), -1) ? +((~b)*(~c) - (~a)*(~d))*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~b)*(~e)*((~m) + 1)) + (~d)⨸(~b)*∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("1_1_3_4_18", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + ext_isinteger((~n)) || + gt((~e), 0) + ) && + ( + gt((~n), 0) && + lt((~m), -1) || + lt((~n), 0) && + gt((~m) + (~n), -1) + ) && + !(ilt((~p), -1)) ? +(~c)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~e)*((~m) + 1)) + ((~a)*(~d)*((~m) + 1) - (~b)*(~c)*((~m) + (~n)*((~p) + 1) + 1))⨸((~a)*(~e)^(~n)*((~m) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_3_4_19", +@rule ∫(((~!e)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~!N2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~e), (~p), (~x)) && + eq((~N2), (~n)/2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + ext_isinteger((~n)) || + gt((~e), 0) + ) && + ( + gt((~n), 0) && + lt((~m), -1) || + lt((~n), 0) && + gt((~m) + (~n), -1) + ) && + !(ilt((~p), -1)) ? +(~c)*((~e)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1)⨸((~a1)*(~a2)*(~e)*((~m) + 1)) + ((~a1)*(~a2)*(~d)*((~m) + 1) - (~b1)*(~b2)*(~c)*((~m) + (~n)*((~p) + 1) + 1))⨸((~a1)*(~a2)* (~e)^(~n)*((~m) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a1) + (~b1)*(~x)^((~n)⨸2))^(~p)*((~a2) + (~b2)*(~x)^((~n)⨸2))^(~p), (~x)) : nothing) + +("1_1_3_4_20", +@rule ∫((~x)^(~m)*((~a) + (~!b)*(~x)^2)^(~p)*((~c) + (~!d)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + igt((~m)/2, 0) && + ( + ext_isinteger((~p)) || + eq((~m) + 2*(~p) + 1, 0) + ) ? +(-(~a))^((~m)⨸2 - 1)*((~b)*(~c) - (~a)*(~d))* (~x)*((~a) + (~b)*(~x)^2)^((~p) + 1)⨸(2*(~b)^((~m)⨸2 + 1)*((~p) + 1)) + 1⨸(2*(~b)^((~m)⨸2 + 1)*((~p) + 1))*∫(((~a) + (~b)*(~x)^2)^((~p) + 1)* expand_to_sum( 2*(~b)*((~p) + 1)*(~x)^2* together(((~b)^((~m)⨸2)* (~x)^((~m) - 2)*((~c) + (~d)*(~x)^2) - (-(~a))^((~m)⨸2 - 1)*((~b)*(~c) - (~a)*(~d)))⨸((~a) + (~b)*(~x)^2)) - (-(~a))^((~m)⨸2 - 1)*((~b)*(~c) - (~a)*(~d)), (~x)), (~x)) : nothing) + +("1_1_3_4_21", +@rule ∫((~x)^(~m)*((~a) + (~!b)*(~x)^2)^(~p)*((~c) + (~!d)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + ilt((~m)/2, 0) && + ( + ext_isinteger((~p)) || + eq((~m) + 2*(~p) + 1, 0) + ) ? +(-(~a))^((~m)⨸2 - 1)*((~b)*(~c) - (~a)*(~d))* (~x)*((~a) + (~b)*(~x)^2)^((~p) + 1)⨸(2*(~b)^((~m)⨸2 + 1)*((~p) + 1)) + 1⨸(2*(~b)^((~m)⨸2 + 1)*((~p) + 1))*∫((~x)^(~m)*((~a) + (~b)*(~x)^2)^((~p) + 1)* expand_to_sum( 2*(~b)*((~p) + 1)* together(((~b)^((~m)⨸2)*((~c) + (~d)*(~x)^2) - (-(~a))^((~m)⨸2 - 1)*((~b)*(~c) - (~a)*(~d))* (~x)^(-(~m) + 2))⨸((~a) + (~b)*(~x)^2)) - (-(~a))^((~m)⨸2 - 1)*((~b)*(~c) - (~a)*(~d))*(~x)^(-(~m)), (~x)), (~x)) : nothing) + +("1_1_3_4_22", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + ( + !(ext_isinteger((~p) + 1/2)) && + !eq((~p), -5/4) || + !(isrational((~m))) || + igt((~n), 0) && + ilt((~p) + 1/2, 0) && + le(-1, (~m), -(~n)*((~p) + 1)) + ) ? +-((~b)*(~c) - (~a)*(~d))*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~b)*(~e)* (~n)*((~p) + 1)) - ((~a)*(~d)*((~m) + 1) - (~b)*(~c)*((~m) + (~n)*((~p) + 1) + 1))⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("1_1_3_4_23", +@rule ∫(((~!e)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~!N2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~N2), (~n)/2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + lt((~p), -1) && + ( + !(ext_isinteger((~p) + 1/2)) && + !eq((~p), -5/4) || + !(isrational((~m))) || + igt((~n), 0) && + ilt((~p) + 1/2, 0) && + le(-1, (~m), -(~n)*((~p) + 1)) + ) ? +-((~b1)*(~b2)*(~c) - (~a1)*(~a2)*(~d))*((~e)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1)⨸((~a1)*(~a2)*(~b1)*(~b2)*(~e)*(~n)*((~p) + 1)) - ((~a1)*(~a2)*(~d)*((~m) + 1) - (~b1)*(~b2)*(~c)*((~m) + (~n)*((~p) + 1) + 1))⨸((~a1)*(~a2)*(~b1)*(~b2)* (~n)*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1), (~x)) : nothing) + +("1_1_3_4_24", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~m) + (~n)*((~p) + 1) + 1, 0) ? +(~d)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~e)*((~m) + (~n)*((~p) + 1) + 1)) - ((~a)*(~d)*((~m) + 1) - (~b)*(~c)*((~m) + (~n)*((~p) + 1) + 1))⨸((~b)*((~m) + (~n)*((~p) + 1) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_3_4_25", +@rule ∫(((~!e)*(~x))^(~!m)*((~a1) + (~!b1)*(~x)^(~!N2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~!p)*((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~N2), (~n)/2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + !eq((~m) + (~n)*((~p) + 1) + 1, 0) ? +(~d)*((~e)*(~x))^((~m) + 1)*((~a1) + (~b1)*(~x)^((~n)⨸2))^((~p) + 1)*((~a2) + (~b2)*(~x)^((~n)⨸2))^((~p) + 1)⨸((~b1)*(~b2)*(~e)*((~m) + (~n)*((~p) + 1) + 1)) - ((~a1)*(~a2)*(~d)*((~m) + 1) - (~b1)*(~b2)*(~c)*((~m) + (~n)*((~p) + 1) + 1))⨸((~b1)* (~b2)*((~m) + (~n)*((~p) + 1) + 1))* ∫(((~e)*(~x))^(~m)*((~a1) + (~b1)*(~x)^((~n)⨸2))^(~p)*((~a2) + (~b2)*(~x)^((~n)⨸2))^(~p), (~x)) : nothing) + +("1_1_3_4_26", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)/((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + igt((~p), 0) && + ( + ext_isinteger((~m)) || + igt(2*((~m) + 1), 0) || + !(isrational((~m))) + ) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)⨸((~c) + (~d)*(~x)^(~n)), (~x)), (~x)) : nothing) + +("1_1_3_4_27", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~m), -1) && + gt((~n), 0) ? +(~c)^2*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~e)*((~m) + 1)) - 1⨸((~a)*(~e)^(~n)*((~m) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)* simp((~b)*(~c)^2*(~n)*((~p) + 1) + (~c)*((~b)*(~c) - 2*(~a)*(~d))*((~m) + 1) - (~a)*((~m) + 1)*(~d)^2*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_28", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) ? +-((~b)*(~c) - (~a)*(~d))^2*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~b)^2*(~e)* (~n)*((~p) + 1)) + 1⨸((~a)*(~b)^2*(~n)*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)* simp(((~b)*(~c) - (~a)*(~d))^2*((~m) + 1) + (~b)^2*(~c)^2*(~n)*((~p) + 1) + (~a)*(~b)*(~d)^2*(~n)*((~p) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_29", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + !eq((~m) + (~n)*((~p) + 2) + 1, 0) ? +(~d)^2*((~e)*(~x))^((~m) + (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)* (~e)^((~n) + 1)*((~m) + (~n)*((~p) + 2) + 1)) + 1⨸((~b)*((~m) + (~n)*((~p) + 2) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)* simp((~b)*(~c)^2*((~m) + (~n)*((~p) + 2) + 1) + (~d)*((2*(~b)*(~c) - (~a)*(~d))*((~m) + (~n) + 1) + 2*(~b)*(~c)*(~n)*((~p) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_30", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + ext_isinteger((~m)) && + gcd((~m) + 1, (~n)) != 1 ? +1⨸gcd((~m) + 1, (~n))* int_and_subst((~x)^(((~m) + 1)⨸gcd((~m) + 1, (~n)) - 1)*((~a) + (~b)*(~x)^((~n)⨸gcd((~m) + 1, (~n))))^(~p)*((~c) + (~d)*(~x)^((~n)⨸gcd((~m) + 1, (~n))))^(~q), (~x), (~x), (~x)^gcd((~m) + 1, (~n)), "1_1_3_4_30") : nothing) + +("1_1_3_4_31", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + isfraction((~m)) && + ext_isinteger((~p)) ? +ext_den((~m))⨸(~e)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*(~x)^(ext_den((~m))*(~n))⨸(~e)^(~n))^(~p)*((~c) + (~d)*(~x)^(ext_den((~m))*(~n))⨸(~e)^(~n))^(~q), (~x), (~x), ((~e)*(~x))^(1⨸ext_den((~m))), "1_1_3_4_31") : nothing) + +("1_1_3_4_32", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) && + gt((~q), 0) && + gt((~m) - (~n) + 1, 0) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +(~e)^((~n) - 1)*((~e)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~b)*(~n)*((~p) + 1)) - (~e)^(~n)⨸((~b)*(~n)*((~p) + 1))* ∫(((~e)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~m) - (~n) + 1) + (~d)*((~m) + (~n)*((~q) - 1) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_33", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) && + gt((~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +-((~c)*(~b) - (~a)*(~d))*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)⨸((~a)*(~b)*(~e)*(~n)*((~p) + 1)) + 1⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 2)* simp((~c)*((~c)*(~b)*(~n)*((~p) + 1) + ((~c)*(~b) - (~a)*(~d))*((~m) + 1)) + (~d)*((~c)*(~b)*(~n)*((~p) + 1) + ((~c)*(~b) - (~a)*(~d))*((~m) + (~n)*((~q) - 1) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_34", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) && + lt(0, (~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +-((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~a)*(~e)*(~n)*((~p) + 1)) + 1⨸((~a)*(~n)*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~m) + (~n)*((~p) + 1) + 1) + (~d)*((~m) + (~n)*((~p) + (~q) + 1) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_35", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) && + gt((~m) - (~n) + 1, (~n)) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +-(~a)*(~e)^(2*(~n) - 1)*((~e)*(~x))^((~m) - 2*(~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~b)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) + (~e)^(2*(~n))⨸((~b)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~e)*(~x))^((~m) - 2*(~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~a)*(~c)*((~m) - 2*(~n) + 1) + ((~a)*(~d)*((~m) - (~n) + (~n)*(~q) + 1) + (~b)*(~c)*(~n)*((~p) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_36", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) && + ge((~n), (~m) - (~n) + 1) && + gt((~m) - (~n) + 1, 0) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +(~e)^((~n) - 1)*((~e)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) - (~e)^(~n)⨸((~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~e)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~c)*((~m) - (~n) + 1) + (~d)*((~m) + (~n)*((~p) + (~q) + 1) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_37", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +-(~b)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)*(~e)* (~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) + 1⨸((~a)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~c)*(~b)*((~m) + 1) + (~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1) + (~d)*(~b)*((~m) + (~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_38", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + gt((~q), 0) && + lt((~m), -1) && + gt((~p), 0) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~e)*((~m) + 1)) - (~n)⨸((~e)^(~n)*((~m) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^((~p) - 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~b)*(~c)*(~p) + (~a)*(~d)*(~q) + (~b)*(~d)*((~p) + (~q))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_39", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + gt((~q), 1) && + lt((~m), -1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +(~c)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)⨸((~a)* (~e)*((~m) + 1)) - 1⨸((~a)*(~e)^(~n)*((~m) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 2)* simp((~c)*((~c)*(~b) - (~a)*(~d))*((~m) + 1) + (~c)*(~n)*((~b)*(~c)*((~p) + 1) + (~a)*(~d)*((~q) - 1)) + (~d)*(((~c)*(~b) - (~a)*(~d))*((~m) + 1) + (~c)*(~b)*(~n)*((~p) + (~q)))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_40", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt(0, (~q), 1) && + lt((~m), -1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~a)*(~e)*((~m) + 1)) - 1⨸((~a)*(~e)^(~n)*((~m) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*(~b)*((~m) + 1) + (~n)*((~b)*(~c)*((~p) + 1) + (~a)*(~d)*(~q)) + (~d)*((~b)*((~m) + 1) + (~b)*(~n)*((~p) + (~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_41", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + gt((~q), 0) && + gt((~p), 0) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~e)*((~m) + (~n)*((~p) + (~q)) + 1)) + (~n)⨸((~m) + (~n)*((~p) + (~q)) + 1)* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) - 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~a)*(~c)*((~p) + (~q)) + ((~q)*((~b)*(~c) - (~a)*(~d)) + (~a)*(~d)*((~p) + (~q)))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_42", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + gt((~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +(~d)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)⨸((~b)* (~e)*((~m) + (~n)*((~p) + (~q)) + 1)) + 1⨸((~b)*((~m) + (~n)*((~p) + (~q)) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 2)* simp((~c)*(((~c)*(~b) - (~a)*(~d))*((~m) + 1) + (~c)*(~b)*(~n)*((~p) + (~q))) + ((~d)*((~c)*(~b) - (~a)*(~d))*((~m) + 1) + (~d)*(~n)*((~q) - 1)*((~b)*(~c) - (~a)*(~d)) + (~c)*(~b)*(~d)*(~n)*((~p) + (~q)))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_43", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + gt((~q), 0) && + gt((~m) - (~n) + 1, 0) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +(~e)^((~n) - 1)*((~e)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~b)*((~m) + (~n)*((~p) + (~q)) + 1)) - (~e)^(~n)⨸((~b)*((~m) + (~n)*((~p) + (~q)) + 1))* ∫(((~e)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~a)*(~c)*((~m) - (~n) + 1) + ((~a)*(~d)*((~m) - (~n) + 1) - (~n)*(~q)*((~b)*(~c) - (~a)*(~d)))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_44", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + gt((~m) - (~n) + 1, (~n)) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +(~e)^(2*(~n) - 1)*((~e)*(~x))^((~m) - 2*(~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~b)*(~d)*((~m) + (~n)*((~p) + (~q)) + 1)) - (~e)^(2*(~n))⨸((~b)*(~d)*((~m) + (~n)*((~p) + (~q)) + 1))* ∫(((~e)*(~x))^((~m) - 2*(~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~a)*(~c)*((~m) - 2*(~n) + 1) + ((~a)*(~d)*((~m) + (~n)*((~q) - 1) + 1) + (~b)*(~c)*((~m) + (~n)*((~p) - 1) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_45", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~m), -1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)*(~c)* (~e)*((~m) + 1)) - 1⨸((~a)*(~c)*(~e)^(~n)*((~m) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)* simp(((~b)*(~c) + (~a)*(~d))*((~m) + (~n) + 1) + (~n)*((~b)*(~c)*(~p) + (~a)*(~d)*(~q)) + (~b)*(~d)*((~m) + (~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_46", +@rule ∫(((~!e)*(~x))^(~!m)/(((~a) + (~!b)*(~x)^(~n))*((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + le((~n), (~m), 2*(~n) - 1) ? +-(~a)*(~e)^(~n)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e)*(~x))^((~m) - (~n))⨸((~a) + (~b)*(~x)^(~n)), (~x)) + (~c)*(~e)^(~n)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e)*(~x))^((~m) - (~n))⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_4_47", +@rule ∫(((~!e)*(~x))^(~!m)/(((~a) + (~!b)*(~x)^(~n))*((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e)*(~x))^(~m)⨸((~a) + (~b)*(~x)^(~n)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e)*(~x))^(~m)⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_4_48", +@rule ∫(((~!e)*(~x))^(~m)*((~c) + (~!d)*(~x)^(~n))^(~!q)/((~a) + (~!b)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + le((~n), (~m), 2*(~n) - 1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), -1, (~q), (~x)) ? +(~e)^(~n)⨸(~b)*∫(((~e)*(~x))^((~m) - (~n))*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) - (~a)*(~e)^(~n)⨸(~b)*∫(((~e)*(~x))^((~m) - (~n))*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~a) + (~b)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_4_49", +@rule ∫((~x)*((~a) + (~!b)*(~x)^(~n))^(~p)/((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + gt((~p), 0) && + int_binomial((~a), (~b), (~c), (~d), 1, 1, (~n), (~p), -1, (~x)) ? +(~b)⨸(~d)*∫((~x)*((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫((~x)*((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_4_50", +@rule ∫((~x)*((~a) + (~!b)*(~x)^(~n))^(~p)/((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~n), 0) && + lt((~p), -1) && + int_binomial((~a), (~b), (~c), (~d), 1, 1, (~n), (~p), -1, (~x)) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫((~x)*((~a) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫((~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_4_51", +@rule ∫((~x)/(((~a) + (~!b)*(~x)^3)*sqrt((~c) + (~!d)*(~x)^3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq(4*(~b)*(~c) - (~a)*(~d), 0) && + pos((~c)) ? +rt((~d)⨸(~c), 3)*atanh(sqrt((~c) + (~d)*(~x)^3)⨸rt((~c), 2))⨸(9*2^(2⨸3)*(~b)*rt((~c), 2)) + rt((~d)⨸(~c), 3)*atan( sqrt((~c) + (~d)*(~x)^3)⨸(sqrt(3)*rt((~c), 2)))⨸(3*2^(2⨸3)*sqrt(3)*(~b)* rt((~c), 2)) - rt((~d)⨸(~c), 3)*atan( sqrt(3)*rt((~c), 2)*(1 + 2^(1⨸3)*rt((~d)⨸(~c), 3)*(~x))⨸sqrt((~c) + (~d)*(~x)^3))⨸(3*2^(2⨸3)* sqrt(3)*(~b)*rt((~c), 2)) - rt((~d)⨸(~c), 3)*atanh( rt((~c), 2)*(1 - 2^(1⨸3)*rt((~d)⨸(~c), 3)*(~x))⨸sqrt((~c) + (~d)*(~x)^3))⨸(3*2^(2⨸3)*(~b)* rt((~c), 2)) : nothing) + +("1_1_3_4_52", +@rule ∫((~x)/(((~a) + (~!b)*(~x)^3)*sqrt((~c) + (~!d)*(~x)^3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq(4*(~b)*(~c) - (~a)*(~d), 0) && + neg((~c)) ? +-rt((~d)⨸(~c), 3)*atan(sqrt((~c) + (~d)*(~x)^3)⨸rt(-(~c), 2))⨸(9*2^(2⨸3)*(~b)*rt(-(~c), 2)) - rt((~d)⨸(~c), 3)*atanh( sqrt((~c) + (~d)*(~x)^3)⨸(sqrt(3)*rt(-(~c), 2)))⨸(3*2^(2⨸3)*sqrt(3)*(~b)* rt(-(~c), 2)) - rt((~d)⨸(~c), 3)*atanh( sqrt(3)*rt(-(~c), 2)*(1 + 2^(1⨸3)*rt((~d)⨸(~c), 3)*(~x))⨸ sqrt((~c) + (~d)*(~x)^3))⨸(3*2^(2⨸3)*sqrt(3)*(~b)*rt(-(~c), 2)) - rt((~d)⨸(~c), 3)*atan( rt(-(~c), 2)*(1 - 2^(1⨸3)*rt((~d)⨸(~c), 3)*(~x))⨸sqrt((~c) + (~d)*(~x)^3))⨸(3*2^(2⨸3)*(~b)* rt(-(~c), 2)) : nothing) + +("1_1_3_4_53", +@rule ∫((~x)/(((~a) + (~!b)*(~x)^3)*sqrt((~c) + (~!d)*(~x)^3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq(8*(~b)*(~c) + (~a)*(~d), 0) ? +(~d)*rt((~d)⨸(~c), 3)⨸(4*(~b))*∫((~x)^2⨸((8*(~c) - (~d)*(~x)^3)*sqrt((~c) + (~d)*(~x)^3)), (~x)) - rt((~d)⨸(~c), 3)^2⨸(12*(~b))*∫((1 + rt((~d)⨸(~c), 3)*(~x))⨸((2 - rt((~d)⨸(~c), 3)*(~x))*sqrt((~c) + (~d)*(~x)^3)), (~x)) + 1⨸(12*(~b)*(~c))* ∫((2*(~c)*rt((~d)⨸(~c), 3)^2 - 2*(~d)*(~x) - (~d)*rt((~d)⨸(~c), 3)*(~x)^2)⨸((4 + 2*rt((~d)⨸(~c), 3)*(~x) + rt((~d)⨸(~c), 3)^2*(~x)^2)* sqrt((~c) + (~d)*(~x)^3)), (~x)) : nothing) + +("1_1_3_4_54", +@rule ∫((~x)/(((~c) + (~!d)*(~x)^3)*sqrt((~a) + (~!b)*(~x)^3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)^2*(~c)^2 - 20*(~a)*(~b)*(~c)*(~d) - 8*(~a)^2*(~d)^2, 0) && + pos((~a)) ? +-rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atan((1 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*sqrt((~a) + (~b)*(~x)^3)⨸(sqrt(2)*rt((~a), 2)*simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d)))^(3⨸2)))⨸(3* sqrt(2)*rt((~a), 2)*(~d)*simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d)))^(3⨸2)) - rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atan(rt((~a), 2)* sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + rt((~b)⨸(~a), 3)*(~x))⨸(sqrt(2)*sqrt((~a) + (~b)*(~x)^3)))⨸(2* sqrt(2)*rt((~a), 2)*(~d)*simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d)))^(3⨸2)) - rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atanh(rt((~a), 2)*(1 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + rt((~b)⨸(~a), 3)*(~x))⨸(sqrt(2)*sqrt((~a) + (~b)*(~x)^3)))⨸(6*sqrt(2)* rt((~a), 2)*(~d)*sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))) - rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atanh(rt((~a), 2)* sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))) - 2*rt((~b)⨸(~a), 3)*(~x))⨸(sqrt(2)*sqrt((~a) + (~b)*(~x)^3)))⨸(3*sqrt(2)* rt((~a), 2)*(~d)*sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))) : nothing) + +("1_1_3_4_55", +@rule ∫((~x)/(((~c) + (~!d)*(~x)^3)*sqrt((~a) + (~!b)*(~x)^3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)^2*(~c)^2 - 20*(~a)*(~b)*(~c)*(~d) - 8*(~a)^2*(~d)^2, 0) && + neg((~a)) ? +rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atanh((1 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*sqrt((~a) + (~b)*(~x)^3)⨸(sqrt(2)*rt(-(~a), 2)*simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d)))^(3⨸2)))⨸(3* sqrt(2)*rt(-(~a), 2)*(~d)*simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d)))^(3⨸2)) - rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atanh(rt(-(~a), 2)* sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + rt((~b)⨸(~a), 3)*(~x))⨸(sqrt(2)*sqrt((~a) + (~b)*(~x)^3)))⨸(2* sqrt(2)*rt(-(~a), 2)*(~d)*simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d)))^(3⨸2)) - rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atan(rt(-(~a), 2)*(1 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + rt((~b)⨸(~a), 3)*(~x))⨸(sqrt(2)*sqrt((~a) + (~b)*(~x)^3)))⨸(6*sqrt(2)* rt(-(~a), 2)*(~d)*sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))) - rt((~b)⨸(~a), 3)*(2 - simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))* atan(rt(-(~a), 2)* sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))*(1 + simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))) - 2*rt((~b)⨸(~a), 3)*(~x))⨸(sqrt(2)*sqrt((~a) + (~b)*(~x)^3)))⨸(3*sqrt(2)* rt(-(~a), 2)*(~d)*sqrt(simplify(((~b)*(~c) - 10*(~a)*(~d))⨸(6*(~a)*(~d))))) : nothing) + +("1_1_3_4_56", +@rule ∫((~x)/(((~a) + (~!b)*(~x)^3)^(1//3)*((~c) + (~!d)*(~x)^3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~c) + (~a)*(~d), 0) ? +-rt((~b)⨸(~a), 3)^2⨸(3*(~d))*∫(1⨸((1 - rt((~b)⨸(~a), 3)*(~x))*((~a) + (~b)*(~x)^3)^(1⨸3)), (~x)) + rt((~b)⨸(~a), 3)⨸(~d)* int_and_subst(1⨸(1 + 2*(~a)*(~x)^3), (~x), (~x), (1 + rt((~b)⨸(~a), 3)*(~x))⨸((~a) + (~b)*(~x)^3)^(1⨸3), "1_1_3_4_56") : nothing) + +("1_1_3_4_57", +@rule ∫((~x)/(((~a) + (~!b)*(~x)^3)^(2//3)*((~c) + (~!d)*(~x)^3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +-atan((1 + (2*rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)*(~x))⨸((~a) + (~b)*(~x)^3)^(1⨸3))⨸sqrt(3))⨸(sqrt(3)*(~c)* rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)^2) + log((~c) + (~d)*(~x)^3)⨸(6*(~c)*rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)^2) - log(rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)*(~x) - ((~a) + (~b)*(~x)^3)^(1⨸3))⨸(2*(~c)*rt(((~b)*(~c) - (~a)*(~d))⨸(~c), 3)^2) : nothing) + +("1_1_3_4_58", +@rule ∫((~x)^2/(((~a) + (~!b)*(~x)^4)*sqrt((~c) + (~!d)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +ext_den(rt(-(~a)⨸(~b), 2))⨸(2*(~b))*∫(1⨸((ext_num(rt(-(~a)⨸(~b), 2)) + ext_den(rt(-(~a)⨸(~b), 2))*(~x)^2)*sqrt((~c) + (~d)*(~x)^4)), (~x)) - ext_den(rt(-(~a)⨸(~b), 2))⨸(2*(~b))*∫(1⨸((ext_num(rt(-(~a)⨸(~b), 2)) - ext_den(rt(-(~a)⨸(~b), 2))*(~x)^2)*sqrt((~c) + (~d)*(~x)^4)), (~x)) : nothing) + +("1_1_3_4_59", +@rule ∫((~x)^2*sqrt((~c) + (~!d)*(~x)^4)/((~a) + (~!b)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~d)⨸(~b)*∫((~x)^2⨸sqrt((~c) + (~d)*(~x)^4), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫((~x)^2⨸(((~a) + (~b)*(~x)^4)*sqrt((~c) + (~d)*(~x)^4)), (~x)) : nothing) + +("1_1_3_4_60", +@rule ∫((~x)^2/(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + pos((~b)/(~a)) && + pos((~d)/(~c)) && + !(simpler(rt((~b)/(~a),2),rt( (~d)/(~c),2))) ? +(~x)*sqrt((~a) + (~b)*(~x)^2)⨸((~b)*sqrt((~c) + (~d)*(~x)^2)) - (~c)⨸(~b)*∫(sqrt((~a) + (~b)*(~x)^2)⨸((~c) + (~d)*(~x)^2)^(3⨸2), (~x)) : nothing) + +("1_1_3_4_61", +@rule ∫((~x)^(~n)/(sqrt((~a) + (~!b)*(~x)^(~n))*sqrt((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + eq((~n), 2) || + eq((~n), 4) + ) && + !( + eq((~n), 2) && + simpler(rt(-(~b)/(~a),2),rt( -(~d)/(~c),2)) + ) ? +1⨸(~b)*∫(sqrt((~a) + (~b)*(~x)^(~n))⨸sqrt((~c) + (~d)*(~x)^(~n)), (~x)) - (~a)⨸(~b)*∫(1⨸(sqrt((~a) + (~b)*(~x)^(~n))*sqrt((~c) + (~d)*(~x)^(~n))), (~x)) : nothing) + +("1_1_3_4_62", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + igt((~n), 0) && + isrational((~m), (~p)) && + ext_isinteger((~p) + ((~m) + 1)/(~n), (~q)) && + lt(-1, (~p), 0) ? +ext_den((~p))*(~a)^((~p) + ((~m) + 1)⨸(~n))⨸(~n)* int_and_subst((~x)^(ext_den((~p))*((~m) + 1)⨸(~n) - 1)*((~c) - ((~b)*(~c) - (~a)*(~d))*(~x)^ext_den((~p)))^ (~q)⨸(1 - (~b)*(~x)^ext_den((~p)))^((~p) + (~q) + ((~m) + 1)⨸(~n) + 1), (~x), (~x), (~x)^((~n)⨸ext_den((~p)))⨸((~a) + (~b)*(~x)^(~n))^(1⨸ext_den((~p))), "1_1_3_4_62") : nothing) + +("1_1_3_4_63", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ilt((~n), 0) && + ext_isinteger((~m)) ? +-int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_4_63") : nothing) + +("1_1_3_4_64", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + ilt((~n), 0) && + isfraction((~m)) ? +-ext_den((~m))⨸(~e)* int_and_subst(((~a) + (~b)*(~e)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~p)*((~c) + (~d)*(~e)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~q)⨸ (~x)^(ext_den((~m))*((~m) + 1) + 1), (~x), (~x), 1⨸((~e)*(~x))^(1⨸ext_den((~m))), "1_1_3_4_64") : nothing) + +("1_1_3_4_65", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ilt((~n), 0) && + !(isrational((~m))) ? +-((~e)*(~x))^(~m)*((~x)^(-1))^(~m)* int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_4_65") : nothing) + +("1_1_3_4_66", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*(~x)^(ext_den((~n))*(~n)))^(~p)*((~c) + (~d)*(~x)^(ext_den((~n))*(~n)))^(~q), (~x), (~x), (~x)^(1⨸ext_den((~n))), "1_1_3_4_66") : nothing) + +("1_1_3_4_67", +@rule ∫(((~e)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + isfraction((~n)) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +#(* Int[x_^m_.*(a_+b_.*x_^n_)^p_*(c_+d_.*x_^n_)^q_,x_Symbol] := -1/(m+1)*Subst[Int[(a+b*x^Simplify[-n/(m+1)])^p*(c+d*x^Simplify[-n/( m+1)])^q/x^2,x],x,x^(-(m+1))] /; FreeQ[{a,b,c,d,m,n},x] && NeQ[b*c-a*d,0] && NeQ[m,-1] && ILtQ[Simplify[n/(m+1)+1],0] && GeQ[p,-1] && LtQ[p,0] && GeQ[q,-1] && LtQ[q,0] && Not[IntegerQ[n]] *) +("1_1_3_4_68", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +1⨸((~m) + 1)* int_and_subst(((~a) + (~b)*(~x)^simplify((~n)⨸((~m) + 1)))^ (~p)*((~c) + (~d)*(~x)^simplify((~n)⨸((~m) + 1)))^(~q), (~x), (~x), (~x)^((~m) + 1), "1_1_3_4_68") : nothing) + +("1_1_3_4_69", +@rule ∫(((~e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_70", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + gt((~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +-((~c)*(~b) - (~a)*(~d))*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)⨸((~a)*(~b)*(~e)*(~n)*((~p) + 1)) + 1⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 2)* simp((~c)*((~c)*(~b)*(~n)*((~p) + 1) + ((~c)*(~b) - (~a)*(~d))*((~m) + 1)) + (~d)*((~c)*(~b)*(~n)*((~p) + 1) + ((~c)*(~b) - (~a)*(~d))*((~m) + (~n)*((~q) - 1) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_71", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + lt(0, (~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +-((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~a)*(~e)*(~n)*((~p) + 1)) + 1⨸((~a)*(~n)*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~m) + (~n)*((~p) + 1) + 1) + (~d)*((~m) + (~n)*((~p) + (~q) + 1) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_72", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +-(~b)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)*(~e)* (~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) + 1⨸((~a)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~c)*(~b)*((~m) + 1) + (~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1) + (~d)*(~b)*((~m) + (~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_73", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~q), 0) && + gt((~p), 0) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~e)*((~m) + (~n)*((~p) + (~q)) + 1)) + (~n)⨸((~m) + (~n)*((~p) + (~q)) + 1)* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) - 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~a)*(~c)*((~p) + (~q)) + ((~q)*((~b)*(~c) - (~a)*(~d)) + (~a)*(~d)*((~p) + (~q)))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_74", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~q), 1) && + int_binomial((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +(~d)*((~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)⨸((~b)* (~e)*((~m) + (~n)*((~p) + (~q)) + 1)) + 1⨸((~b)*((~m) + (~n)*((~p) + (~q)) + 1))* ∫(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 2)* simp((~c)*(((~c)*(~b) - (~a)*(~d))*((~m) + 1) + (~c)*(~b)*(~n)*((~p) + (~q))) + ((~d)*((~c)*(~b) - (~a)*(~d))*((~m) + 1) + (~d)*(~n)*((~q) - 1)*((~b)*(~c) - (~a)*(~d)) + (~c)*(~b)*(~d)*(~n)*((~p) + (~q)))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_4_75", +@rule ∫((~x)^(~m)/(((~a) + (~!b)*(~x)^(~n))*((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + eq((~m), (~n)) || + eq((~m), 2*(~n) - 1) + ) ? +-(~a)⨸((~b)*(~c) - (~a)*(~d))*∫((~x)^((~m) - (~n))⨸((~a) + (~b)*(~x)^(~n)), (~x)) + (~c)⨸((~b)*(~c) - (~a)*(~d))*∫((~x)^((~m) - (~n))⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_4_76", +@rule ∫(((~!e)*(~x))^(~!m)/(((~a) + (~!b)*(~x)^(~n))*((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e)*(~x))^(~m)⨸((~a) + (~b)*(~x)^(~n)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~e)*(~x))^(~m)⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_4_77", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~p), -2) && + ( + igt((~q), -2) || + eq((~q), -3) && + ext_isinteger(((~m) - 1)/2) + ) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)), (~x)) : nothing) + +("1_1_3_4_78", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~m), -1) && + !eq((~m), (~n) - 1) && + ( + ext_isinteger((~p)) || + gt((~a), 0) + ) && + ( + ext_isinteger((~q)) || + gt((~c), 0) + ) ? +(~a)^(~p)*(~c)^(~q)*((~e)*(~x))^((~m) + 1)⨸((~e)*((~m) + 1))* appell_f1(((~m) + 1)⨸(~n), -(~p), -(~q), 1 + ((~m) + 1)⨸(~n), -(~b)*(~x)^(~n)⨸(~a), -(~d)*(~x)^(~n)⨸(~c)) : nothing) + +("1_1_3_4_79", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~m), -1) && + !eq((~m), (~n) - 1) && + !( + ext_isinteger((~p)) || + gt((~a), 0) + ) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^(~n))^fracpart((~p))⨸(1 + (~b)*(~x)^(~n)⨸(~a))^fracpart((~p))* ∫(((~e)*(~x))^(~m)*(1 + (~b)*(~x)^(~n)⨸(~a))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_80", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*(~v)^(~n))^(~!p)*((~!c) + (~!d)*(~v)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~q), (~x)) && + linear((~v), (~x)) && + ext_isinteger((~m)) && + !eq((~v), (~x)) ? +1⨸ext_coeff((~v), (~x), 1)^((~m) + 1)* int_and_subst( ext_simplify(((~x) - ext_coeff((~v), (~x), 0))^(~m)*((~a) + (~b)*(~x)^(~n))^ (~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)), (~x), (~x), (~v), "1_1_3_4_80") : nothing) + +("1_1_3_4_81", +@rule ∫((~u)^(~!m)*((~!a) + (~!b)*(~v)^(~n))^(~!p)*((~!c) + (~!d)*(~v)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) && + linear_pair((~u), (~v), (~x)) ? +(~u)^(~m)⨸(ext_coeff((~v), (~x), 1)*(~v)^(~m))* int_and_subst((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x), (~x), (~v), "1_1_3_4_81") : nothing) + +("1_1_3_4_82", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) && + eq((~mn), -(~n)) && + ext_isinteger((~q)) && + ( + pos((~n)) || + !(ext_isinteger((~p))) + ) ? +∫((~x)^((~m) - (~n)*(~q))*((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_83", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) && + eq((~mn), -(~n)) && + !(ext_isinteger((~q))) && + !(ext_isinteger((~p))) ? +(~x)^((~n)*fracpart((~q)))*((~c) + (~d)*(~x)^(-(~n)))^fracpart((~q))⨸((~d) + (~c)*(~x)^(~n))^ fracpart((~q))*∫((~x)^((~m) - (~n)*(~q))*((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_84", +@rule ∫(((~e)*(~x))^(~m)*((~!a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + eq((~mn), -(~n)) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q), (~x)) : nothing) + +#(* IntBinomialQ[a,b,c,d,e,m,n,p,q,x] returns True iff (e*x)^m*(a+b*x^n)^p*(c+d*x^n)^q is integrable wrt x in terms of non-Appell functions. *) IntBinomialQ[a_, b_, c_, d_, e_, m_, n_, p_, q_, x_Symbol] := IntegersQ[p, q] || IGtQ[p, 0] || IGtQ[q, 0] || EqQ[n, 2] && (IntegersQ[m, 2*p, 2*q] || IntegersQ[2*m, p, 2*q] || IntegersQ[2*m, 2*p, q]) || EqQ[n, 4] && (IntegersQ[m, p, 2*q] || IntegersQ[m, 2*p, q]) || EqQ[n, 2] && IntegersQ[m/2, p + 1/3, q] && (EqQ[b*c + 3*a*d, 0] || EqQ[b*c - 9*a*d, 0]) || EqQ[n, 2] && IntegersQ[m/2, q + 1/3, p] && (EqQ[a*d + 3*b*c, 0] || EqQ[a*d - 9*b*c, 0]) || EqQ[n, 3] && IntegersQ[(m - 1)/3, q, p - 1/2] && (EqQ[b*c - 4*a*d, 0] || EqQ[b*c + 8*a*d, 0] || EqQ[b^2*c^2 - 20*a*b*c*d - 8*a^2*d^2, 0]) || EqQ[n, 3] && IntegersQ[(m - 1)/3, p, q - 1/2] && (EqQ[4*b*c - a*d, 0] || EqQ[8*b*c + a*d, 0] || EqQ[8*b^2*c^2 + 20*a*b*c*d - a^2*d^2, 0]) || EqQ[n, 3] && (IntegersQ[m, q, 3*p] || IntegersQ[m, p, 3*q]) && EqQ[b*c + a*d, 0] || EqQ[n, 3] && (IntegersQ[(m + 2)/3, p + 2/3, q] || IntegersQ[(m + 2)/3, q + 2/3, p]) || EqQ[n, 3] && (IntegersQ[m/3, p + 1/3, q] || IntegersQ[m/3, q + 1/3, p]) +("1_1_3_4_85", +@rule ∫((~!u)*((~a1) + (~!b1)*(~x)^(~!N2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~!p)*((~c) + (~!d)*(~x)^(~!n))^(~!q),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~n), (~p), (~q), (~x)) && + eq((~N2), (~n)/2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + ext_isinteger((~p)) || + gt((~a1), 0) && + gt((~a2), 0) + ) ? +∫((~u)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_86", +@rule ∫((~!u)*((~a1) + (~!b1)*(~x)^(~!N2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~!p)*((~c) + (~!d)*(~x)^(~!n) + (~!e)*(~x)^(~!n2))^(~!q),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~e), (~n), (~p), (~q), (~x)) && + eq((~N2), (~n)/2) && + eq((~n2), 2*(~n)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + ext_isinteger((~p)) || + gt((~a1), 0) && + gt((~a2), 0) + ) ? +∫((~u)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n) + (~e)*(~x)^(2*(~n)))^(~q), (~x)) : nothing) + +("1_1_3_4_87", +@rule ∫((~!u)*((~a1) + (~!b1)*(~x)^(~!N2))^(~p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~p)*((~c) + (~!d)*(~x)^(~!n))^(~!q),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~n), (~p), (~q), (~x)) && + eq((~N2), (~n)/2) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + !( + eq((~n), 2) && + igt((~q), 0) + ) ? +((~a1) + (~b1)*(~x)^((~n)⨸2))^ fracpart((~p))*((~a2) + (~b2)*(~x)^((~n)⨸2))^fracpart((~p))⨸((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(~n))^ fracpart((~p))* ∫((~u)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_4_88", +@rule ∫((~!u)*((~a1) + (~!b1)*(~x)^(~!N2))^(~!p)*((~a2) + (~!b2)*(~x)^(~!N2))^ (~!p)*((~c) + (~!d)*(~x)^(~!n) + (~!e)*(~x)^(~!n2))^(~!q),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~d), (~e), (~n), (~p), (~q), (~x)) && + eq((~N2), (~n)/2) && + eq((~n2), 2*(~n)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) ? +((~a1) + (~b1)*(~x)^((~n)⨸2))^ fracpart((~p))*((~a2) + (~b2)*(~x)^((~n)⨸2))^fracpart((~p))⨸((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(~n))^ fracpart((~p))* ∫((~u)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n) + (~e)*(~x)^(2*(~n)))^(~q), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.5 (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.5 (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl new file mode 100644 index 0000000..c074b77 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.5 (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl @@ -0,0 +1,320 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.5 (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r *) +("1_1_3_5_1", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + igt((~p), 0) && + igt((~q), 0) && + igt((~r), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)), (~x)) : nothing) + +("1_1_3_5_2", +@rule ∫(((~e) + (~!f)*(~x)^(~n))/(((~a) + (~!b)*(~x)^(~n))*((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) ? +((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~a) + (~b)*(~x)^(~n)), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_5_3", +@rule ∫(((~e) + (~!f)*(~x)^(~n))/(((~a) + (~!b)*(~x)^(~n))*sqrt((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) ? +(~f)⨸(~b)*∫(1⨸sqrt((~c) + (~d)*(~x)^(~n)), (~x)) + ((~b)*(~e) - (~a)*(~f))⨸(~b)*∫(1⨸(((~a) + (~b)*(~x)^(~n))*sqrt((~c) + (~d)*(~x)^(~n))), (~x)) : nothing) + +("1_1_3_5_4", +@rule ∫(((~e) + (~!f)*(~x)^(~n))/(sqrt((~a) + (~!b)*(~x)^(~n))*sqrt((~c) + (~!d)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !( + eq((~n), 2) && + ( + pos((~b)/(~a)) && + pos((~d)/(~c)) || + neg((~b)/(~a)) && + ( + pos((~d)/(~c)) || + gt((~a), 0) && + ( + !(gt((~c), 0)) || + simpler(rt(-(~b)/(~a),2),rt( -(~d)/(~c),2)) + ) + ) + ) + ) ? +(~f)⨸(~b)*∫(sqrt((~a) + (~b)*(~x)^(~n))⨸sqrt((~c) + (~d)*(~x)^(~n)), (~x)) + ((~b)*(~e) - (~a)*(~f))⨸(~b)*∫(1⨸(sqrt((~a) + (~b)*(~x)^(~n))*sqrt((~c) + (~d)*(~x)^(~n))), (~x)) : nothing) + +("1_1_3_5_5", +@rule ∫(((~e) + (~!f)*(~x)^2)/(sqrt((~a) + (~!b)*(~x)^2)*((~c) + (~!d)*(~x)^2)^(3//2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + pos((~b)/(~a)) && + pos((~d)/(~c)) ? +((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(1⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt((~a) + (~b)*(~x)^2)⨸((~c) + (~d)*(~x)^2)^(3⨸2), (~x)) : nothing) + +("1_1_3_5_6", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + lt((~p), -1) && + gt((~q), 0) ? +-((~b)*(~e) - (~a)*(~f))* (~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~a)*(~b)*(~n)*((~p) + 1)) + 1⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~b)*(~e)*(~n)*((~p) + 1) + (~b)*(~e) - (~a)*(~f)) + (~d)*((~b)*(~e)*(~n)*((~p) + 1) + ((~b)*(~e) - (~a)*(~f))*((~n)*(~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_5_7", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~q), (~x)) && + lt((~p), -1) ? +-((~b)*(~e) - (~a)*(~f))* (~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)* (~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) + 1⨸((~a)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~c)*((~b)*(~e) - (~a)*(~f)) + (~e)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1) + (~d)*((~b)*(~e) - (~a)*(~f))*((~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_5_8", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + gt((~q), 0) && + !eq((~n)*((~p) + (~q) + 1) + 1, 0) ? +(~f)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~b)*((~n)*((~p) + (~q) + 1) + 1)) + 1⨸((~b)*((~n)*((~p) + (~q) + 1) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~b)*(~e) - (~a)*(~f) + (~b)*(~e)*(~n)*((~p) + (~q) + 1)) + ((~d)*((~b)*(~e) - (~a)*(~f)) + (~f)*(~n)*(~q)*((~b)*(~c) - (~a)*(~d)) + (~b)*(~d)*(~e)*(~n)*((~p) + (~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_5_9", +@rule ∫(((~e) + (~!f)*(~x)^4)/(((~a) + (~!b)*(~x)^4)^(3//4)*((~c) + (~!d)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(1⨸((~a) + (~b)*(~x)^4)^(3⨸4), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(((~a) + (~b)*(~x)^4)^(1⨸4)⨸((~c) + (~d)*(~x)^4), (~x)) : nothing) + +("1_1_3_5_10", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~e) + (~!f)*(~x)^(~n))/((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~n), (~x)) ? +(~f)⨸(~d)*∫(((~a) + (~b)*(~x)^(~n))^(~p), (~x)) + ((~d)*(~e) - (~c)*(~f))⨸(~d)* ∫(((~a) + (~b)*(~x)^(~n))^(~p)⨸((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("1_1_3_5_11", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~q), (~x)) ? +(~e)*∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) + (~f)*∫((~x)^(~n)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_5_12", +@rule ∫(1/(((~a) + (~!b)*(~x)^2)*((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸(((~a) + (~b)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸(((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_13", +@rule ∫(1/((~x)^2*((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) ? +1⨸(~c)*∫(1⨸((~x)^2*sqrt((~e) + (~f)*(~x)^2)), (~x)) - (~d)⨸(~c)*∫(1⨸(((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_14", +@rule ∫(sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)/((~a) + (~!b)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~d)/(~c), 0) && + gt((~f)/(~e), 0) && + !(simpler(rt((~d)/(~c),2),rt( (~f)/(~e),2))) ? +(~d)⨸(~b)*∫(sqrt((~e) + (~f)*(~x)^2)⨸sqrt((~c) + (~d)*(~x)^2), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(sqrt((~e) + (~f)*(~x)^2)⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_15", +@rule ∫(sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)/((~a) + (~!b)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !(simpler(rt(-(~f)/(~e),2),rt( -(~d)/(~c),2))) ? +(~d)⨸(~b)*∫(sqrt((~e) + (~f)*(~x)^2)⨸sqrt((~c) + (~d)*(~x)^2), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(sqrt((~e) + (~f)*(~x)^2)⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_16", +@rule ∫(1/(((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~d)/(~c), 0) && + gt((~f)/(~e), 0) && + !(simpler(rt((~d)/(~c),2),rt( (~f)/(~e),2))) ? +-(~f)⨸((~b)*(~e) - (~a)*(~f))*∫(1⨸(sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) + (~b)⨸((~b)*(~e) - (~a)*(~f))* ∫(sqrt((~e) + (~f)*(~x)^2)⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_17", +@rule ∫(1/(((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !(gt((~d)/(~c), 0)) && + gt((~c), 0) && + gt((~e), 0) && + !( + !(gt((~f)/(~e), 0)) && + simpler(rt(-(~f)/(~e),2),rt( -(~d)/(~c),2)) + ) ? +1⨸((~a)*sqrt((~c))*sqrt((~e))*rt(-(~d)⨸(~c), 2))* elliptic_pi((~b)*(~c)⨸((~a)*(~d)), asin(rt(-(~d)⨸(~c), 2)*(~x)), (~c)*(~f)⨸((~d)*(~e))) : nothing) + +("1_1_3_5_18", +@rule ∫(1/(((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !(gt((~c), 0)) ? +sqrt(1 + (~d)⨸(~c)*(~x)^2)⨸sqrt((~c) + (~d)*(~x)^2)* ∫(1⨸(((~a) + (~b)*(~x)^2)*sqrt(1 + (~d)⨸(~c)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_19", +@rule ∫(sqrt((~c) + (~!d)*(~x)^2)/(((~a) + (~!b)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + pos((~d)/(~c)) ? +(~c)*sqrt( (~e) + (~f)*(~x)^2)⨸((~a)*(~e)*rt((~d)⨸(~c), 2)*sqrt((~c) + (~d)*(~x)^2)* sqrt((~c)*((~e) + (~f)*(~x)^2)⨸((~e)*((~c) + (~d)*(~x)^2))))* elliptic_pi(1 - (~b)*(~c)⨸((~a)*(~d)), atan(rt((~d)⨸(~c), 2)*(~x)), 1 - (~c)*(~f)⨸((~d)*(~e))) : nothing) + +#(* Int[Sqrt[c_+d_.*x_^2]/((a_+b_.*x_^2)*Sqrt[e_+f_.*x_^2]),x_Symbol] := Sqrt[c+d*x^2]*Sqrt[c*(e+f*x^2)/(e*(c+d*x^2))]/(a*Rt[d/c,2]*Sqrt[e+f* x^2])* EllipticPi[1-b*c/(a*d),ArcTan[Rt[d/c,2]*x],1-c*f/(d*e)] /; FreeQ[{a,b,c,d,e,f},x] && PosQ[d/c] *) +("1_1_3_5_20", +@rule ∫(sqrt((~c) + (~!d)*(~x)^2)/(((~a) + (~!b)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + neg((~d)/(~c)) ? +(~d)⨸(~b)*∫(1⨸(sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(1⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_21", +@rule ∫(sqrt((~e) + (~!f)*(~x)^2)/(((~a) + (~!b)*(~x)^2)*((~c) + (~!d)*(~x)^2)^(3//2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + pos((~d)/(~c)) && + pos((~f)/(~e)) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt((~e) + (~f)*(~x)^2)⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(sqrt((~e) + (~f)*(~x)^2)⨸((~c) + (~d)*(~x)^2)^(3⨸2), (~x)) : nothing) + +("1_1_3_5_22", +@rule ∫(((~e) + (~!f)*(~x)^2)^(3//2)/(((~a) + (~!b)*(~x)^2)*((~c) + (~!d)*(~x)^2)^(3//2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + pos((~d)/(~c)) && + pos((~f)/(~e)) ? +((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt((~e) + (~f)*(~x)^2)⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt((~e) + (~f)*(~x)^2)⨸((~c) + (~d)*(~x)^2)^(3⨸2), (~x)) : nothing) + +("1_1_3_5_23", +@rule ∫(((~c) + (~!d)*(~x)^2)^(3//2)*sqrt((~e) + (~!f)*(~x)^2)/((~a) + (~!b)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + pos((~d)/(~c)) && + pos((~f)/(~e)) ? +((~b)*(~c) - (~a)*(~d))^2⨸(~b)^2* ∫(sqrt((~e) + (~f)*(~x)^2)⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) + (~d)⨸(~b)^2* ∫((2*(~b)*(~c) - (~a)*(~d) + (~b)*(~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)⨸sqrt((~c) + (~d)*(~x)^2), (~x)) : nothing) + +("1_1_3_5_24", +@rule ∫(((~c) + (~!d)*(~x)^2)^(~q)*((~e) + (~!f)*(~x)^2)^(~r)/((~a) + (~!b)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + lt((~q), -1) && + gt((~r), 1) ? +(~b)*((~b)*(~e) - (~a)*(~f))⨸((~b)*(~c) - (~a)*(~d))^2* ∫(((~c) + (~d)*(~x)^2)^((~q) + 2)*((~e) + (~f)*(~x)^2)^((~r) - 1)⨸((~a) + (~b)*(~x)^2), (~x)) - 1⨸((~b)*(~c) - (~a)*(~d))^2* ∫(((~c) + (~d)*(~x)^2)^ (~q)*((~e) + (~f)*(~x)^2)^((~r) - 1)*(2*(~b)*(~c)*(~d)*(~e) - (~a)*(~d)^2*(~e) - (~b)*(~c)^2*(~f) + (~d)^2*((~b)*(~e) - (~a)*(~f))*(~x)^2), (~x)) : nothing) + +("1_1_3_5_25", +@rule ∫(((~c) + (~!d)*(~x)^2)^(~q)*((~e) + (~!f)*(~x)^2)^(~r)/((~a) + (~!b)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~r), (~x)) && + gt((~q), 1) ? +(~d)⨸(~b)*∫(((~c) + (~d)*(~x)^2)^((~q) - 1)*((~e) + (~f)*(~x)^2)^(~r), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(((~c) + (~d)*(~x)^2)^((~q) - 1)*((~e) + (~f)*(~x)^2)^(~r)⨸((~a) + (~b)*(~x)^2), (~x)) : nothing) + +("1_1_3_5_26", +@rule ∫(((~c) + (~!d)*(~x)^2)^(~q)*((~e) + (~!f)*(~x)^2)^(~r)/((~a) + (~!b)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~r), (~x)) && + lt((~q), -1) ? +(~b)^2⨸((~b)*(~c) - (~a)*(~d))^2* ∫(((~c) + (~d)*(~x)^2)^((~q) + 2)*((~e) + (~f)*(~x)^2)^(~r)⨸((~a) + (~b)*(~x)^2), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))^2* ∫(((~c) + (~d)*(~x)^2)^(~q)*((~e) + (~f)*(~x)^2)^(~r)*(2*(~b)*(~c) - (~a)*(~d) + (~b)*(~d)*(~x)^2), (~x)) : nothing) + +("1_1_3_5_27", +@rule ∫(((~c) + (~!d)*(~x)^2)^(~q)*((~e) + (~!f)*(~x)^2)^(~r)/((~a) + (~!b)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~r), (~x)) && + le((~q), -1) ? +-(~d)⨸((~b)*(~c) - (~a)*(~d))*∫(((~c) + (~d)*(~x)^2)^(~q)*((~e) + (~f)*(~x)^2)^(~r), (~x)) + (~b)⨸((~b)*(~c) - (~a)*(~d))* ∫(((~c) + (~d)*(~x)^2)^((~q) + 1)*((~e) + (~f)*(~x)^2)^(~r)⨸((~a) + (~b)*(~x)^2), (~x)) : nothing) + +("1_1_3_5_28", +@rule ∫(sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)/((~a) + (~!b)*(~x)^2)^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +(~x)*sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)⨸(2*(~a)*((~a) + (~b)*(~x)^2)) + (~d)*(~f)⨸(2*(~a)*(~b)^2)* ∫(((~a) - (~b)*(~x)^2)⨸(sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) + ((~b)^2*(~c)*(~e) - (~a)^2*(~d)*(~f))⨸(2*(~a)*(~b)^2)* ∫(1⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_29", +@rule ∫(1/(((~a) + (~!b)*(~x)^2)^2*sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +(~b)^2*(~x)*sqrt((~c) + (~d)*(~x)^2)* sqrt((~e) + (~f)*(~x)^2)⨸(2*(~a)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f))*((~a) + (~b)*(~x)^2)) - (~d)*(~f)⨸(2*(~a)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(((~a) + (~b)*(~x)^2)⨸(sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) + ((~b)^2*(~c)*(~e) + 3*(~a)^2*(~d)*(~f) - 2*(~a)*(~b)*((~d)*(~e) + (~c)*(~f)))⨸(2* (~a)*((~b)*(~c) - (~a)*(~d))*((~b)*(~e) - (~a)*(~f)))* ∫(1⨸(((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_30", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q)*((~e) + (~!f)*(~x)^(~n))^(~r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~r), (~x)) && + ilt((~p), 0) && + gt((~q), 0) ? +(~d)⨸(~b)*∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_5_31", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q)*((~e) + (~!f)*(~x)^(~n))^(~r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~q), (~x)) && + ilt((~p), 0) && + le((~q), -1) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))* ∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_5_32", +@rule ∫(1/(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +sqrt((~c) + (~d)*(~x)^2)* sqrt((~a)*((~e) + (~f)*(~x)^2)⨸((~e)*((~a) + (~b)*(~x)^2)))⨸((~c)*sqrt((~e) + (~f)*(~x)^2)* sqrt((~a)*((~c) + (~d)*(~x)^2)⨸((~c)*((~a) + (~b)*(~x)^2))))* int_and_subst(1⨸(sqrt(1 - ((~b)*(~c) - (~a)*(~d))*(~x)^2⨸(~c))*sqrt(1 - ((~b)*(~e) - (~a)*(~f))*(~x)^2⨸(~e))), (~x), (~x), (~x)⨸sqrt((~a) + (~b)*(~x)^2), "1_1_3_5_32") : nothing) + +("1_1_3_5_33", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2)/(sqrt((~c) + (~!d)*(~x)^2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +(~a)*sqrt((~c) + (~d)*(~x)^2)* sqrt((~a)*((~e) + (~f)*(~x)^2)⨸((~e)*((~a) + (~b)*(~x)^2)))⨸((~c)*sqrt((~e) + (~f)*(~x)^2)* sqrt((~a)*((~c) + (~d)*(~x)^2)⨸((~c)*((~a) + (~b)*(~x)^2))))* int_and_subst(1⨸((1 - (~b)*(~x)^2)*sqrt(1 - ((~b)*(~c) - (~a)*(~d))*(~x)^2⨸(~c))* sqrt(1 - ((~b)*(~e) - (~a)*(~f))*(~x)^2⨸(~e))), (~x), (~x), (~x)⨸sqrt((~a) + (~b)*(~x)^2), "1_1_3_5_33") : nothing) + +("1_1_3_5_34", +@rule ∫(sqrt((~c) + (~!d)*(~x)^2)/(((~a) + (~!b)*(~x)^2)^(3//2)*sqrt((~e) + (~!f)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +sqrt((~c) + (~d)*(~x)^2)* sqrt((~a)*((~e) + (~f)*(~x)^2)⨸((~e)*((~a) + (~b)*(~x)^2)))⨸((~a)*sqrt((~e) + (~f)*(~x)^2)* sqrt((~a)*((~c) + (~d)*(~x)^2)⨸((~c)*((~a) + (~b)*(~x)^2))))* int_and_subst(sqrt(1 - ((~b)*(~c) - (~a)*(~d))*(~x)^2⨸(~c))⨸sqrt(1 - ((~b)*(~e) - (~a)*(~f))*(~x)^2⨸(~e)), (~x), (~x), (~x)⨸sqrt((~a) + (~b)*(~x)^2), "1_1_3_5_34") : nothing) + +("1_1_3_5_35", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)/sqrt((~e) + (~!f)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + pos(((~d)*(~e) - (~c)*(~f))/(~c)) ? +(~d)*(~x)*sqrt((~a) + (~b)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)⨸(2*(~f)*sqrt((~c) + (~d)*(~x)^2)) - (~c)*((~d)*(~e) - (~c)*(~f))⨸(2*(~f))* ∫(sqrt((~a) + (~b)*(~x)^2)⨸(((~c) + (~d)*(~x)^2)^(3⨸2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) + (~b)*(~c)*((~d)*(~e) - (~c)*(~f))⨸(2*(~d)*(~f))* ∫(1⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) - ((~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f))⨸(2*(~d)*(~f))* ∫(sqrt((~c) + (~d)*(~x)^2)⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_36", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)/sqrt((~e) + (~!f)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + neg(((~d)*(~e) - (~c)*(~f))/(~c)) ? +(~x)*sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)⨸(2*sqrt((~e) + (~f)*(~x)^2)) + (~e)*((~b)*(~e) - (~a)*(~f))⨸(2*(~f))* ∫(sqrt((~c) + (~d)*(~x)^2)⨸(sqrt((~a) + (~b)*(~x)^2)*((~e) + (~f)*(~x)^2)^(3⨸2)), (~x)) + ((~b)*(~e) - (~a)*(~f))*((~d)*(~e) - 2*(~c)*(~f))⨸(2*(~f)^2)* ∫(1⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) - ((~b)*(~d)*(~e) - (~b)*(~c)*(~f) - (~a)*(~d)*(~f))⨸(2*(~f)^2)* ∫(sqrt((~e) + (~f)*(~x)^2)⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~c) + (~d)*(~x)^2)), (~x)) : nothing) + +("1_1_3_5_37", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2)*sqrt((~c) + (~!d)*(~x)^2)/((~e) + (~!f)*(~x)^2)^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) ? +(~b)⨸(~f)*∫(sqrt((~c) + (~d)*(~x)^2)⨸(sqrt((~a) + (~b)*(~x)^2)*sqrt((~e) + (~f)*(~x)^2)), (~x)) - ((~b)*(~e) - (~a)*(~f))⨸(~f)* ∫(sqrt((~c) + (~d)*(~x)^2)⨸(sqrt((~a) + (~b)*(~x)^2)*((~e) + (~f)*(~x)^2)^(3⨸2)), (~x)) : nothing) + +("1_1_3_5_38", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q)*((~e) + (~!f)*(~x)^(~n))^(~r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~r), (~x)) && + igt((~n), 0) && + issum(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x))) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)), (~x)) : nothing) + +("1_1_3_5_39", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~q)*((~e) + (~!f)*(~x)^(~n))^(~r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~r), (~x)) && + ilt((~n), 0) ? +-int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)*((~e) + (~f)*(~x)^(-(~n)))^(~r)⨸(~x)^2, (~x), (~x), 1⨸(~x), "1_1_3_5_39") : nothing) + +# ("1_1_3_5_40", +# @rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)] : nothing) + +("1_1_3_5_41", +@rule ∫(((~!a) + (~!b)*(~u)^(~n))^(~!p)*((~!c) + (~!d)*(~v)^(~n))^(~!q)*((~!e) + (~!f)*(~w)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~n), (~q), (~r), (~x)) && + eq((~u), (~v)) && + eq((~u), (~w)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x), (~x), (~u), "1_1_3_5_41") : nothing) + +("1_1_3_5_42", +@rule ∫(((~!a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^(~!q)*((~e) + (~!f)*(~x)^(~!n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~r), (~x)) && + eq((~mn), -(~n)) && + ext_isinteger((~q)) ? +∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r)⨸(~x)^((~n)*(~q)), (~x)) : nothing) + +("1_1_3_5_43", +@rule ∫(((~!a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^(~!q)*((~e) + (~!f)*(~x)^(~!n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~q), (~x)) && + eq((~mn), -(~n)) && + ext_isinteger((~p)) && + ext_isinteger((~r)) ? +∫((~x)^((~n)*((~p) + (~r)))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)*((~f) + (~e)*(~x)^(-(~n)))^ (~r), (~x)) : nothing) + +("1_1_3_5_44", +@rule ∫(((~!a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^(~q)*((~e) + (~!f)*(~x)^(~!n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~q), (~r), (~x)) && + eq((~mn), -(~n)) && + !(ext_isinteger((~q))) ? +(~x)^((~n)*fracpart((~q)))*((~c) + (~d)*(~x)^(-(~n)))^fracpart((~q))⨸((~d) + (~c)*(~x)^(~n))^ fracpart((~q))* ∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r)⨸(~x)^((~n)*(~q)), (~x)) : nothing) + +("1_1_3_5_45", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e1) + (~!f1)*(~x)^(~!n2))^ (~!r)*((~e2) + (~!f2)*(~x)^(~!n2))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e1), (~f1), (~e2), (~f2), (~n), (~p), (~q), (~r), (~x)) && + eq((~n2), (~n)/2) && + eq((~e2)*(~f1) + (~e1)*(~f2), 0) && + ( + ext_isinteger((~r)) || + gt((~e1), 0) && + gt((~e2), 0) + ) ? +∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e1)*(~e2) + (~f1)*(~f2)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_5_46", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e1) + (~!f1)*(~x)^(~!n2))^ (~!r)*((~e2) + (~!f2)*(~x)^(~!n2))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e1), (~f1), (~e2), (~f2), (~n), (~p), (~q), (~r), (~x)) && + eq((~n2), (~n)/2) && + eq((~e2)*(~f1) + (~e1)*(~f2), 0) ? +((~e1) + (~f1)*(~x)^((~n)⨸2))^ fracpart((~r))*((~e2) + (~f2)*(~x)^((~n)⨸2))^fracpart((~r))⨸((~e1)*(~e2) + (~f1)*(~f2)*(~x)^(~n))^ fracpart((~r))* ∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e1)*(~e2) + (~f1)*(~f2)*(~x)^(~n))^(~r), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.6 (g x)^m (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.6 (g x)^m (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl new file mode 100644 index 0000000..ebf18b7 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.6 (g x)^m (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r.jl @@ -0,0 +1,302 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.6 (g x)^m (a+b x^n)^p (c+d x^n)^q (e+f x^n)^r *) +("1_1_3_6_1", +@rule ∫(((~!g)*(~x))^(~!m)*((~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + ( + ext_isinteger((~m)) || + gt((~g), 0) + ) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~g)^(~m)⨸((~n)*(~b)^(simplify(((~m) + 1)⨸(~n)) - 1))* int_and_subst(((~b)*(~x))^((~p) + simplify(((~m) + 1)⨸(~n)) - 1)*((~c) + (~d)*(~x))^ (~q)*((~e) + (~f)*(~x))^(~r), (~x), (~x), (~x)^(~n), "1_1_3_6_1") : nothing) + +("1_1_3_6_2", +@rule ∫(((~!g)*(~x))^(~!m)*((~!b)*(~x)^(~!n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + ( + ext_isinteger((~m)) || + gt((~g), 0) + ) && + !(ext_isinteger(simplify(((~m) + 1)/(~n)))) ? +(~g)^(~m)*(~b)^intpart((~p))*((~b)*(~x)^(~n))^fracpart((~p))⨸(~x)^((~n)*fracpart((~p)))* ∫((~x)^((~m) + (~n)*(~p))*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_3", +@rule ∫(((~g)*(~x))^(~m)*((~!b)*(~x)^(~!n))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + !(ext_isinteger((~m))) ? +(~g)^intpart((~m))*((~g)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_4", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + igt((~p), -2) && + igt((~q), 0) && + igt((~r), 0) ? +∫(ext_expand(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^ (~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)), (~x)) : nothing) + +("1_1_3_6_5", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~m) - (~n) + 1, 0) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q)*((~e) + (~f)*(~x))^(~r), (~x), (~x), (~x)^(~n), "1_1_3_6_5") : nothing) + +("1_1_3_6_6", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + ext_isinteger((~p), (~q), (~r)) && + neg((~n)) ? +∫((~x)^((~m) + (~n)*((~p) + (~q) + (~r)))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*((~d) + (~c)*(~x)^(-(~n)))^ (~q)*((~f) + (~e)*(~x)^(-(~n)))^(~r), (~x)) : nothing) + +("1_1_3_6_7", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q)*((~e) + (~f)*(~x))^ (~r), (~x), (~x), (~x)^(~n), "1_1_3_6_7") : nothing) + +("1_1_3_6_8", +@rule ∫(((~g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~g)^intpart((~m))*((~g)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_9", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~r), (~x)) && + igt((~n), 0) && + ext_isinteger((~m)) && + gcd((~m) + 1, (~n)) != 1 ? +1⨸gcd((~m) + 1, (~n))* int_and_subst( (~x)^(((~m) + 1)⨸gcd((~m) + 1, (~n)) - 1)*((~a) + (~b)*(~x)^((~n)⨸gcd((~m) + 1, (~n))))^(~p)*((~c) + (~d)*(~x)^((~n)⨸gcd((~m) + 1, (~n))))^ (~q)*((~e) + (~f)*(~x)^((~n)⨸gcd((~m) + 1, (~n))))^(~r), (~x), (~x), (~x)^gcd((~m) + 1, (~n)), "1_1_3_6_9") : nothing) + +("1_1_3_6_10", +@rule ∫(((~!g)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~q)*((~e) + (~!f)*(~x)^(~n))^(~r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~q), (~r), (~x)) && + igt((~n), 0) && + isfraction((~m)) ? +ext_den((~m))⨸(~g)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*(~x)^(ext_den((~m))*(~n))⨸(~g)^(~n))^(~p)*((~c) + (~d)*(~x)^(ext_den((~m))*(~n))⨸(~g)^(~n))^ (~q)*((~e) + (~f)*(~x)^(ext_den((~m))*(~n))⨸(~g)^(~n))^(~r), (~x), (~x), ((~g)*(~x))^(1⨸ext_den((~m))), "1_1_3_6_10") : nothing) + +("1_1_3_6_11", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + igt((~n), 0) && + lt((~p), -1) && + gt((~q), 0) && + !( + eq((~q), 1) && + simpler((~b)*(~c) - (~a)*(~d), (~b)*(~e) - (~a)*(~f)) + ) ? +-((~b)*(~e) - (~a)*(~f))*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~a)*(~b)*(~g)*(~n)*((~p) + 1)) + 1⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~b)*(~e)*(~n)*((~p) + 1) + ((~b)*(~e) - (~a)*(~f))*((~m) + 1)) + (~d)*((~b)*(~e)*(~n)*((~p) + 1) + ((~b)*(~e) - (~a)*(~f))*((~m) + (~n)*(~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_12", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~q), (~x)) && + igt((~n), 0) && + lt((~p), -1) && + gt((~m) - (~n) + 1, 0) ? +(~g)^((~n) - 1)*((~b)*(~e) - (~a)*(~f))*((~g)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~b)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) - (~g)^(~n)⨸((~b)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~g)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~c)*((~b)*(~e) - (~a)*(~f))*((~m) - (~n) + 1) + ((~d)*((~b)*(~e) - (~a)*(~f))*((~m) + (~n)*(~q) + 1) - (~b)*(~n)*((~c)*(~f) - (~d)*(~e))*((~p) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_13", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~q), (~x)) && + igt((~n), 0) && + lt((~p), -1) ? +-((~b)*(~e) - (~a)*(~f))*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)*(~g)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) + 1⨸((~a)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~c)*((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~e)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1) + (~d)*((~b)*(~e) - (~a)*(~f))*((~m) + (~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_14", +@rule ∫(((~!g)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + igt((~n), 0) && + gt((~q), 0) && + lt((~m), -1) && + !( + eq((~q), 1) && + simpler((~e) + (~f)*(~x)^(~n), (~c) + (~d)*(~x)^(~n)) + ) ? +(~e)*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)⨸((~a)*(~g)*((~m) + 1)) - 1⨸((~a)*(~g)^(~n)*((~m) + 1))* ∫(((~g)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~e)*(~n)*((~b)*(~c)*((~p) + 1) + (~a)*(~d)*(~q)) + (~d)*(((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~b)*(~e)*(~n)*((~p) + (~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_15", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + igt((~n), 0) && + gt((~q), 0) && + !( + eq((~q), 1) && + simpler((~e) + (~f)*(~x)^(~n), (~c) + (~d)*(~x)^(~n)) + ) ? +(~f)*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~b)*(~g)*((~m) + (~n)*((~p) + (~q) + 1) + 1)) + 1⨸((~b)*((~m) + (~n)*((~p) + (~q) + 1) + 1))* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*(((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~b)*(~e)*(~n)*((~p) + (~q) + 1)) + ((~d)*((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~f)*(~n)*(~q)*((~b)*(~c) - (~a)*(~d)) + (~b)*(~e)*(~d)*(~n)*((~p) + (~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_16", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~q), (~x)) && + igt((~n), 0) && + gt((~m), (~n) - 1) ? +(~f)*(~g)^((~n) - 1)*((~g)*(~x))^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~b)*(~d)*((~m) + (~n)*((~p) + (~q) + 1) + 1)) - (~g)^(~n)⨸((~b)*(~d)*((~m) + (~n)*((~p) + (~q) + 1) + 1))* ∫(((~g)*(~x))^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~a)*(~f)* (~c)*((~m) - (~n) + 1) + ((~a)*(~f)*(~d)*((~m) + (~n)*(~q) + 1) + (~b)*((~f)*(~c)*((~m) + (~n)*(~p) + 1) - (~e)*(~d)*((~m) + (~n)*((~p) + (~q) + 1) + 1)))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_17", +@rule ∫(((~!g)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~q), (~x)) && + igt((~n), 0) && + lt((~m), -1) ? +(~e)*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)*(~c)* (~g)*((~m) + 1)) + 1⨸((~a)*(~c)*(~g)^(~n)*((~m) + 1))*∫(((~g)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~a)*(~f)*(~c)*((~m) + 1) - (~e)*((~b)*(~c) + (~a)*(~d))*((~m) + (~n) + 1) - (~e)*(~n)*((~b)*(~c)*(~p) + (~a)*(~d)*(~q)) - (~b)*(~e)*(~d)*((~m) + (~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_18", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^ (~p)*((~e) + (~!f)*(~x)^(~n))/((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + igt((~n), 0) ? +∫(ext_expand(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~e) + (~f)*(~x)^(~n))⨸((~c) + (~d)*(~x)^(~n)), (~x)), (~x)) : nothing) + +("1_1_3_6_19", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~q), (~x)) && + igt((~n), 0) ? +(~e)*∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) + (~f)⨸(~e)^(~n)*∫(((~g)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_6_20", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~q), (~x)) && + igt((~n), 0) && + igt((~r), 0) ? +(~e)*∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^((~r) - 1), (~x)) + (~f)⨸(~e)^(~n)* ∫(((~g)*(~x))^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^((~r) - 1), (~x)) : nothing) + +("1_1_3_6_21", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~r), (~x)) && + ilt((~n), 0) && + ext_isinteger((~m)) ? +-int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)*((~e) + (~f)*(~x)^(-(~n)))^(~r)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_6_21") : nothing) + +("1_1_3_6_22", +@rule ∫(((~!g)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~q), (~r), (~x)) && + ilt((~n), 0) && + isfraction((~m)) ? +-ext_den((~m))⨸(~g)* int_and_subst(((~a) + (~b)*(~g)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~p)*((~c) + (~d)*(~g)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^ (~q)*((~e) + (~f)*(~g)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~r)⨸(~x)^(ext_den((~m))*((~m) + 1) + 1), (~x), (~x), 1⨸((~g)*(~x))^(1⨸ext_den((~m))), "1_1_3_6_22") : nothing) + +("1_1_3_6_23", +@rule ∫(((~!g)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~q), (~r), (~x)) && + ilt((~n), 0) && + !(isrational((~m))) ? +-((~g)*(~x))^(~m)*((~x)^(-1))^(~m)* int_and_subst(((~a) + (~b)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)*((~e) + (~f)*(~x)^(-(~n)))^(~r)⨸ (~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "1_1_3_6_23") : nothing) + +("1_1_3_6_24", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~r), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*(~x)^(ext_den((~n))*(~n)))^(~p)*((~c) + (~d)*(~x)^(ext_den((~n))*(~n)))^ (~q)*((~e) + (~f)*(~x)^(ext_den((~n))*(~n)))^(~r), (~x), (~x), (~x)^(1⨸ext_den((~n))), "1_1_3_6_24") : nothing) + +("1_1_3_6_25", +@rule ∫(((~g)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~q), (~r), (~x)) && + isfraction((~n)) ? +(~g)^intpart((~m))*((~g)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_26", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q)*((~e) + (~!f)*(~x)^(~n))^ (~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger(simplify((~n)/((~m) + 1))) ? +1⨸((~m) + 1)* int_and_subst(((~a) + (~b)*(~x)^simplify((~n)⨸((~m) + 1)))^ (~p)*((~c) + (~d)*(~x)^simplify((~n)⨸((~m) + 1)))^ (~q)*((~e) + (~f)*(~x)^simplify((~n)⨸((~m) + 1)))^(~r), (~x), (~x), (~x)^((~m) + 1), "1_1_3_6_26") : nothing) + +("1_1_3_6_27", +@rule ∫(((~g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger(simplify((~n)/((~m) + 1))) ? +(~g)^intpart((~m))*((~g)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_28", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + lt((~p), -1) && + gt((~q), 0) && + !( + eq((~q), 1) && + simpler((~b)*(~c) - (~a)*(~d), (~b)*(~e) - (~a)*(~f)) + ) ? +-((~b)*(~e) - (~a)*(~f))*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~a)*(~b)*(~g)*(~n)*((~p) + 1)) + 1⨸((~a)*(~b)*(~n)*((~p) + 1))* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*((~b)*(~e)*(~n)*((~p) + 1) + ((~b)*(~e) - (~a)*(~f))*((~m) + 1)) + (~d)*((~b)*(~e)*(~n)*((~p) + 1) + ((~b)*(~e) - (~a)*(~f))*((~m) + (~n)*(~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_29", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~q), (~x)) && + lt((~p), -1) ? +-((~b)*(~e) - (~a)*(~f))*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~q) + 1)⨸((~a)*(~g)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1)) + 1⨸((~a)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1))* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^(~q)* simp((~c)*((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~e)*(~n)*((~b)*(~c) - (~a)*(~d))*((~p) + 1) + (~d)*((~b)*(~e) - (~a)*(~f))*((~m) + (~n)*((~p) + (~q) + 2) + 1)*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_30", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + gt((~q), 0) && + !( + eq((~q), 1) && + simpler((~e) + (~f)*(~x)^(~n), (~c) + (~d)*(~x)^(~n)) + ) ? +(~f)*((~g)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^ (~q)⨸((~b)*(~g)*((~m) + (~n)*((~p) + (~q) + 1) + 1)) + 1⨸((~b)*((~m) + (~n)*((~p) + (~q) + 1) + 1))* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^((~q) - 1)* simp((~c)*(((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~b)*(~e)*(~n)*((~p) + (~q) + 1)) + ((~d)*((~b)*(~e) - (~a)*(~f))*((~m) + 1) + (~f)*(~n)*(~q)*((~b)*(~c) - (~a)*(~d)) + (~b)*(~e)*(~d)*(~n)*((~p) + (~q) + 1))*(~x)^(~n), (~x)), (~x)) : nothing) + +("1_1_3_6_31", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^ (~p)*((~e) + (~!f)*(~x)^(~n))/((~c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) ? +∫(ext_expand(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~e) + (~f)*(~x)^(~n))⨸((~c) + (~d)*(~x)^(~n)), (~x)), (~x)) : nothing) + +("1_1_3_6_32", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*((~c) + (~!d)*(~x)^(~n))^ (~q)*((~e) + (~!f)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~x)) ? +(~e)*∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) + (~f)*((~g)*(~x))^(~m)⨸(~x)^(~m)*∫((~x)^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_3_6_33", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^ (~!q)*((~e) + (~!f)*(~x)^(~!n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~r), (~x)) && + eq((~mn), -(~n)) && + ext_isinteger((~q)) ? +∫((~x)^((~m) - (~n)*(~q))*((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_34", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^ (~!q)*((~e) + (~!f)*(~x)^(~!n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~x)) && + eq((~mn), -(~n)) && + ext_isinteger((~p)) && + ext_isinteger((~r)) ? +∫((~x)^((~m) + (~n)*((~p) + (~r)))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^ (~q)*((~f) + (~e)*(~x)^(-(~n)))^(~r), (~x)) : nothing) + +("1_1_3_6_35", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^ (~q)*((~e) + (~!f)*(~x)^(~!n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~mn), -(~n)) && + !(ext_isinteger((~q))) ? +(~x)^((~n)*fracpart((~q)))*((~c) + (~d)*(~x)^(-(~n)))^fracpart((~q))⨸((~d) + (~c)*(~x)^(~n))^ fracpart((~q))* ∫((~x)^((~m) - (~n)*(~q))*((~a) + (~b)*(~x)^(~n))^(~p)*((~d) + (~c)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_36", +@rule ∫(((~g)*(~x))^(~m)*((~a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!mn))^ (~!q)*((~e) + (~!f)*(~x)^(~!n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~mn), -(~n)) ? +(~g)^intpart((~m))*((~g)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(-(~n)))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)) : nothing) + +# ("1_1_3_6_37", +# @rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e) + (~!f)*(~x)^(~n))^(~!r),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x)] : nothing) + +("1_1_3_6_38", +@rule ∫((~u)^(~!m)*((~!a) + (~!b)*(~v)^(~n))^(~!p)*((~!c) + (~!d)*(~v)^(~n))^ (~!q)*((~e) + (~!f)*(~v)^(~n))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) && + linear_pair((~u), (~v), (~x)) ? +(~u)^(~m)⨸(ext_coeff((~v), (~x), 1)*(~v)^(~m))* int_and_subst((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e) + (~f)*(~x)^(~n))^(~r), (~x), (~x), (~v), "1_1_3_6_38") : nothing) + +("1_1_3_6_39", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e1) + (~!f1)*(~x)^(~!n2))^(~!r)*((~e2) + (~!f2)*(~x)^(~!n2))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e1), (~f1), (~e2), (~f2), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~n2), (~n)/2) && + eq((~e2)*(~f1) + (~e1)*(~f2), 0) && + ( + ext_isinteger((~r)) || + gt((~e1), 0) && + gt((~e2), 0) + ) ? +∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e1)*(~e2) + (~f1)*(~f2)*(~x)^(~n))^(~r), (~x)) : nothing) + +("1_1_3_6_40", +@rule ∫(((~!g)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^ (~!q)*((~e1) + (~!f1)*(~x)^(~!n2))^(~!r)*((~e2) + (~!f2)*(~x)^(~!n2))^(~!r),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e1), (~f1), (~e2), (~f2), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~n2), (~n)/2) && + eq((~e2)*(~f1) + (~e1)*(~f2), 0) ? +((~e1) + (~f1)*(~x)^((~n)⨸2))^ fracpart((~r))*((~e2) + (~f2)*(~x)^((~n)⨸2))^fracpart((~r))⨸((~e1)*(~e2) + (~f1)*(~f2)*(~x)^(~n))^ fracpart((~r))* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q)*((~e1)*(~e2) + (~f1)*(~f2)*(~x)^(~n))^(~r), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.7 P(x) (a+b x^n)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.7 P(x) (a+b x^n)^p.jl new file mode 100644 index 0000000..7820e67 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.7 P(x) (a+b x^n)^p.jl @@ -0,0 +1,585 @@ +f11372(pq, x) = (@rule (~u)*x^(~m::ext_isinteger) => 1)(pq)!==nothing + +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.7 P(x) (a+b x^n)^p *) +#(* Int[Pq_*(a_+b_.*x_)^p_,x_Symbol] := With[{n=Denominator[p]}, n/b*Subst[Int[x^(n*p+n-1)*ReplaceAll[Pq,x->-a/b+x^n/b],x],x,(a+b*x)^( 1/n)]] /; FreeQ[{a,b},x] && PolyQ[Pq,x] && FractionQ[p] *) +("1_1_3_7_1", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~n), (~x)) && + poly((~Pq), (~x)) && + ( + igt((~p), 0) || + eq((~n), 1) + ) ? +∫(ext_expand((~Pq)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + + +("1_1_3_7_2", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~n), (~p), (~x)) && + poly((~Pq), (~x)) && + eq(ext_coeff((~Pq), (~x), 0), 0) && + !(f11372(~Pq, ~x)) ? +∫((~x)*poly_quotient((~Pq), (~x), (~x))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + + +("1_1_3_7_3", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) && + ge(exponent_of((~Pq), (~x)), (~n)) && + eq(poly_remainder((~Pq), (~a) + (~b)*(~x)^(~n), (~x)), 0) ? +∫(poly_quotient((~Pq), (~a) + (~b)*(~x)^(~n), (~x))*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + + +# Rule skipped because of "Module" +# Int[Pq_*(a_ + b_.*x_^n_.)^p_, x_Symbol] := Module[{q = Expon[Pq, x], i}, (a + b*x^n)^p* Sum[Coeff[Pq, x, i]*x^(i + 1)/(n*p + i + 1), {i, 0, q}] + a*n*p* Int[(a + b*x^n)^(p - 1)* Sum[Coeff[Pq, x, i]*x^i/(n*p + i + 1), {i, 0, q}], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && IGtQ[(n - 1)/2, 0] && GtQ[p, 0] + +# Rule skipped because of "Module" +# Int[Pq_*(a_ + b_.*x_^n_)^p_, x_Symbol] := Module[{q = Expon[Pq, x], i}, (a*Coeff[Pq, x, q] - b*x*ExpandToSum[Pq - Coeff[Pq, x, q]*x^q, x])*(a + b*x^n)^(p + 1)/(a*b*n*(p + 1)) + 1/(a*n*(p + 1))* Int[Sum[(n*(p + 1) + i + 1)*Coeff[Pq, x, i]*x^i, {i, 0, q - 1}]*(a + b*x^n)^(p + 1), x] /; q == n - 1] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && IGtQ[n, 0] && LtQ[p, -1] + +("1_1_3_7_6", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) && + lt((~p), -1) && + lt(exponent_of((~Pq), (~x)), (~n) - 1) ? +-(~x)*(~Pq)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~n)*((~p) + 1)) + 1⨸((~a)*(~n)*((~p) + 1))* ∫(expand_to_sum((~n)*((~p) + 1)*(~Pq) + Symbolics.derivative((~x)*(~Pq), (~x)), (~x))*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + + +("1_1_3_7_7", +@rule ∫((~P4)/((~a) + (~!b)*(~x)^4)^(3//2),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P4), (~x), 4) && + eq(ext_coeff((~P4), (~x), 2), 0) ? +let + d = ext_coeff((~P4), (~x), 0) + e = ext_coeff((~P4), (~x), 1) + f = ext_coeff((~P4), (~x), 3) + g = ext_coeff((~P4), (~x), 4) + + eq((~b)*d + (~a)*g, 0) ? + -((~a)*f + 2*(~a)*g*(~x) - (~b)*e*(~x)^2)⨸(2*(~a)*(~b)*sqrt((~a) + (~b)*(~x)^4)) : nothing +end : nothing) + +("1_1_3_7_8", +@rule ∫((~P6)/((~a) + (~!b)*(~x)^4)^(3//2),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P6), (~x), 6) && + eq(ext_coeff((~P6), (~x), 1), 0) && + eq(ext_coeff((~P6), (~x), 5), 0) ? +let + d = ext_coeff((~P6), (~x), 0) + e = ext_coeff((~P6), (~x), 2) + f = ext_coeff((~P6), (~x), 3) + g = ext_coeff((~P6), (~x), 4) + h = ext_coeff((~P6), (~x), 6) + + eq((~b)*e - 3*(~a)*h, 0) && + eq((~b)*d + (~a)*g, 0) ? + -((~a)*f - 2*(~b)*d*(~x) - 2*(~a)*h*(~x)^3)⨸(2*(~a)*(~b)*sqrt((~a) + (~b)*(~x)^4)) : nothing +end : nothing) + +# Rule skipped because of "Module" +# Int[Pq_*(a_ + b_.*x_^n_.)^p_, x_Symbol] := With[{q = Expon[Pq, x]}, Module[{Q = PolynomialQuotient[b^(Floor[(q - 1)/n] + 1)*Pq, a + b*x^n, x], R = PolynomialRemainder[b^(Floor[(q - 1)/n] + 1)*Pq, a + b*x^n, x]}, -x* R*(a + b*x^n)^(p + 1)/(a*n*(p + 1)* b^(Floor[(q - 1)/n] + 1)) + 1/(a*n*(p + 1)*b^(Floor[(q - 1)/n] + 1))* Int[(a + b*x^n)^(p + 1)* ExpandToSum[a*n*(p + 1)*Q + n*(p + 1)*R + D[x*R, x], x], x]] /; GeQ[q, n]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && IGtQ[n, 0] && LtQ[p, -1] +("1_1_3_7_10", +@rule ∫(((~A) + (~!B)*(~x))/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~A), (~B), (~x)) && + eq((~a)*(~B)^3 - (~b)*(~A)^3, 0) ? +(~B)^3⨸(~b)*∫(1⨸((~A)^2 - (~A)*(~B)*(~x) + (~B)^2*(~x)^2), (~x)) : nothing) + + +("1_1_3_7_11", +@rule ∫(((~A) + (~!B)*(~x))/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~A), (~B), (~x)) && + !eq((~a)*(~B)^3 - (~b)*(~A)^3, 0) && + pos((~a)/(~b)) ? +let + r = ext_num(rt((~a)⨸(~b), 3)) + s = ext_den(rt((~a)⨸(~b), 3)) + + -r*((~B)*r - (~A)*s)⨸(3*(~a)*s)*∫(1⨸(r + s*(~x)), (~x)) + r⨸(3*(~a)*s)* ∫((r*((~B)*r + 2*(~A)*s) + s*((~B)*r - (~A)*s)*(~x))⨸(r^2 - r*s*(~x) + s^2*(~x)^2), (~x)) +end : nothing) + +("1_1_3_7_12", +@rule ∫(((~A) + (~!B)*(~x))/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~A), (~B), (~x)) && + !eq((~a)*(~B)^3 - (~b)*(~A)^3, 0) && + neg((~a)/(~b)) ? +let + r = ext_num(rt(-(~a)⨸(~b), 3)) + s = ext_den(rt(-(~a)⨸(~b), 3)) + + r*((~B)*r + (~A)*s)⨸(3*(~a)*s)*∫(1⨸(r - s*(~x)), (~x)) - r⨸(3*(~a)*s)* ∫((r*((~B)*r - 2*(~A)*s) - s*((~B)*r + (~A)*s)*(~x))⨸(r^2 + r*s*(~x) + s^2*(~x)^2), (~x)) +end : nothing) + +("1_1_3_7_13", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + + eq(B^2 - A*C, 0) && + eq((~b)*B^3 + (~a)*C^3, 0) ? + -C^2⨸(~b)*∫(1⨸(B - C*(~x)), (~x)) : nothing +end : nothing) + +("1_1_3_7_14", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = (~a)⟰(1⨸3)⨸(~b)⟰(1⨸3) + + eq(A*(~b)⟰(2/3) - (~a)⟰(1/3)*(~b)⟰(1/3)*B - 2*(~a)⟰(2/3)*C, 0) ? + C⨸(~b)*∫(1⨸(q + (~x)), (~x)) + (B + C*q)⨸(~b)* ∫(1⨸(q^2 - q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_15", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = (-(~a))⟰(1⨸3)⨸(-(~b))⟰(1⨸3) + + eq(A*(-(~b))⟰(2/3) - (-(~a))⟰(1/3)*(-(~b))⟰(1/3)*B - 2*(-(~a))⟰(2/3)*C, 0) ? + C⨸(~b)*∫(1⨸(q + (~x)), (~x)) + (B + C*q)⨸(~b)* ∫(1⨸(q^2 - q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_16", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = (-(~a))⟰(1⨸3)⨸(~b)⟰(1⨸3) + + eq(A*(~b)⟰(2/3) + (-(~a))⟰(1/3)*(~b)⟰(1/3)*B - 2*(-(~a))⟰(2/3)*C, 0) ? + -C⨸(~b)* ∫(1⨸(q - (~x)), (~x)) + (B - C*q)⨸(~b)*∫(1⨸(q^2 + q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_17", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = (~a)⟰(1⨸3)⨸(-(~b))⟰(1⨸3) + + eq(A*(-(~b))⟰(2/3) + (~a)⟰(1/3)*(-(~b))⟰(1/3)*B - 2*(~a)⟰(2/3)*C, 0) ? + -C⨸(~b)* ∫(1⨸(q - (~x)), (~x)) + (B - C*q)⨸(~b)*∫(1⨸(q^2 + q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_18", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = ((~a)⨸(~b))⟰(1⨸3) + + eq(A - ((~a)/(~b))⟰(1/3)*B - 2*((~a)/(~b))⟰(2/3)*C, 0) ? + C⨸(~b)*∫(1⨸(q + (~x)), (~x)) + (B + C*q)⨸(~b)* ∫(1⨸(q^2 - q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_19", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = rt((~a)⨸(~b), 3) + + eq(A - rt((~a)/(~b), 3)*B - 2*rt((~a)/(~b), 3)^2*C, 0) ? + C⨸(~b)*∫(1⨸(q + (~x)), (~x)) + (B + C*q)⨸(~b)* ∫(1⨸(q^2 - q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_20", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = (-(~a)⨸(~b))⟰(1⨸3) + + eq(A + (-(~a)/(~b))⟰(1/3)*B - 2*(-(~a)/(~b))⟰(2/3)*C, 0) ? + -C⨸(~b)*∫(1⨸(q - (~x)), (~x)) + (B - C*q)⨸(~b)* ∫(1⨸(q^2 + q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_21", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = rt(-(~a)⨸(~b), 3) + + eq(A + rt(-(~a)/(~b), 3)*B - 2*rt(-(~a)/(~b), 3)^2*C, 0) ? + -C⨸(~b)*∫(1⨸(q - (~x)), (~x)) + (B - C*q)⨸(~b)* ∫(1⨸(q^2 + q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_22", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + + eq((~a)*B^3 - (~b)*A^3, 0) || + !(isrational((~a)/(~b))) ? + ∫((A + B*(~x))⨸((~a) + (~b)*(~x)^3), (~x)) + C*∫((~x)^2⨸((~a) + (~b)*(~x)^3), (~x)) : nothing +end : nothing) + +("1_1_3_7_23", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = ((~a)⨸(~b))⟰(1⨸3) + + eq(A - B*((~a)/(~b))⟰(1/3) + C*((~a)/(~b))⟰(2/3), 0) ? + q^2⨸(~a)*∫((A + C*q*(~x))⨸(q^2 - q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_24", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = (-(~a)⨸(~b))⟰(1⨸3) + + eq(A + B*(-(~a)/(~b))⟰(1/3) + C*(-(~a)/(~b))⟰(2/3), 0) ? + q⨸(~a)*∫((A*q + (A + B*q)*(~x))⨸(q^2 + q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_25", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) && + gt((~a)/(~b), 0) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = ((~a)⨸(~b))⟰(1⨸3) + + !eq((~a)*B^3 - (~b)*A^3, 0) && + !eq(A - B*q + C*q^2, 0) ? + q*(A - B*q + C*q^2)⨸(3*(~a))*∫(1⨸(q + (~x)), (~x)) + q⨸(3*(~a))*∫((q*(2*A + B*q - C*q^2) - (A - B*q - 2*C*q^2)* (~x))⨸(q^2 - q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_26", +@rule ∫((~P2)/((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P2), (~x), 2) && + lt((~a)/(~b), 0) ? +let + A = ext_coeff((~P2), (~x), 0) + B = ext_coeff((~P2), (~x), 1) + C = ext_coeff((~P2), (~x), 2) + q = (-(~a)⨸(~b))⟰(1⨸3) + + !eq((~a)*B^3 - (~b)*A^3, 0) && + !eq(A + B*q + C*q^2, 0) ? + q*(A + B*q + C*q^2)⨸(3*(~a))*∫(1⨸(q - (~x)), (~x)) + q⨸(3*(~a))*∫((q*(2*A - B*q - C*q^2) + (A + B*q - 2*C*q^2)* (~x))⨸(q^2 + q*(~x) + (~x)^2), (~x)) : nothing +end : nothing) + +("1_1_3_7_27", +@rule ∫((~Pq)/((~a) + (~!b)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~Pq), (~x)) && + igt((~n)/2, 0) && + exponent_of((~Pq), (~x)) < (~n) ? +let + v = sum([(~x)^iii*(ext_coeff((~Pq), (~x), iii) + ext_coeff((~Pq), (~x), (~n)⨸2 + iii)*(~x)^((~n)⨸2))⨸((~a) + (~b)*(~x)^(~n)) for iii in ( 0):( (~n)⨸2 - 1)]) + + issum(v) ? + ∫(v, (~x)) : nothing +end : nothing) + +("1_1_3_7_28", +@rule ∫(((~c) + (~!d)*(~x))/sqrt((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos((~a)) && + eq((~b)*(~c)^3 - 2*(5 - 3*sqrt(3))*(~a)*(~d)^3, 0) ? +let + r = ext_num(simplify((1 - sqrt(3))*(~d)⨸(~c))) + s = ext_den(simplify((1 - sqrt(3))*(~d)⨸(~c))) + + 2*(~d)*s^3*sqrt((~a) + (~b)*(~x)^3)⨸((~a)*r^2*((1 + sqrt(3))*s + r*(~x))) - 3^(1⨸4)*sqrt(2 - sqrt(3))*(~d)*s*(s + r*(~x))* sqrt((s^2 - r*s*(~x) + r^2*(~x)^2)⨸((1 + sqrt(3))*s + r*(~x))^2)⨸ (r^2*sqrt((~a) + (~b)*(~x)^3)* sqrt(s*(s + r*(~x))⨸((1 + sqrt(3))*s + r*(~x))^2))* elliptic_e( asin(((1 - sqrt(3))*s + r*(~x))⨸((1 + sqrt(3))*s + r*(~x))), -7 - 4*sqrt(3)) +end : nothing) + +("1_1_3_7_29", +@rule ∫(((~c) + (~!d)*(~x))/sqrt((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + pos((~a)) && + !eq((~b)*(~c)^3 - 2*(5 - 3*sqrt(3))*(~a)*(~d)^3, 0) ? +let + r = ext_num(rt((~b)⨸(~a), 3)) + s = ext_den(rt((~b)⨸(~a), 3)) + + ((~c)*r - (1 - sqrt(3))*(~d)*s)⨸r*∫(1⨸sqrt((~a) + (~b)*(~x)^3), (~x)) + (~d)⨸r*∫(((1 - sqrt(3))*s + r*(~x))⨸sqrt((~a) + (~b)*(~x)^3), (~x)) +end : nothing) + +("1_1_3_7_30", +@rule ∫(((~c) + (~!d)*(~x))/sqrt((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~a)) && + eq((~b)*(~c)^3 - 2*(5 + 3*sqrt(3))*(~a)*(~d)^3, 0) ? +let + r = ext_num(simplify((1 + sqrt(3))*(~d)⨸(~c))) + s = ext_den(simplify((1 + sqrt(3))*(~d)⨸(~c))) + + 2*(~d)*s^3*sqrt((~a) + (~b)*(~x)^3)⨸((~a)*r^2*((1 - sqrt(3))*s + r*(~x))) + 3^(1⨸4)*sqrt(2 + sqrt(3))*(~d)*s*(s + r*(~x))* sqrt((s^2 - r*s*(~x) + r^2*(~x)^2)⨸((1 - sqrt(3))*s + r*(~x))^2)⨸ (r^2*sqrt((~a) + (~b)*(~x)^3)* sqrt(-s*(s + r*(~x))⨸((1 - sqrt(3))*s + r*(~x))^2))* elliptic_e( asin(((1 + sqrt(3))*s + r*(~x))⨸((1 - sqrt(3))*s + r*(~x))), -7 + 4*sqrt(3)) +end : nothing) + +("1_1_3_7_31", +@rule ∫(((~c) + (~!d)*(~x))/sqrt((~a) + (~!b)*(~x)^3),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + neg((~a)) && + !eq((~b)*(~c)^3 - 2*(5 + 3*sqrt(3))*(~a)*(~d)^3, 0) ? +let + r = ext_num(rt((~b)⨸(~a), 3)) + s = ext_den(rt((~b)⨸(~a), 3)) + + ((~c)*r - (1 + sqrt(3))*(~d)*s)⨸r*∫(1⨸sqrt((~a) + (~b)*(~x)^3), (~x)) + (~d)⨸r*∫(((1 + sqrt(3))*s + r*(~x))⨸sqrt((~a) + (~b)*(~x)^3), (~x)) +end : nothing) + +("1_1_3_7_32", +@rule ∫(((~c) + (~!d)*(~x)^4)/sqrt((~a) + (~!b)*(~x)^6),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq(2*rt((~b)/(~a), 3)^2*(~c) - (1 - sqrt(3))*(~d), 0) ? +let + r = ext_num(rt((~b)⨸(~a), 3)) + s = ext_den(rt((~b)⨸(~a), 3)) + + (1 + sqrt(3))*(~d)*s^3*(~x)* sqrt((~a) + (~b)*(~x)^6)⨸(2*(~a)*r^2*(s + (1 + sqrt(3))*r*(~x)^2)) - 3^(1⨸4)*(~d)*s*(~x)*(s + r*(~x)^2)* sqrt((s^2 - r*s*(~x)^2 + r^2*(~x)^4)⨸(s + (1 + sqrt(3))*r*(~x)^2)^2)⨸ (2*r^2* sqrt((r*(~x)^2*(s + r*(~x)^2))⨸(s + (1 + sqrt(3))*r*(~x)^2)^2)* sqrt((~a) + (~b)*(~x)^6))* elliptic_e( acos((s + (1 - sqrt(3))*r*(~x)^2)⨸(s + (1 + sqrt(3))*r* (~x)^2)), (2 + sqrt(3))⨸4) +end : nothing) + +("1_1_3_7_33", +@rule ∫(((~c) + (~!d)*(~x)^4)/sqrt((~a) + (~!b)*(~x)^6),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq(2*rt((~b)/(~a), 3)^2*(~c) - (1 - sqrt(3))*(~d), 0) ? +let + q = rt((~b)⨸(~a), 3) + + (2*(~c)*q^2 - (1 - sqrt(3))*(~d))⨸(2*q^2)*∫(1⨸sqrt((~a) + (~b)*(~x)^6), (~x)) + (~d)⨸(2*q^2)*∫((1 - sqrt(3) + 2*q^2*(~x)^4)⨸sqrt((~a) + (~b)*(~x)^6), (~x)) +end : nothing) + +("1_1_3_7_34", +@rule ∫(((~c) + (~!d)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^8),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c)^4 - (~a)*(~d)^4, 0) ? +-(~c)*(~d)*(~x)^3*sqrt(-((~c) - (~d)*(~x)^2)^2⨸((~c)*(~d)*(~x)^2))* sqrt(-(~d)^2*((~a) + (~b)*(~x)^8)⨸((~b)*(~c)^2*(~x)^4))⨸(sqrt(2 + sqrt(2))*((~c) - (~d)*(~x)^2)* sqrt((~a) + (~b)*(~x)^8))* elliptic_f( asin(1⨸2* sqrt((sqrt(2)*(~c)^2 + 2*(~c)*(~d)*(~x)^2 + sqrt(2)*(~d)^2*(~x)^4)⨸((~c)*(~d)* (~x)^2))), -2*(1 - sqrt(2))) : nothing) + + +("1_1_3_7_35", +@rule ∫(((~c) + (~!d)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^8),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c)^4 - (~a)*(~d)^4, 0) ? +((~d) + rt((~b)⨸(~a), 4)*(~c))⨸(2*rt((~b)⨸(~a), 4))* ∫((1 + rt((~b)⨸(~a), 4)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^8), (~x)) - ((~d) - rt((~b)⨸(~a), 4)*(~c))⨸(2*rt((~b)⨸(~a), 4))* ∫((1 - rt((~b)⨸(~a), 4)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^8), (~x)) : nothing) + + +("1_1_3_7_36", +@rule ∫((~Pq)/((~x)*sqrt((~a) + (~!b)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) && + !eq(ext_coeff((~Pq), (~x), 0), 0) ? +ext_coeff((~Pq), (~x), 0)*∫(1⨸((~x)*sqrt((~a) + (~b)*(~x)^(~n))), (~x)) + ∫(expand_to_sum(((~Pq) - ext_coeff((~Pq), (~x), 0))⨸(~x), (~x))⨸sqrt((~a) + (~b)*(~x)^(~n)), (~x)) : nothing) + + +# Rule skipped because of "Module" +# Int[Pq_*(a_ + b_.*x_^n_)^p_, x_Symbol] := Module[{q = Expon[Pq, x], j, k}, Int[ Sum[x^j*Sum[ Coeff[Pq, x, j + k*n/2]*x^(k*n/2), {k, 0, 2*(q - j)/n + 1}]*(a + b*x^n)^p, {j, 0, n/2 - 1}], x]] /; FreeQ[{a, b, p}, x] && PolyQ[Pq, x] && IGtQ[n/2, 0] && Not[PolyQ[Pq, x^(n/2)]] +("1_1_3_7_38", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) && + exponent_of((~Pq), (~x)) == (~n) - 1 ? +ext_coeff((~Pq), (~x), (~n) - 1)*∫((~x)^((~n) - 1)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) + ∫( expand_to_sum((~Pq) - ext_coeff((~Pq), (~x), (~n) - 1)*(~x)^((~n) - 1), (~x))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + + +("1_1_3_7_39", +@rule ∫((~Pq)/((~a) + (~!b)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~Pq), (~x)) && + ext_isinteger((~n)) ? +∫(ext_expand((~Pq)⨸((~a) + (~b)*(~x)^(~n)), (~x)), (~x)) : nothing) + + +("1_1_3_7_40", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) ? +let + q = exponent_of((~Pq), (~x)) + PQ = ext_coeff((~Pq), (~x), q) + + !eq(q + (~n)*(~p) + 1, 0) && + q - (~n) >= 0 && + ( + ext_isinteger(2*(~p)) || + ext_isinteger((~p) + (q + 1)/(2*(~n))) + ) ? + PQ*(~x)^(q - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(q + (~n)*(~p) + 1)) + 1⨸((~b)*(q + (~n)*(~p) + 1))* ∫(expand_to_sum( (~b)*(q + (~n)*(~p) + 1)*((~Pq) - PQ*(~x)^q) - (~a)*PQ*(q - (~n) + 1)*(~x)^(q - (~n)), (~x))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing +end : nothing) + +("1_1_3_7_41", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + poly((~Pq), (~x)) && + ilt((~n), 0) ? +let + q = exponent_of((~Pq), (~x)) + + -int_and_subst(expand_to_sum((~x)^q*substitute((~Pq), Dict( (~x) => (~x)^(-1))), (~x))*((~a) + (~b)*(~x)^(-(~n)))^(~p)⨸(~x)^(q + 2), (~x), (~x), 1⨸(~x), "1_1_3_7_41") +end : nothing) + +("1_1_3_7_42", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + poly((~Pq), (~x)) && + isfraction((~n)) ? +let + g = ext_den((~n)) + + g*int_and_subst((~x)^(g - 1)*substitute((~Pq), Dict( (~x) => (~x)^g))*((~a) + (~b)*(~x)^(g*(~n)))^(~p), (~x), (~x), (~x)^(1⨸g), "1_1_3_7_42") +end : nothing) + +("1_1_3_7_43", +@rule ∫(((~A) + (~!B)*(~x)^(~!m))*((~a) + (~!b)*(~x)^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~A), (~B), (~m), (~n), (~p), (~x)) && + eq((~m) - (~n) + 1, 0) ? +(~A)*∫(((~a) + (~b)*(~x)^(~n))^(~p), (~x)) + (~B)*∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + + +("1_1_3_7_44", +@rule ∫((~P3)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~n), (~x)) && + poly((~P3), (~x)^((~n)/2), 3) && + ilt((~p), -1) ? +let + A = ext_coeff((~P3), (~x)^((~n)⨸2), 0) + B = ext_coeff((~P3), (~x)^((~n)⨸2), 1) + C = ext_coeff((~P3), (~x)^((~n)⨸2), 2) + D = ext_coeff((~P3), (~x)^((~n)⨸2), 3) + + -((~x)*((~b)*A - (~a)*C + ((~b)*B - (~a)*D)*(~x)^((~n)⨸2))*((~a) + (~b)*(~x)^(~n))^((~p) + 1))⨸((~a)*(~b)* (~n)*((~p) + 1)) - 1⨸(2*(~a)*(~b)*(~n)*((~p) + 1))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)* simp(2*(~a)*C - 2*(~b)*A*((~n)*((~p) + 1) + 1) + ((~a)*D*((~n) + 2) - (~b)*B*((~n)*(2*(~p) + 3) + 2))*(~x)^((~n)⨸2), (~x)), (~x)) +end : nothing) + +("1_1_3_7_45", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~n), (~p), (~x)) && + ( + poly((~Pq), (~x)) || + poly((~Pq), (~x)^(~n)) + ) ? +∫(ext_expand((~Pq)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + + +("1_1_3_7_46", +@rule ∫((~Pq)*((~a) + (~!b)*(~v)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~n), (~p), (~x)) && + linear((~v), (~x)) && + poly((~Pq), (~v)^(~n)) ? +1⨸ext_coeff((~v), (~x), 1)* int_and_subst(substitute((~v), Dict( (~Pq) => (~x)))*((~a) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~v), "prova_1") : nothing) + +("1_1_3_7_47", +@rule ∫((~Pq)*((~a1) + (~!b1)*(~x)^(~!n))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~n), (~p), (~x)) && + poly((~Pq), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + ext_isinteger((~p)) || + gt((~a1), 0) && + gt((~a2), 0) + ) ? +∫((~Pq)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing) + + +("1_1_3_7_48", +@rule ∫((~Pq)*((~a1) + (~!b1)*(~x)^(~!n))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~n), (~p), (~x)) && + poly((~Pq), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + !( + eq((~n), 1) && + linear((~Pq), (~x)) + ) ? +((~a1) + (~b1)*(~x)^(~n))^ fracpart((~p))*((~a2) + (~b2)*(~x)^(~n))^fracpart((~p))⨸((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^ fracpart((~p))* ∫((~Pq)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing) + + +("1_1_3_7_49", +@rule ∫(((~e) + (~!f)*(~x)^(~!n) + (~!g)*(~x)^(~!n2))*((~a) + (~!b)*(~x)^(~!n))^ (~!p)*((~c) + (~!d)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~a)*(~c)*(~f) - (~e)*((~b)*(~c) + (~a)*(~d))*((~n)*((~p) + 1) + 1), 0) && + eq((~a)*(~c)*(~g) - (~b)*(~d)*(~e)*(2*(~n)*((~p) + 1) + 1), 0) ? +(~e)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)) : nothing) + + +("1_1_3_7_50", +@rule ∫(((~e) + (~!g)*(~x)^(~!n2))*((~a) + (~!b)*(~x)^(~!n))^(~!p)*((~c) + (~!d)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~n)*((~p) + 1) + 1, 0) && + eq((~a)*(~c)*(~g) - (~b)*(~d)*(~e)*(2*(~n)*((~p) + 1) + 1), 0) ? +(~e)*(~x)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)) : nothing) + + +("1_1_3_7_51", +@rule ∫(((~A) + (~!B)*(~x)^(~!m))*((~!a) + (~!b)*(~x)^(~n))^(~!p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~A), (~B), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~m) - (~n) + 1, 0) ? +(~A)*∫(((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) + (~B)*∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + + +("1_1_3_7_52", +@rule ∫((~Px)^(~!q)*((~!a) + (~!b)*((~c) + (~!d)*(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~p), (~x)) && + poly((~Px), (~x)) && + ext_isinteger((~q)) && + isfraction((~n)) ? +let + k = ext_den((~n)) + + k⨸(~d)* int_and_subst( ext_simplify( (~x)^(k - 1)*substitute((~Px), Dict( (~x) => (~x)^k⨸(~d) - (~c)⨸(~d)))^(~q)*((~a) + (~b)*(~x)^(k*(~n)))^(~p), (~x)), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸k), "1_1_3_7_52") +end : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.8 P(x) (c x)^m (a+b x^n)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.8 P(x) (c x)^m (a+b x^n)^p.jl new file mode 100644 index 0000000..81d8c2c --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.3 General/1.1.3.8 P(x) (c x)^m (a+b x^n)^p.jl @@ -0,0 +1,299 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.3.8 P(x) (c x)^m (a+b x^n)^p *) +("1_1_3_8_1", +@rule ∫((~x)^(~!m)*((~e) + (~!f)*(~x)^(~!q) + (~!g)*(~x)^(~!r) + (~!h)*(~x)^(~!n))/((~a) + (~!c)*(~x)^(~!n))^(3//2),(~x)) => + !contains_var((~a), (~c), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~q), (~n)/4) && + eq((~r), 3*(~n)/4) && + eq(4*(~m) - (~n) + 4, 0) && + eq((~c)*(~e) + (~a)*(~h), 0) ? +-(2*(~a)*(~g) + 4*(~a)*(~h)*(~x)^((~n)⨸4) - 2*(~c)*(~f)*(~x)^((~n)⨸2))⨸((~a)*(~c)*(~n)*sqrt((~a) + (~c)*(~x)^(~n))) : nothing) + +("1_1_3_8_2", +@rule ∫(((~d)*(~x))^ (~!m)*((~e) + (~!f)*(~x)^(~!q) + (~!g)*(~x)^(~!r) + (~!h)*(~x)^(~!n))/((~a) + (~!c)*(~x)^(~!n))^(3//2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq(4*(~m) - (~n) + 4, 0) && + eq((~q), (~n)/4) && + eq((~r), 3*(~n)/4) && + eq((~c)*(~e) + (~a)*(~h), 0) ? +((~d)*(~x))^(~m)⨸(~x)^(~m)* ∫((~x)^(~m)*((~e) + (~f)*(~x)^((~n)⨸4) + (~g)*(~x)^((3*(~n))⨸4) + (~h)*(~x)^(~n))⨸((~a) + (~c)*(~x)^(~n))^(3⨸2), (~x)) : nothing) + +("1_1_3_8_3", +@rule ∫(((~!c)*(~x))^(~m)*(~Pq)*((~a) + (~!b)*(~x))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + poly((~Pq), (~x)) && + isfraction((~p)) && + ilt((~m), -1) ? +ext_den((~p))⨸(~b)* int_and_subst( (~x)^(ext_den((~p))*(~p) + ext_den((~p)) - 1)*(-(~a)*(~c)⨸(~b) + (~c)*(~x)^ext_den((~p))⨸(~b))^(~m)* substitute((~Pq), Dict( (~x) => -(~a)⨸(~b) + (~x)^ext_den((~p))⨸(~b))), (~x), (~x), ((~a) + (~b)*(~x))^(1⨸ext_den((~p))), "1_1_3_8_3") : nothing) + +# ("1_1_3_8_4", +# @rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && +# !eq((~m), -1) && +# igt(simplify((~n)/((~m) + 1)), 0) && +# poly((~Pq), (~x)^((~m) + 1)) ? +# 1⨸((~m) + 1)* int_and_subst( SubstFor[(~x)^((~m) + 1), (~Pq), (~x)]*((~a) + (~b)*(~x)^simplify((~n)⨸((~m) + 1)))^(~p), (~x), (~x), (~x)^((~m) + 1), "1_1_3_8_4") : nothing) + +("1_1_3_8_5", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + poly((~Pq), (~x)) && + ( + igt((~p), 0) || + eq((~n), 1) + ) ? +∫(ext_expand(((~c)*(~x))^(~m)*(~Pq)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +# ("1_1_3_8_6", +# @rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && +# poly((~Pq), (~x)^(~n)) && +# ext_isinteger(simplify(((~m) + 1)/(~n))) ? +# 1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*SubstFor[(~x)^(~n), (~Pq), (~x)]*((~a) + (~b)*(~x))^(~p), (~x), (~x), (~x)^(~n), "1_1_3_8_6") : nothing) + +("1_1_3_8_7", +@rule ∫(((~c)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + poly((~Pq), (~x)^(~n)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*(~Pq)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_3_8_8", +@rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + poly((~Pq), (~x)) && + eq((~m) - (~n) + 1, 0) && + lt((~p), -1) ? +(~Pq)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - 1⨸((~b)*(~n)*((~p) + 1))*∫(Symbolics.derivative((~Pq), (~x))*((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("1_1_3_8_9", +@rule ∫(((~!d)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~d), (~m), (~n), (~p), (~x)) && + poly((~Pq), (~x)) && + eq(ext_coeff((~Pq), (~x), 0), 0) ? +1⨸(~d)*∫(((~d)*(~x))^((~m) + 1)*poly_quotient((~Pq), (~x), (~x))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +# ("1_1_3_8_10", +# @rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# poly((~Pq), (~x)) && +# igt((~n), 0) && +# gt((~p), 0) && +# lt((~m) + exponent_of((~Pq), (~x)) + 1, 0) ? +# Module[{(~u) = ∫((~x)^(~m)*(~Pq), (~x))}, (~u)*((~a) + (~b)*(~x)^(~n))^(~p) - (~b)*(~n)*(~p)*∫( (~x)^((~m) + (~n))*((~a) + (~b)*(~x)^(~n))^((~p) - 1)*expand_to_sum((~u)⨸(~x)^((~m) + 1), (~x)), (~x))] : nothing) +# +# ("1_1_3_8_11", +# @rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~m), (~x)) && +# poly((~Pq), (~x)) && +# igt(((~n) - 1)/2, 0) && +# gt((~p), 0) ? +# Module[{(~q) = exponent_of((~Pq), (~x)), (~i)}, ((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)* sum([ext_coeff((~Pq), (~x), (~i))*(~x)^((~i) + 1)⨸((~m) + (~n)*(~p) + (~i) + 1) for (~i) in ( 0):( (~q))]) + (~a)*(~n)*(~p)* ∫(((~c)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) - 1)* sum([ext_coeff((~Pq), (~x), (~i))*(~x)^(~i)⨸((~m) + (~n)*(~p) + (~i) + 1) for (~i) in ( 0):( (~q))]), (~x))] : nothing) + +("1_1_3_8_12", +@rule ∫((~x)^2*(~P4)/((~a) + (~!b)*(~x)^4)^(3//2),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~P4), (~x), 4) && + eq(ext_coeff((~P4), (~x), 2), 0) && + eq(ext_coeff((~P4), (~x), 3), 0) && + eq((~b)*ext_coeff((~P4), (~x), 0) - 3*(~a)*ext_coeff((~P4), (~x), 4), 0) ? +-(ext_coeff((~P4), (~x), 1) - 2*ext_coeff((~P4), (~x), 4)*(~x)^3)⨸(2*(~b)*sqrt((~a) + (~b)*(~x)^4)) : nothing) + +# ("1_1_3_8_13", +# @rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# poly((~Pq), (~x)) && +# igt((~n), 0) && +# lt((~p), -1) && +# igt((~m), 0) && +# ge((~m) + exponent_of((~Pq), (~x))], (~n)) ? +# -(~x)* (~R)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~n)*((~p) + 1)* (~b)^(Floor[((~m) + exponent_of((~Pq), (~x))} - 1)⨸(~n)] + 1)) + 1⨸((~a)*(~n)*((~p) + 1)*(~b)^(Floor[((~m) + exponent_of((~Pq), (~x))} - 1)⨸(~n)] + 1))* ∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)* expand_to_sum((~a)*(~n)*((~p) + 1)*(~Q) + (~n)*((~p) + 1)*(~R) + Symbolics.derivative((~x)*(~R), (~x)), (~x)), (~x))] : nothing) +# +# ("1_1_3_8_14", +# @rule ∫((~x)^(~m)*(~Pq)*((~a) + (~!b)*(~x)^(~!n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# poly((~Pq), (~x)) && +# igt((~n), 0) && +# lt((~p), -1) && +# ilt((~m), 0) ? +# -(~x)* (~R)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)^2*(~n)*((~p) + 1)* (~b)^(Floor[(exponent_of((~Pq), (~x))} - 1)⨸(~n)] + 1)) + 1⨸((~a)*(~n)*((~p) + 1)*(~b)^(Floor[(exponent_of((~Pq), (~x))} - 1)⨸(~n)] + 1))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)* expand_to_sum( (~n)*((~p) + 1)*(~x)^(-(~m))*(~Q) + sum([((~n)*((~p) + 1) + (~i) + 1)⨸(~a)*ext_coeff((~R), (~x), (~i))*(~x)^((~i) - (~m)) for (~i) in ( 0):( (~n) - 1)]), (~x)), (~x))] : nothing) + +("1_1_3_8_15", +@rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + poly((~Pq), (~x)^(~n)) && + igt((~n), 0) && + ext_isinteger((~m)) && + gcd((~m) + 1, (~n)) != 1 ? +1⨸gcd((~m) + 1, (~n))* int_and_subst( (~x)^(((~m) + 1)⨸gcd((~m) + 1, (~n)) - 1)* substitute((~Pq), Dict( (~x) => (~x)^(1⨸gcd((~m) + 1, (~n)))))*((~a) + (~b)*(~x)^((~n)⨸gcd((~m) + 1, (~n))))^(~p), (~x), (~x), (~x)^gcd((~m) + 1, (~n)), "1_1_3_8_15") : nothing) + +("1_1_3_8_16", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)/((~a) + (~!b)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + poly((~Pq), (~x)) && + igt((~n)/2, 0) && + exponent_of((~Pq), (~x)) < (~n) ? +∫(sum([((~c)*(~x))^((~m) + iii)*(ext_coeff((~Pq), (~x), iii) + ext_coeff((~Pq), (~x), (~n)⨸2 + iii)*(~x)^((~n)⨸2))⨸((~c)^iii*((~a) + (~b)*(~x)^(~n))) for iii in ( 0):( (~n)⨸2 - 1)]), (~x)) : nothing) + +("1_1_3_8_17", +@rule ∫((~Pq)/((~x)*sqrt((~a) + (~!b)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) && + !eq(ext_coeff((~Pq), (~x), 0), 0) ? +ext_coeff((~Pq), (~x), 0)*∫(1⨸((~x)*sqrt((~a) + (~b)*(~x)^(~n))), (~x)) + ∫(expand_to_sum(((~Pq) - ext_coeff((~Pq), (~x), 0))⨸(~x), (~x))⨸sqrt((~a) + (~b)*(~x)^(~n)), (~x)) : nothing) + +# ("1_1_3_8_18", +# @rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && +# poly((~Pq), (~x)) && +# igt((~n)/2, 0) && +# !(poly((~Pq), (~x)^((~n)/2))) ? +# Module[{(~q) = exponent_of((~Pq), (~x)), (~j), (~k)}, ∫( sum([((~c)*(~x))^((~m) + (~j))⨸(~c)^(~j)* Sum[ext_coeff((~Pq), (~x), (~j) + (~k)*(~n)⨸2)*(~x)^((~k)*(~n)⨸2) for (~k) in ( 0):( 2*((~q) - (~j))⨸(~n) + 1)])*((~a) + (~b)*(~x)^(~n))^(~p), {(~j), 0, (~n)⨸2 - 1}], (~x))] : nothing) + +("1_1_3_8_19", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)/((~a) + (~!b)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + poly((~Pq), (~x)) && + ext_isinteger((~n)) && + !(igt((~m), 0)) ? +∫(ext_expand(((~c)*(~x))^(~m)*(~Pq)⨸((~a) + (~b)*(~x)^(~n)), (~x)), (~x)) : nothing) + +("1_1_3_8_20", +@rule ∫(((~!c)*(~x))^(~m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) && + lt((~m), -1) && + le((~n) - 1, exponent_of((~Pq), (~x))) && + !eq(ext_coeff((~Pq), (~x), 0), 0) ? +ext_coeff((~Pq), (~x), 0)*((~c)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)*((~m) + 1)) + 1⨸(2*(~a)*(~c)*((~m) + 1))* ∫(((~c)*(~x))^((~m) + 1)* expand_to_sum( 2*(~a)*((~m) + 1)*((~Pq) - ext_coeff((~Pq), (~x), 0))⨸(~x) - 2*(~b)*ext_coeff((~Pq), (~x), 0)*((~m) + (~n)*((~p) + 1) + 1)*(~x)^((~n) - 1), (~x))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_3_8_21", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + poly((~Pq), (~x)) && + igt((~n), 0) && + !eq((~m) + exponent_of((~Pq), (~x)) + (~n)*(~p) + 1, 0) && + exponent_of((~Pq), (~x)) - (~n) >= 0 && + ( + ext_isinteger(2*(~p)) || + ext_isinteger((~p) + (exponent_of((~Pq), (~x)) + 1)/(2*(~n))) + ) ? +ext_coeff((~Pq), (~x), exponent_of((~Pq), (~x)))*((~c)*(~x))^((~m) + exponent_of((~Pq), (~x)) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)* (~c)^(exponent_of((~Pq), (~x)) - (~n) + 1)*((~m) + exponent_of((~Pq), (~x)) + (~n)*(~p) + 1)) + 1⨸((~b)*((~m) + exponent_of((~Pq), (~x)) + (~n)*(~p) + 1))* ∫(((~c)*(~x))^(~m)* expand_to_sum( (~b)*((~m) + exponent_of((~Pq), (~x)) + (~n)*(~p) + 1)*((~Pq) - ext_coeff((~Pq), (~x), exponent_of((~Pq), (~x)))*(~x)^exponent_of((~Pq), (~x))) - (~a)*ext_coeff((~Pq), (~x), exponent_of((~Pq), (~x)))*((~m) + exponent_of((~Pq), (~x)) - (~n) + 1)*(~x)^(exponent_of((~Pq), (~x)) - (~n)), (~x))*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_3_8_22", +@rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + poly((~Pq), (~x)) && + ilt((~n), 0) && + ext_isinteger((~m)) ? +-int_and_subst(expand_to_sum((~x)^exponent_of((~Pq), (~x))*substitute((~Pq), Dict( (~x) => (~x)^(-1))), (~x))*((~a) + (~b)*(~x)^(-(~n)))^(~p)⨸(~x)^((~m) + exponent_of((~Pq), (~x)) + 2), (~x), (~x), 1⨸(~x), "1_1_3_8_22") : nothing) + +("1_1_3_8_23", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)) && + ilt((~n), 0) && + isfraction((~m)) ? +-ext_den((~m))⨸(~c)* int_and_subst( expand_to_sum((~x)^(ext_den((~m))*exponent_of((~Pq), (~x)))*substitute((~Pq), Dict( (~x) => (~c)^(-1)*(~x)^(-ext_den((~m))))), (~x))* ((~a) + (~b)*(~c)^(-(~n))*(~x)^(-ext_den((~m))*(~n)))^(~p)⨸(~x)^(ext_den((~m))*((~m) + exponent_of((~Pq), (~x)) + 1) + 1), (~x), (~x), 1⨸((~c)*(~x))^(1⨸ext_den((~m))), "1_1_3_8_23") : nothing) + +("1_1_3_8_24", +@rule ∫(((~!c)*(~x))^(~m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + poly((~Pq), (~x)) && + ilt((~n), 0) && + !(isrational((~m))) ? +-((~c)*(~x))^(~m)*((~x)^(-1))^(~m)* int_and_subst( expand_to_sum((~x)^exponent_of((~Pq), (~x))*substitute((~Pq), Dict( (~x) => (~x)^(-1))), (~x))*((~a) + (~b)*(~x)^(-(~n)))^(~p)⨸ (~x)^((~m) + exponent_of((~Pq), (~x)) + 2), (~x), (~x), 1⨸(~x), "1_1_3_8_24") : nothing) + +("1_1_3_8_25", +@rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~m), (~p), (~x)) && + poly((~Pq), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*substitute((~Pq), Dict( (~x) => (~x)^ext_den((~n))))*((~a) + (~b)*(~x)^(ext_den((~n))*(~n)))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "1_1_3_8_25") : nothing) + +("1_1_3_8_26", +@rule ∫(((~c)*(~x))^(~m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + poly((~Pq), (~x)) && + isfraction((~n)) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*(~Pq)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +# ("1_1_3_8_27", +# @rule ∫((~x)^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && +# poly((~Pq), (~x)^(~n)) && +# ext_isinteger(simplify((~n)/((~m) + 1))) && +# !(ext_isinteger((~n))) ? +# 1⨸((~m) + 1)* int_and_subst( substitute(SubstFor[(~x)^(~n), Dict( (~Pq), (~x)], (~x) => (~x)^simplify((~n)⨸((~m) + 1))))*((~a) + (~b)*(~x)^simplify((~n)⨸((~m) + 1)))^(~p), (~x), (~x), (~x)^((~m) + 1), "1_1_3_8_27") : nothing) + +("1_1_3_8_28", +@rule ∫(((~c)*(~x))^(~m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + poly((~Pq), (~x)^(~n)) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*(~Pq)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_3_8_29", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a) + (~!b)*(~x)^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~x)) && + ( + poly((~Pq), (~x)) || + poly((~Pq), (~x)^(~n)) + ) && + !(igt((~m), 0)) ? +∫(ext_expand(((~c)*(~x))^(~m)*(~Pq)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +# ("1_1_3_8_30", +# @rule ∫((~u)^(~!m)*(~Pq)*((~a) + (~!b)*(~v)^(~!n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && +# linear_pair((~u), (~v), (~x)) && +# poly((~Pq), (~v)^(~n)) ? +# (~u)^(~m)⨸(ext_coeff((~v), (~x), 1)*(~v)^(~m))* int_and_subst((~x)^(~m)*SubstFor[(~v), (~Pq), (~x)]*((~a) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~v), "1_1_3_8_30") : nothing) + +("1_1_3_8_31", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a1) + (~!b1)*(~x)^(~!n))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + poly((~Pq), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + ( + ext_isinteger((~p)) || + gt((~a1), 0) && + gt((~a2), 0) + ) ? +∫(((~c)*(~x))^(~m)*(~Pq)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing) + +("1_1_3_8_32", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*((~a1) + (~!b1)*(~x)^(~!n))^(~!p)*((~a2) + (~!b2)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a1), (~b1), (~a2), (~b2), (~c), (~m), (~n), (~p), (~x)) && + poly((~Pq), (~x)) && + eq((~a2)*(~b1) + (~a1)*(~b2), 0) && + !( + eq((~n), 1) && + linear((~Pq), (~x)) + ) ? +((~a1) + (~b1)*(~x)^(~n))^ fracpart((~p))*((~a2) + (~b2)*(~x)^(~n))^fracpart((~p))⨸((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^ fracpart((~p))* ∫(((~c)*(~x))^(~m)*(~Pq)*((~a1)*(~a2) + (~b1)*(~b2)*(~x)^(2*(~n)))^(~p), (~x)) : nothing) + +("1_1_3_8_33", +@rule ∫(((~!h)*(~x))^(~!m)*((~e) + (~!f)*(~x)^(~!n) + (~!g)*(~x)^(~!n2))*((~a) + (~!b)*(~x)^(~!n))^ (~!p)*((~c) + (~!d)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~a)*(~c)*(~f)*((~m) + 1) - (~e)*((~b)*(~c) + (~a)*(~d))*((~m) + (~n)*((~p) + 1) + 1), 0) && + eq((~a)*(~c)*(~g)*((~m) + 1) - (~b)*(~d)*(~e)*((~m) + 2*(~n)*((~p) + 1) + 1), 0) && + !eq((~m), -1) ? +(~e)*((~h)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)* (~h)*((~m) + 1)) : nothing) + +("1_1_3_8_34", +@rule ∫(((~!h)*(~x))^(~!m)*((~e) + (~!g)*(~x)^(~!n2))*((~a) + (~!b)*(~x)^(~!n))^ (~!p)*((~c) + (~!d)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~h), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~m) + (~n)*((~p) + 1) + 1, 0) && + eq((~a)*(~c)*(~g)*((~m) + 1) - (~b)*(~d)*(~e)*((~m) + 2*(~n)*((~p) + 1) + 1), 0) && + !eq((~m), -1) ? +(~e)*((~h)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*((~c) + (~d)*(~x)^(~n))^((~p) + 1)⨸((~a)*(~c)* (~h)*((~m) + 1)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.1 (a x^j+b x^n)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.1 (a x^j+b x^n)^p.jl new file mode 100644 index 0000000..67fcb4f --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.1 (a x^j+b x^n)^p.jl @@ -0,0 +1,114 @@ +# rules 1_1_4 mostly dont work due to oom problem, there are a lot of lt(0,j,n) statements + +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.4.1 (a x^j+b x^n)^p *) +("1_1_4_1_1", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + eq((~j)*(~p) - (~n) + (~j) + 1, 0) ? +((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*((~n) - (~j))*((~p) + 1)*(~x)^((~n) - 1)) : nothing) + +("1_1_4_1_2", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ilt(simplify(((~n)*(~p) + (~n) - (~j) + 1)/((~n) - (~j))), 0) && + lt((~p), -1) ? +-((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1)*(~x)^((~j) - 1)) + ((~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1))* ∫(((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸(~x)^(~j), (~x)) : nothing) + +("1_1_4_1_3", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ilt(simplify(((~n)*(~p) + (~n) - (~j) + 1)/((~n) - (~j))), 0) && + !eq((~j)*(~p) + 1, 0) ? +((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~j)*(~p) + 1)*(~x)^((~j) - 1)) - (~b)*((~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*((~j)*(~p) + 1))* ∫((~x)^((~n) - (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +# 1.1.4.1.4 until 1.1.4.1.7 manually translated for oooomm problem +("1_1_4_1_4", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + !(ext_isinteger((~p))) && + lt(0, ~j) && lt(0, ~n) && + gt((~p), 0) && + lt(min(~j,~n)*(~p) + 1, 0) ? +(~x)*((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^(~p)⨸(min(~j,~n)*(~p) + 1) - (~b)*(max(~j,~n) - min(~j,~n))*(~p)⨸(min(~j,~n)*(~p) + 1)*∫((~x)^max(~j,~n)*((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^((~p) - 1), (~x)) : nothing) + +("1_1_4_1_5", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + !(ext_isinteger((~p))) && + lt(0, ~j) && lt(0, ~n) && + gt((~p), 0) && + !eq(max(~j,~n)*(~p) + 1, 0) ? +(~x)*((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^(~p)⨸(max(~j,~n)*(~p) + 1) + (~a)*(max(~j,~n) - min(~j,~n))*(~p)⨸(max(~j,~n)*(~p) + 1)*∫((~x)^min(~j,~n)*((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^((~p) - 1), (~x)) : nothing) + +("1_1_4_1_6", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + !(ext_isinteger((~p))) && + lt(0, ~j) && lt(0, ~n) && + lt((~p), -1) && + gt(min(~j,~n)*(~p) + 1, max(~j,~n) - min(~j,~n)) ? +((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^((~p) + 1)⨸((~b)*(max(~j,~n) - min(~j,~n))*((~p) + 1)*(~x)^(max(~j,~n) - 1)) - (min(~j,~n)*(~p) - max(~j,~n) + min(~j,~n)+ 1)⨸((~b)*(max(~j,~n) - min(~j,~n))*((~p) + 1))* ∫(((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^((~p) + 1)⨸(~x)^max(~j,~n), (~x)) : nothing) + +("1_1_4_1_7", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + !(ext_isinteger((~p))) && + lt(0, ~j) && lt(0, ~n) && + lt((~p), -1) ? +-((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^((~p) + 1)⨸((~a)*(max(~j,~n) - min(~j,~n))*((~p) + 1)*(~x)^(min(~j,~n)- 1)) + (max(~j,~n)*(~p) + max(~j,~n) - min(~j,~n)+ 1)⨸((~a)*(max(~j,~n) - min(~j,~n))*((~p) + 1))* ∫(((~a)*(~x)^min(~j,~n)+ (~b)*(~x)^max(~j,~n))^((~p) + 1)⨸(~x)^min(~j,~n), (~x)) : nothing) + +("1_1_4_1_8", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~x)) && + igt((~p) + 1/2, 0) && + !eq((~n), (~j)) && + eq(simplify((~j)*(~p) + 1), 0) ? +(~x)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p)⨸((~p)*((~n) - (~j))) + (~a)*∫((~x)^(~j)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing) + +("1_1_4_1_9", +@rule ∫(1/sqrt((~!a)*(~x)^2 + (~!b)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~n), (~x)) && + !eq((~n), 2) ? +2⨸(2 - (~n))*int_and_subst(1⨸(1 - (~a)*(~x)^2), (~x), (~x), (~x)⨸sqrt((~a)*(~x)^2 + (~b)*(~x)^(~n)), "1_1_4_1_9") : nothing) + +("1_1_4_1_10", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~x)) && + ilt((~p) + 1/2, 0) && + !eq((~n), (~j)) && + eq(simplify((~j)*(~p) + 1), 0) ? +-((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1)*(~x)^((~j) - 1)) + ((~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1))* ∫(((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸(~x)^(~j), (~x)) : nothing) + +("1_1_4_1_11", +@rule ∫(1/sqrt((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~x)) && + lt(2*((~n) - 1), (~j), (~n)) ? +-2*sqrt((~a)*(~x)^(~j) + (~b)*(~x)^(~n))⨸((~b)*((~n) - 2)*(~x)^((~n) - 1)) - (~a)*(2*(~n) - (~j) - 2)⨸((~b)*((~n) - 2))* ∫(1⨸((~x)^((~n) - (~j))*sqrt((~a)*(~x)^(~j) + (~b)*(~x)^(~n))), (~x)) : nothing) + +#(* Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] := x*(a*x^j+b*x^n)^p/(p*(n-j)*((a*x^j+b*x^n)/(b*x^n))^p)* Hypergeometric2F1[-p,-p,1-p,-a/(b*x^(n-j))] /; FreeQ[{a,b,j,n,p},x] && Not[IntegerQ[p]] && NeQ[n,j] && EqQ[j*p+1,0] *) +#(* Int[(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] := x*(a*x^j+b*x^n)^p/((j*p+1)*((a*x^j+b*x^n)/(a*x^j))^p)* Hypergeometric2F1[-p,(j*p+1)/(n-j),(j*p+1)/(n-j)+1,-b*x^(n-j)/a] /; FreeQ[{a,b,j,n,p},x] && Not[IntegerQ[p]] && NeQ[n,j] && NeQ[j*p+1,0] *) +("1_1_4_1_12", +@rule ∫(((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + pos((~n) - (~j)) ? +((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^ fracpart((~p))⨸((~x)^((~j)*fracpart((~p)))*((~a) + (~b)*(~x)^((~n) - (~j)))^fracpart((~p)))* ∫((~x)^((~j)*(~p))*((~a) + (~b)*(~x)^((~n) - (~j)))^(~p), (~x)) : nothing) + +("1_1_4_1_13", +@rule ∫(((~!a)*(~u)^(~!j) + (~!b)*(~u)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~p), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)*int_and_subst(((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~u), "1_1_4_1_13") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.2 (c x)^m (a x^j+b x^n)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.2 (c x)^m (a x^j+b x^n)^p.jl new file mode 100644 index 0000000..d7f054f --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.2 (c x)^m (a x^j+b x^n)^p.jl @@ -0,0 +1,234 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.4.2 (c x)^m (a x^j+b x^n)^p *) +("1_1_4_2_1", +@rule ∫((~x)^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + eq(simplify((~m) - (~n) + 1), 0) ? +1⨸(~n)*int_and_subst(((~a)*(~x)^simplify((~j)⨸(~n)) + (~b)*(~x))^(~p), (~x), (~x), (~x)^(~n), "1_1_4_2_1") : nothing) + +("1_1_4_2_2", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + eq((~m) + (~n)*(~p) + (~n) - (~j) + 1, 0) && + ( + ext_isinteger((~j)) || + gt((~c), 0) + ) ? +-(~c)^((~j) - 1)*((~c)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1)) : nothing) + +("1_1_4_2_3", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ilt(simplify(((~m) + (~n)*(~p) + (~n) - (~j) + 1)/((~n) - (~j))), 0) && + lt((~p), -1) && + ( + ext_isinteger((~j)) || + gt((~c), 0) + ) ? +-(~c)^((~j) - 1)*((~c)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1)) + (~c)^(~j)*((~m) + (~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1))* ∫(((~c)*(~x))^((~m) - (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("1_1_4_2_4", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ilt(simplify(((~m) + (~n)*(~p) + (~n) - (~j) + 1)/((~n) - (~j))), 0) && + !eq((~m) + (~j)*(~p) + 1, 0) && + ( + ext_isinteger((~j), (~n)) || + gt((~c), 0) + ) ? +(~c)^((~j) - 1)*((~c)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~m) + (~j)*(~p) + 1)) - (~b)*((~m) + (~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*(~c)^((~n) - (~j))*((~m) + (~j)*(~p) + 1))* ∫(((~c)*(~x))^((~m) + (~n) - (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_4_2_5", +@rule ∫(((~c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ilt(simplify(((~m) + (~n)*(~p) + (~n) - (~j) + 1)/((~n) - (~j))), 0) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_4_2_6", +@rule ∫((~x)^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + !eq((~n)^2, 1) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a)*(~x)^simplify((~j)⨸(~n)) + (~b)*(~x))^(~p), (~x), (~x), (~x)^(~n), "1_1_4_2_6") : nothing) + +("1_1_4_2_7", +@rule ∫(((~c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + !eq((~n)^2, 1) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_4_2_8", +@rule ∫(((~!c)*(~x))^(~m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !(ext_isinteger((~p))) && + lt(0, (~j), (~n)) && + ( + ext_isinteger((~j), (~n)) || + gt((~c), 0) + ) && + gt((~p), 0) && + lt((~m) + (~j)*(~p) + 1, 0) ? +((~c)*(~x))^((~m) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p)⨸((~c)*((~m) + (~j)*(~p) + 1)) - (~b)*(~p)*((~n) - (~j))⨸((~c)^(~n)*((~m) + (~j)*(~p) + 1))* ∫(((~c)*(~x))^((~m) + (~n))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing) + +("1_1_4_2_9", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + !(ext_isinteger((~p))) && + lt(0, (~j), (~n)) && + ( + ext_isinteger((~j), (~n)) || + gt((~c), 0) + ) && + gt((~p), 0) && + !eq((~m) + (~n)*(~p) + 1, 0) ? +((~c)*(~x))^((~m) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p)⨸((~c)*((~m) + (~n)*(~p) + 1)) + (~a)*((~n) - (~j))*(~p)⨸((~c)^(~j)*((~m) + (~n)*(~p) + 1))* ∫(((~c)*(~x))^((~m) + (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing) + +("1_1_4_2_10", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !(ext_isinteger((~p))) && + lt(0, (~j), (~n)) && + ( + ext_isinteger((~j), (~n)) || + gt((~c), 0) + ) && + lt((~p), -1) && + gt((~m) + (~j)*(~p) + 1, (~n) - (~j)) ? +(~c)^((~n) - 1)*((~c)*(~x))^((~m) - (~n) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*((~n) - (~j))*((~p) + 1)) - (~c)^(~n)*((~m) + (~j)*(~p) - (~n) + (~j) + 1)⨸((~b)*((~n) - (~j))*((~p) + 1))* ∫(((~c)*(~x))^((~m) - (~n))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("1_1_4_2_11", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + !(ext_isinteger((~p))) && + lt(0, (~j), (~n)) && + ( + ext_isinteger((~j), (~n)) || + gt((~c), 0) + ) && + lt((~p), -1) ? +-(~c)^((~j) - 1)*((~c)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1)) + (~c)^(~j)*((~m) + (~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1))* ∫(((~c)*(~x))^((~m) - (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("1_1_4_2_12", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + !(ext_isinteger((~p))) && + lt(0, (~j), (~n)) && + ( + ext_isinteger((~j), (~n)) || + gt((~c), 0) + ) && + gt((~m) + (~j)*(~p) + 1 - (~n) + (~j), 0) && + !eq((~m) + (~n)*(~p) + 1, 0) ? +(~c)^((~n) - 1)*((~c)*(~x))^((~m) - (~n) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*((~m) + (~n)*(~p) + 1)) - (~a)*(~c)^((~n) - (~j))*((~m) + (~j)*(~p) - (~n) + (~j) + 1)⨸((~b)*((~m) + (~n)*(~p) + 1))* ∫(((~c)*(~x))^((~m) - ((~n) - (~j)))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_4_2_13", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + !(ext_isinteger((~p))) && + lt(0, (~j), (~n)) && + ( + ext_isinteger((~j), (~n)) || + gt((~c), 0) + ) && + lt((~m) + (~j)*(~p) + 1, 0) ? +(~c)^((~j) - 1)*((~c)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~m) + (~j)*(~p) + 1)) - (~b)*((~m) + (~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*(~c)^((~n) - (~j))*((~m) + (~j)*(~p) + 1))* ∫(((~c)*(~x))^((~m) + (~n) - (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_4_2_14", +@rule ∫((~x)^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + !eq((~m), -1) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +1⨸((~m) + 1)* int_and_subst(((~a)*(~x)^simplify((~j)⨸((~m) + 1)) + (~b)*(~x)^simplify((~n)⨸((~m) + 1)))^(~p), (~x), (~x), (~x)^((~m) + 1), "1_1_4_2_14") : nothing) + +("1_1_4_2_15", +@rule ∫(((~c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + !eq((~m), -1) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("1_1_4_2_16", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~x)) && + igt((~p) + 1/2, 0) && + !eq((~n), (~j)) && + eq(simplify((~m) + (~j)*(~p) + 1), 0) && + ( + ext_isinteger((~j)) || + gt((~c), 0) + ) ? +((~c)*(~x))^((~m) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p)⨸((~c)*(~p)*((~n) - (~j))) + (~a)⨸(~c)^(~j)*∫(((~c)*(~x))^((~m) + (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) - 1), (~x)) : nothing) + +("1_1_4_2_17", +@rule ∫((~x)^(~!m)/sqrt((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~j), (~n), (~x)) && + eq((~m), (~j)/2 - 1) && + !eq((~n), (~j)) ? +-2⨸((~n) - (~j))* int_and_subst(1⨸(1 - (~a)*(~x)^2), (~x), (~x), (~x)^((~j)⨸2)⨸sqrt((~a)*(~x)^(~j) + (~b)*(~x)^(~n)), "1_1_4_2_17") : nothing) + +("1_1_4_2_18", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~x)) && + ilt((~p) + 1/2, 0) && + !eq((~n), (~j)) && + eq(simplify((~m) + (~j)*(~p) + 1), 0) && + ( + ext_isinteger((~j)) || + gt((~c), 0) + ) ? +-(~c)^((~j) - 1)*((~c)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1)) + (~c)^(~j)*((~m) + (~n)*(~p) + (~n) - (~j) + 1)⨸((~a)*((~n) - (~j))*((~p) + 1))* ∫(((~c)*(~x))^((~m) - (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("1_1_4_2_19", +@rule ∫(((~c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~p), (~x)) && + ext_isinteger((~p) + 1/2) && + !eq((~n), (~j)) && + eq(simplify((~m) + (~j)*(~p) + 1), 0) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +#(* Int[x_^m_.*(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] := (a*x^j+b*x^n)^(p+1)/(b*p*(n-j)*x^(n+j*p))*Hypergeometric2F1[1,1,1-p, -a/(b*x^(n-j))] /; FreeQ[{a,b,j,m,n,p},x] && NeQ[n,j] && EqQ[m+j*p+1,0] *) +#(* Int[x_^m_.*(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] := (a*x^j+b*x^n)^(p+1)/(b*(p-1)*(n-j)*x^(2*n+j*(p-1)))* Hypergeometric2F1[1,2,2-p,-a/(b*x^(n-j))] /; FreeQ[{a,b,j,m,n,p},x] && NeQ[n,j] && EqQ[m+n+(p-1)*j+1,0] *) +#(* Int[x_^m_.*(a_.*x_^j_.+b_.*x_^n_.)^p_,x_Symbol] := (x^(m-j+1)*(a*x^j+b*x^n)^(p+1))/(a*(m+j*p+1))*Hypergeometric2F1[1,( m+n*p+1)/(n-j)+1,(m+j*p+1)/(n-j)+1,-b*x^(n-j)/a] /; FreeQ[{a,b,j,m,n,p},x] && NeQ[n,j] && NeQ[m+j*p+1,0] && NeQ[m+n+(p-1)*j+1,0] *) +("1_1_4_2_20", +@rule ∫(((~!c)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~j), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq((~n), (~j)) && + pos((~n) - (~j)) ? +(~c)^intpart((~m))*((~c)*(~x))^fracpart((~m))*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^fracpart((~p))⨸ ((~x)^(fracpart((~m)) + (~j)*fracpart((~p)))*((~a) + (~b)*(~x)^((~n) - (~j)))^ fracpart((~p)))* ∫((~x)^((~m) + (~j)*(~p))*((~a) + (~b)*(~x)^((~n) - (~j)))^(~p), (~x)) : nothing) + +("1_1_4_2_21", +@rule ∫((~u)^(~!m)*((~!a)*(~v)^(~!j) + (~!b)*(~v)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~j), (~m), (~n), (~p), (~x)) && + linear_pair((~u), (~v), (~x)) ? +(~u)^(~m)⨸(ext_coeff((~v), (~x), 1)*(~v)^(~m))* int_and_subst((~x)^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^(~n))^(~p), (~x), (~x), (~v), "1_1_4_2_21") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.3 (e x)^m (a x^j+b x^k)^p (c+d x^n)^q.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.3 (e x)^m (a x^j+b x^k)^p (c+d x^n)^q.jl new file mode 100644 index 0000000..af9a5ee --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.1 Binomial products/1.1.4 Improper/1.1.4.3 (e x)^m (a x^j+b x^k)^p (c+d x^n)^q.jl @@ -0,0 +1,126 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.1.4.3 (e x)^m (a x^j+b x^k)^p (c+d x^n)^q *) +("1_1_4_3_1", +@rule ∫((~x)^(~!m)*((~!a)*(~x)^(~j) + (~!b)*(~x)^(~!k))^(~p)*((~c) + (~!d)*(~x)^(~n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~j), (~k), (~m), (~n), (~p), (~q), (~x)) && + !(ext_isinteger((~p))) && + !eq((~k), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + ext_isinteger(simplify((~k)/(~n))) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + !eq((~n)^2, 1) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a)*(~x)^simplify((~j)⨸(~n)) + (~b)*(~x)^simplify((~k)⨸(~n)))^(~p)*((~c) + (~d)*(~x))^(~q), (~x), (~x), (~x)^(~n), "1_1_4_3_1") : nothing) + +("1_1_4_3_2", +@rule ∫(((~e)*(~x))^(~!m)*((~!a)*(~x)^(~j) + (~!b)*(~x)^(~!k))^(~p)*((~c) + (~!d)*(~x)^(~!n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~j), (~k), (~m), (~n), (~p), (~q), (~x)) && + !(ext_isinteger((~p))) && + !eq((~k), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + ext_isinteger(simplify((~k)/(~n))) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + !eq((~n)^2, 1) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^(~k))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_4_3_3", +@rule ∫(((~!e)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!jn))^(~p)*((~c) + (~!d)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~j), (~m), (~n), (~p), (~x)) && + eq((~jn), (~j) + (~n)) && + !(ext_isinteger((~p))) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)*(~d)*((~m) + (~j)*(~p) + 1) - (~b)*(~c)*((~m) + (~n) + (~p)*((~j) + (~n)) + 1), 0) && + ( + gt((~e), 0) || + ext_isinteger((~j)) + ) && + !eq((~m) + (~j)*(~p) + 1, 0) ? +(~c)*(~e)^((~j) - 1)*((~e)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^((~p) + 1)⨸((~a)*((~m) + (~j)*(~p) + 1)) : nothing) + +("1_1_4_3_4", +@rule ∫(((~!e)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!jn))^(~p)*((~c) + (~!d)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~j), (~m), (~n), (~x)) && + eq((~jn), (~j) + (~n)) && + !(ext_isinteger((~p))) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + lt((~p), -1) && + gt((~j), 0) && + le((~j), (~m)) && + ( + gt((~e), 0) || + ext_isinteger((~j)) + ) ? +-(~e)^((~j) - 1)*((~b)*(~c) - (~a)*(~d))*((~e)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^((~p) + 1)⨸((~a)*(~b)* (~n)*((~p) + 1)) - (~e)^(~j)*((~a)*(~d)*((~m) + (~j)*(~p) + 1) - (~b)*(~c)*((~m) + (~n) + (~p)*((~j) + (~n)) + 1))⨸((~a)*(~b)* (~n)*((~p) + 1))* ∫(((~e)*(~x))^((~m) - (~j))*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^((~p) + 1), (~x)) : nothing) + +("1_1_4_3_5", +@rule ∫(((~!e)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!jn))^(~p)*((~c) + (~!d)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~j), (~p), (~x)) && + eq((~jn), (~j) + (~n)) && + !(ext_isinteger((~p))) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + gt((~n), 0) && + ( + lt((~m) + (~j)*(~p), -1) || + ext_isinteger((~m) - 1/2, (~p) - 1/2) && + lt((~p), 0) && + lt((~m), -(~n)*(~p) - 1) + ) && + ( + gt((~e), 0) || + ext_isinteger((~j), (~n)) + ) && + !eq((~m) + (~j)*(~p) + 1, 0) && + !eq((~m) - (~n) + (~j)*(~p) + 1, 0) ? +(~c)*(~e)^((~j) - 1)*((~e)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^((~p) + 1)⨸((~a)*((~m) + (~j)*(~p) + 1)) + ((~a)*(~d)*((~m) + (~j)*(~p) + 1) - (~b)*(~c)*((~m) + (~n) + (~p)*((~j) + (~n)) + 1))⨸((~a)* (~e)^(~n)*((~m) + (~j)*(~p) + 1))* ∫(((~e)*(~x))^((~m) + (~n))*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^(~p), (~x)) : nothing) + +("1_1_4_3_6", +@rule ∫(((~!e)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!jn))^(~p)*((~c) + (~!d)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~j), (~m), (~n), (~p), (~x)) && + eq((~jn), (~j) + (~n)) && + !(ext_isinteger((~p))) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~m) + (~n) + (~p)*((~j) + (~n)) + 1, 0) && + ( + gt((~e), 0) || + ext_isinteger((~j)) + ) ? +(~d)*(~e)^((~j) - 1)*((~e)*(~x))^((~m) - (~j) + 1)*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^((~p) + 1)⨸((~b)*((~m) + (~n) + (~p)*((~j) + (~n)) + 1)) - ((~a)*(~d)*((~m) + (~j)*(~p) + 1) - (~b)*(~c)*((~m) + (~n) + (~p)*((~j) + (~n)) + 1))⨸((~b)*((~m) + (~n) + (~p)*((~j) + (~n)) + 1))* ∫(((~e)*(~x))^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^(~p), (~x)) : nothing) + +("1_1_4_3_7", +@rule ∫((~x)^(~!m)*((~!a)*(~x)^(~j) + (~!b)*(~x)^(~!k))^(~p)*((~c) + (~!d)*(~x)^(~!n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~j), (~k), (~m), (~n), (~p), (~q), (~x)) && + !(ext_isinteger((~p))) && + !eq((~k), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + ext_isinteger(simplify((~k)/(~n))) && + !eq((~m), -1) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +1⨸((~m) + 1)* int_and_subst(((~a)*(~x)^simplify((~j)⨸((~m) + 1)) + (~b)*(~x)^simplify((~k)⨸((~m) + 1)))^ (~p)*((~c) + (~d)*(~x)^simplify((~n)⨸((~m) + 1)))^(~q), (~x), (~x), (~x)^((~m) + 1), "1_1_4_3_7") : nothing) + +("1_1_4_3_8", +@rule ∫(((~e)*(~x))^(~!m)*((~!a)*(~x)^(~j) + (~!b)*(~x)^(~!k))^(~p)*((~c) + (~!d)*(~x)^(~!n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~j), (~k), (~m), (~n), (~p), (~q), (~x)) && + !(ext_isinteger((~p))) && + !eq((~k), (~j)) && + ext_isinteger(simplify((~j)/(~n))) && + ext_isinteger(simplify((~k)/(~n))) && + !eq((~m), -1) && + ext_isinteger(simplify((~n)/((~m) + 1))) && + !(ext_isinteger((~n))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a)*(~x)^(~j) + (~b)*(~x)^(~k))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + +("1_1_4_3_9", +@rule ∫(((~!e)*(~x))^(~!m)*((~!a)*(~x)^(~!j) + (~!b)*(~x)^(~!jn))^(~p)*((~c) + (~!d)*(~x)^(~!n))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~j), (~m), (~n), (~p), (~q), (~x)) && + eq((~jn), (~j) + (~n)) && + !(ext_isinteger((~p))) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !( + eq((~n), 1) && + eq((~j), 1) + ) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))*((~a)*(~x)^(~j) + (~b)*(~x)^((~j) + (~n)))^fracpart((~p))⨸ ((~x)^(fracpart((~m)) + (~j)*fracpart((~p)))*((~a) + (~b)*(~x)^(~n))^fracpart((~p)))* ∫((~x)^((~m) + (~j)*(~p))*((~a) + (~b)*(~x)^(~n))^(~p)*((~c) + (~d)*(~x)^(~n))^(~q), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.1 (a+b x+c x^2)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.1 (a+b x+c x^2)^p.jl new file mode 100644 index 0000000..6906e61 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.1 (a+b x+c x^2)^p.jl @@ -0,0 +1,145 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.1.1 (a+b x+c x^2)^p *) +("1_2_1_1_1", +@rule ∫(((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) ? +2*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((2*(~p) + 1)*((~b) + 2*(~c)*(~x))) : nothing) + +("1_2_1_1_2", +@rule ∫(1/sqrt((~a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) ? +((~b)⨸2 + (~c)*(~x))⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)*∫(1⨸((~b)⨸2 + (~c)*(~x)), (~x)) : nothing) + +("1_2_1_1_3", +@rule ∫(((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~p), -1/2) ? +((~b) + 2*(~c)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸(2*(~c)*(2*(~p) + 1)) : nothing) + +("1_2_1_1_4", +@rule ∫(((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + perfect_square((~b)^2 - 4*(~a)*(~c)) ? +1⨸(~c)^(~p)* ∫(simp((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x), (~x))^(~p)*simp((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x), (~x))^(~p), (~x)) : nothing) + +("1_2_1_1_5", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + ( + eq((~a), 0) || + !(perfect_square((~b)^2 - 4*(~a)*(~c))) + ) ? +∫(ext_expand(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_1_6", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + ext_isinteger(4*(~p)) ? +((~b) + 2*(~c)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸(2*(~c)*(2*(~p) + 1)) - (~p)*((~b)^2 - 4*(~a)*(~c))⨸(2*(~c)*(2*(~p) + 1))* ∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_1_7", +@rule ∫(1/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +-2*((~b) + 2*(~c)*(~x))⨸(((~b)^2 - 4*(~a)*(~c))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)) : nothing) + +("1_2_1_1_8", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + !eq((~p), -3/2) && + ext_isinteger(4*(~p)) ? +((~b) + 2*(~c)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - 2*(~c)*(2*(~p) + 3)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_1_9", +@rule ∫(1/((~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~b), (~c), (~x)) ? +log((~x))⨸(~b) - log((~b) + (~c)*(~x))⨸(~b) : nothing) + +("1_2_1_1_10", +@rule ∫(1/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~b)^2 - 4*(~a)*(~c)) && + perfect_square((~b)^2 - 4*(~a)*(~c)) ? +(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸simp((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x), (~x)), (~x)) - (~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸simp((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_1_11", +@rule ∫(1/((~a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + isrational(1 - 4*simplify((~a)*(~c)/(~b)^2)) && + ( + eq(1 - 4*simplify((~a)*(~c)/(~b)^2)^2, 1) || + !(isrational((~b)^2 - 4*(~a)*(~c))) + ) ? +-2⨸(~b)*int_and_subst(1⨸(1 - 4*simplify((~a)*(~c)⨸(~b)^2) - (~x)^2), (~x), (~x), 1 + 2*(~c)*(~x)⨸(~b), "1_2_1_1_11") : nothing) + +("1_2_1_1_12", +@rule ∫(1/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +-2*int_and_subst(1⨸simp((~b)^2 - 4*(~a)*(~c) - (~x)^2, (~x)), (~x), (~x), (~b) + 2*(~c)*(~x), "1_2_1_1_12") : nothing) +# -2*substitute(integrate(1⨸simp((~b)^2 - 4*(~a)*(~c) - (~x)^2, (~x)), (~x)), (~x)=>(~b) + 2*(~c)*(~x)) : nothing) + +("1_2_1_1_13", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + gt(4*(~a) - (~b)^2/(~c), 0) ? +1⨸(2*(~c)*(-4*(~c)⨸((~b)^2 - 4*(~a)*(~c)))^(~p))* int_and_subst(simp(1 - (~x)^2⨸((~b)^2 - 4*(~a)*(~c)), (~x))^(~p), (~x), (~x), (~b) + 2*(~c)*(~x), "1_2_1_1_13") : nothing) + +("1_2_1_1_14", +@rule ∫(1/sqrt((~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~b), (~c), (~x)) ? +2*int_and_subst(1⨸(1 - (~c)*(~x)^2), (~x), (~x), (~x)⨸sqrt((~b)*(~x) + (~c)*(~x)^2), "1_2_1_1_14") : nothing) + +("1_2_1_1_15", +@rule ∫(1/sqrt((~a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +2*int_and_subst(1⨸(4*(~c) - (~x)^2), (~x), (~x), ((~b) + 2*(~c)*(~x))⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2), "1_2_1_1_15") : nothing) + +("1_2_1_1_16", +@rule ∫(((~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~b), (~c), (~x)) && + isrational((~p)) && + 3 <= ext_den((~p)) <= 4 ? +((~b)*(~x) + (~c)*(~x)^2)^(~p)⨸(-(~c)*((~b)*(~x) + (~c)*(~x)^2)⨸((~b)^2))^(~p)* ∫((-(~c)*(~x)⨸(~b) - (~c)^2*(~x)^2⨸(~b)^2)^(~p), (~x)) : nothing) + +#(* Int[(a_.+b_.*x_+c_.*x_^2)^p_,x_Symbol] := (a+b*x+c*x^2)^p/(-c*(a+b*x+c*x^2)/(b^2-4*a*c))^p*Int[(-a*c/(b^2-4*a* c)-b*c*x/(b^2-4*a*c)-c^2*x^2/(b^2-4*a*c))^p,x] /; FreeQ[{a,b,c},x] && NeQ[b^2-4*a*c,0] && RationalQ[p] && 3<=Denominator[p]<=4 *) +("1_2_1_1_17", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + isrational((~p)) && + 3 <= ext_den((~p)) <= 4 ? +ext_den((~p))*sqrt(((~b) + 2*(~c)*(~x))^2)⨸((~b) + 2*(~c)*(~x))* int_and_subst((~x)^(ext_den((~p))*((~p) + 1) - 1)⨸sqrt((~b)^2 - 4*(~a)*(~c) + 4*(~c)*(~x)^ext_den((~p))), (~x), (~x), ((~a) + (~b)*(~x) + (~c)*(~x)^2)^(1⨸ext_den((~p))), "1_2_1_1_17") : nothing) + +("1_2_1_1_18", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger(4*(~p))) ? +-((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(rt((~b)^2 - 4*(~a)*(~c), 2)*((~p) + 1)*((rt((~b)^2 - 4*(~a)*(~c), 2) - (~b) - 2*(~c)*(~x))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))^((~p) + 1))* hypergeometric2f1(-(~p), (~p) + 1, (~p) + 2, ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_1_1_19", +@rule ∫(((~!a) + (~!b)*(~u) + (~!c)*(~u)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)*int_and_subst(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~u), "1_2_1_1_19") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.2 (d+e x)^m (a+b x+c x^2)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.2 (d+e x)^m (a+b x+c x^2)^p.jl new file mode 100644 index 0000000..976ce87 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.2 (d+e x)^m (a+b x+c x^2)^p.jl @@ -0,0 +1,1309 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.1.2 (d+e x)^m (a+b x+c x^2)^p *) +#(* Int[(d_.+e_.*x_)^m_.*(a_+b_.*x_+c_.*x_^2)^p_.,x_Symbol] := 1/c^p*Int[(d+e*x)^m*(b/2+c*x)^(2*p),x] /; FreeQ[{a,b,c,d,e,m},x] && EqQ[b^2-4*a*c,0] && IntegerQ[p] *) +("1_2_1_2_1", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_2", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ( + ext_isinteger((~p)) || + gt((~a), 0) && + gt((~d), 0) && + ext_isinteger((~m) + (~p)) + ) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_3", +@rule ∫(((~d) + (~!e)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +(~d)*log((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(~b) : nothing) + +("1_2_1_2_4", +@rule ∫(((~d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~p), -1) ? +(~d)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~b)*((~p) + 1)) : nothing) + +("1_2_1_2_5", +@rule ∫(((~d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + igt((~p), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +∫(((~d) + (~e)*(~x))^((~p) + 1)*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_6", +@rule ∫(((~!d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + ext_isinteger((~p)) && + ( + gt((~p), 0) || + eq((~a), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_2_7", +@rule ∫(((~!d) + (~!e)*(~x))/((~a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + nice_sqrt((~b)^2 - 4*(~a)*(~c)) ? +((~c)*(~d) - (~e)*((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2))⨸rt((~b)^2 - 4*(~a)*(~c), 2)* ∫(1⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)), (~x)) - ((~c)*(~d) - (~e)*((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2))⨸rt((~b)^2 - 4*(~a)*(~c), 2)* ∫(1⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)), (~x)) : nothing) + +("1_2_1_2_8", +@rule ∫(((~d) + (~!e)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + nice_sqrt(-(~a)*(~c)) ? +((~e)⨸2 + (~c)*(~d)⨸(2*rt(-(~a)*(~c), 2)))*∫(1⨸(-rt(-(~a)*(~c), 2) + (~c)*(~x)), (~x)) + ((~e)⨸2 - (~c)*(~d)⨸(2*rt(-(~a)*(~c), 2)))* ∫(1⨸(rt(-(~a)*(~c), 2) + (~c)*(~x)), (~x)) : nothing) + +#(* original line: Int[(d_. + e_.*x_)/(a_ + b_.*x_ + c_.*x_^2), x_Symbol] := (* (d-b*e/(2*c))*Int[1/(a+b*x+c*x^2),x] + *) (2*c*d - b*e)/(2*c)*Int[1/(a + b*x + c*x^2), x] + e/(2*c)*Int[(b + 2*c*x)/(a + b*x + c*x^2), x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && Not[NiceSqrtQ[b^2 - 4*a*c]] *) +("1_2_1_2_9", +@rule ∫(((~!d) + (~!e)*(~x))/((~a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(nice_sqrt((~b)^2 - 4*(~a)*(~c))) ? +(2*(~c)*(~d) - (~b)*(~e))⨸(2*(~c))*∫(1⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) + (~e)⨸(2*(~c))*∫(((~b) + 2*(~c)*(~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_10", +@rule ∫(((~d) + (~!e)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !(nice_sqrt(-(~a)*(~c))) ? +(~d)*∫(1⨸((~a) + (~c)*(~x)^2), (~x)) + (~e)*∫((~x)⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_11", +@rule ∫(((~!d) + (~!e)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +-2*((~b)*(~d) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))*(~x))⨸(((~b)^2 - 4*(~a)*(~c))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)) : nothing) + +("1_2_1_2_12", +@rule ∫(((~d) + (~!e)*(~x))/((~a) + (~!c)*(~x)^2)^(3//2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) ? +(-(~a)*(~e) + (~c)*(~d)*(~x))⨸((~a)*(~c)*sqrt((~a) + (~c)*(~x)^2)) : nothing) + +("1_2_1_2_13", +@rule ∫(((~!d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + !eq((~p), -3/2) ? +((~b)*(~d) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))*(~x))⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1) - (2*(~p) + 3)*(2*(~c)*(~d) - (~b)*(~e))⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_14", +@rule ∫(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + lt((~p), -1) && + !eq((~p), -3/2) ? +((~a)*(~e) - (~c)*(~d)*(~x))⨸(2*(~a)*(~c)*((~p) + 1))*((~a) + (~c)*(~x)^2)^((~p) + 1) + (~d)*(2*(~p) + 3)⨸(2*(~a)*((~p) + 1))*∫(((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_15", +@rule ∫(((~!d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~p), -1) ? +(~e)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*((~p) + 1)) + (2*(~c)*(~d) - (~b)*(~e))⨸(2*(~c))* ∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_16", +@rule ∫(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + !eq((~p), -1) ? +(~e)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*((~p) + 1)) + (~d)*∫(((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_17", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + ext_isinteger((~m)/2) ? +(~e)^(~m)⨸(~c)^((~m)⨸2)*∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + (~m)⨸2), (~x)) : nothing) + +("1_2_1_2_18", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + ext_isinteger(((~m) - 1)/2) ? +(~e)^((~m) - 1)⨸(~c)^(((~m) - 1)⨸2)* ∫(((~d) + (~e)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + ((~m) - 1)⨸2), (~x)) : nothing) + +("1_2_1_2_19", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !(ext_isinteger((~m))) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~d) + (~e)*(~x))^(2*(~p))*∫(((~d) + (~e)*(~x))^((~m) + 2*(~p)), (~x)) : nothing) + +("1_2_1_2_20", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + igt((~m), 0) && + eq((~m) - 2*(~p) + 1, 0) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^ fracpart((~p))⨸((~c)^intpart((~p))*((~b)⨸2 + (~c)*(~x))^(2*fracpart((~p))))* ∫( expand_linear_product(((~b)⨸2 + (~c)*(~x))^(2*(~p)), ((~d) + (~e)*(~x))^(~m), (~b)⨸2, (~c), (~x)), (~x)) : nothing) + +("1_2_1_2_21", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^ fracpart((~p))⨸((~c)^intpart((~p))*((~b)⨸2 + (~c)*(~x))^(2*fracpart((~p))))* ∫(((~d) + (~e)*(~x))^(~m)*((~b)⨸2 + (~c)*(~x))^(2*(~p)), (~x)) : nothing) + +("1_2_1_2_22", +@rule ∫(((~!e)*(~x))^(~!m)*((~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~b), (~c), (~e), (~m), (~x)) && + ext_isinteger((~p)) ? +1⨸(~e)^(~p)*∫(((~e)*(~x))^((~m) + (~p))*((~b) + (~c)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_23", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) : nothing) + +("1_2_1_2_24", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) : nothing) + +("1_2_1_2_25", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + 2*(~p) + 2, 0) ? +(~e)*((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*(2*(~c)*(~d) - (~b)*(~e))) : nothing) + +("1_2_1_2_26", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + 2*(~p) + 2, 0) ? +(~e)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*(~d)*((~p) + 1)) : nothing) + +("1_2_1_2_27", +@rule ∫(((~!d) + (~!e)*(~x))^2*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + lt((~p), -1) ? +(~e)*((~d) + (~e)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) - (~e)^2*((~p) + 2)⨸((~c)*((~p) + 1))*∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_28", +@rule ∫(((~d) + (~!e)*(~x))^2*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + lt((~p), -1) ? +(~e)*((~d) + (~e)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) - (~e)^2*((~p) + 2)⨸((~c)*((~p) + 1))*∫(((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_29", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ext_isinteger((~m)) && + isrational((~p)) && + ( + lt(0, -(~m), (~p)) || + lt((~p), -(~m), 0) + ) && + !eq((~m), 2) && + !eq((~m), -1) ? +∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~m) + (~p))⨸((~a)⨸(~d) + (~c)*(~x)⨸(~e))^(~m), (~x)) : nothing) + +("1_2_1_2_30", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ext_isinteger((~m)) && + isrational((~p)) && + ( + lt(0, -(~m), (~p)) || + lt((~p), -(~m), 0) + ) && + !eq((~m), 2) && + !eq((~m), -1) ? +(~d)^(2*(~m))⨸(~a)^(~m)*∫(((~a) + (~c)*(~x)^2)^((~m) + (~p))⨸((~d) - (~e)*(~x))^(~m), (~x)) : nothing) + +("1_2_1_2_31", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + igt(simplify((~m) + (~p)), 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 1)) + simplify((~m) + (~p))*(2*(~c)*(~d) - (~b)*(~e))⨸((~c)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_32", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + igt(simplify((~m) + (~p)), 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 1)) + 2*(~c)*(~d)*simplify((~m) + (~p))⨸((~c)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_33", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt(simplify((~m) + 2*(~p) + 2), 0) ? +-(~e)*((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + (~p) + 1)*(2*(~c)*(~d) - (~b)*(~e))) + (~c)*simplify((~m) + 2*(~p) + 2)⨸(((~m) + (~p) + 1)*(2*(~c)*(~d) - (~b)*(~e)))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_34", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt(simplify((~m) + 2*(~p) + 2), 0) ? +-(~e)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*(~d)*((~m) + (~p) + 1)) + simplify((~m) + 2*(~p) + 2)⨸(2*(~d)*((~m) + (~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_35", +@rule ∫(1/(sqrt((~!d) + (~!e)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +2*(~e)*int_and_subst(1⨸(2*(~c)*(~d) - (~b)*(~e) + (~e)^2*(~x)^2), (~x), (~x), sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸sqrt((~d) + (~e)*(~x)), "1_2_1_2_35") : nothing) + +("1_2_1_2_36", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +2*(~e)*int_and_subst(1⨸(2*(~c)*(~d) + (~e)^2*(~x)^2), (~x), (~x), sqrt((~a) + (~c)*(~x)^2)⨸sqrt((~d) + (~e)*(~x)), "1_2_1_2_36") : nothing) + +("1_2_1_2_37", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + gt((~p), 0) && + ( + lt((~m), -2) || + eq((~m) + 2*(~p) + 1, 0) + ) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + (~p) + 1)) - (~c)*(~p)⨸((~e)^2*((~m) + (~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_38", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~p), 0) && + ( + lt((~m), -2) || + eq((~m) + 2*(~p) + 1, 0) + ) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + (~p) + 1)) - (~c)*(~p)⨸((~e)^2*((~m) + (~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_39", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + gt((~p), 0) && + ( + le(-2, (~m), 0) || + eq((~m) + (~p) + 1, 0) + ) && + !eq((~m) + 2*(~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 2*(~p) + 1)) - (~p)*(2*(~c)*(~d) - (~b)*(~e))⨸((~e)^2*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_40", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~p), 0) && + ( + le(-2, (~m), 0) || + eq((~m) + (~p) + 1, 0) + ) && + !eq((~m) + 2*(~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 2*(~p) + 1)) - 2*(~c)*(~d)*(~p)⨸((~e)^2*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_41", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~p), -1) && + lt(0, (~m), 1) && + ext_isinteger(2*(~p)) ? +(2*(~c)*(~d) - (~b)*(~e))*((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~e)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - (2*(~c)*(~d) - (~b)*(~e))*((~m) + 2*(~p) + 2)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_42", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + lt(0, (~m), 1) && + ext_isinteger(2*(~p)) ? +-(~d)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*(~e)*((~p) + 1)) + (~d)*((~m) + 2*(~p) + 2)⨸(2*(~a)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_43", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 1) && + ext_isinteger(2*(~p)) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) - (~e)^2*((~m) + (~p))⨸((~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_44", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 1) && + ext_isinteger(2*(~p)) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) - (~e)^2*((~m) + (~p))⨸((~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_45", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + gt((~m), 1) && + !eq((~m) + 2*(~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 1)) + ((~m) + (~p))*(2*(~c)*(~d) - (~b)*(~e))⨸((~c)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_46", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~m), 1) && + !eq((~m) + 2*(~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 1)) + 2*(~c)*(~d)*((~m) + (~p))⨸((~c)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_47", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~m), 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +-(~e)*((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + (~p) + 1)*(2*(~c)*(~d) - (~b)*(~e))) + (~c)*((~m) + 2*(~p) + 2)⨸(((~m) + (~p) + 1)*(2*(~c)*(~d) - (~b)*(~e)))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_48", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~m), 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~p)) ? +-(~e)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*(~d)*((~m) + (~p) + 1)) + ((~m) + 2*(~p) + 2)⨸(2*(~d)*((~m) + (~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_49", +@rule ∫(((~!e)*(~x))^(~m)*((~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~b), (~c), (~e), (~m), (~x)) && + !(ext_isinteger((~p))) ? +((~e)*(~x))^(~m)*((~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~x)^((~m) + (~p))*((~b) + (~c)*(~x))^(~p))* ∫((~x)^((~m) + (~p))*((~b) + (~c)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_50", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + gt((~a), 0) && + gt((~d), 0) && + !(igt((~m), 0)) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_51", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ( + ext_isinteger((~m)) || + gt((~d), 0) + ) && + gt((~a), 0) && + !( + igt((~m), 0) && + ( + ext_isinteger(3*(~p)) || + ext_isinteger(4*(~p)) + ) + ) ? +(~a)^((~p) + 1)*(~d)^((~m) - 1)*(((~d) - (~e)*(~x))⨸(~d))^((~p) + 1)⨸((~a)⨸(~d) + (~c)*(~x)⨸(~e))^((~p) + 1)* ∫((1 + (~e)*(~x)⨸(~d))^((~m) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_52", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ( + ext_isinteger((~m)) || + gt((~d), 0) + ) && + !( + igt((~m), 0) && + ( + ext_isinteger(3*(~p)) || + ext_isinteger(4*(~p)) + ) + ) ? +(~d)^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ fracpart( (~p))⨸((1 + (~e)*(~x)⨸(~d))^fracpart((~p))*((~a)⨸(~d) + ((~c)*(~x))⨸(~e))^fracpart((~p)))* ∫((1 + (~e)*(~x)⨸(~d))^((~m) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_53", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ( + ext_isinteger((~m)) || + gt((~d), 0) + ) && + !( + igt((~m), 0) && + ( + ext_isinteger(3*(~p)) || + ext_isinteger(4*(~p)) + ) + ) ? +(~d)^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((1 + (~e)*(~x)⨸(~d))^((~p) + 1)*((~a)⨸(~d) + ((~c)*(~x))⨸(~e))^((~p) + 1))* ∫((1 + (~e)*(~x)⨸(~d))^((~m) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_54", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + !( + ext_isinteger((~m)) || + gt((~d), 0) + ) ? +(~d)^intpart((~m))*((~d) + (~e)*(~x))^fracpart((~m))⨸(1 + (~e)*(~x)⨸(~d))^fracpart((~m))* ∫((1 + (~e)*(~x)⨸(~d))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_55", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + !( + ext_isinteger((~m)) || + gt((~d), 0) + ) ? +(~d)^intpart((~m))*((~d) + (~e)*(~x))^fracpart((~m))⨸(1 + (~e)*(~x)⨸(~d))^fracpart((~m))* ∫((1 + (~e)*(~x)⨸(~d))^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_56", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +-4*(~b)*(~c)⨸((~d)*((~b)^2 - 4*(~a)*(~c)))*∫(1⨸((~b) + 2*(~c)*(~x)), (~x)) + (~b)^2⨸((~d)^2*((~b)^2 - 4*(~a)*(~c)))*∫(((~d) + (~e)*(~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_57", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m) + 2*(~p) + 3, 0) && + !eq((~p), -1) ? +2*(~c)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~e)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) : nothing) + +("1_2_1_2_58", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + igt((~p), 0) && + !( + eq((~m), 3) && + !eq((~p), 1) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_2_59", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~m) + 2*(~p) + 3, 0) && + gt((~p), 0) && + lt((~m), -1) && + !( + ext_isinteger((~m)/2) && + lt((~m) + 2*(~p) + 3, 0) + ) && + ext_isinteger(2*(~p)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 1)) - (~b)*(~p)⨸((~d)*(~e)*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_60", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~m) + 2*(~p) + 3, 0) && + gt((~p), 0) && + !(lt((~m), -1)) && + !( + igt(((~m) - 1)/2, 0) && + ( + !(ext_isinteger((~p))) || + lt((~m), 2*(~p)) + ) + ) && + isrational((~m)) && + ext_isinteger(2*(~p)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 2*(~p) + 1)) - (~d)*(~p)*((~b)^2 - 4*(~a)*(~c))⨸((~b)*(~e)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_61", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~m) + 2*(~p) + 3, 0) && + lt((~p), -1) && + gt((~m), 1) && + ext_isinteger(2*(~p)) ? +(~d)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~b)*((~p) + 1)) - (~d)*(~e)*((~m) - 1)⨸((~b)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_62", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~m) + 2*(~p) + 3, 0) && + lt((~p), -1) && + !(gt((~m), 1)) && + isrational((~m)) && + ext_isinteger(2*(~p)) ? +2*(~c)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~e)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - 2*(~c)*(~e)*((~m) + 2*(~p) + 3)⨸((~e)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_63", +@rule ∫(1/(((~d) + (~!e)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +4*(~c)*int_and_subst(1⨸((~b)^2*(~e) - 4*(~a)*(~c)*(~e) + 4*(~c)*(~e)*(~x)^2), (~x), (~x), sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2), "1_2_1_2_63") : nothing) + +("1_2_1_2_64", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~c)/((~b)^2 - 4*(~a)*(~c)), 0) ? +4⨸(~e)*sqrt(-(~c)⨸((~b)^2 - 4*(~a)*(~c)))* int_and_subst(1⨸sqrt(simp(1 - (~b)^2*(~x)^4⨸((~d)^2*((~b)^2 - 4*(~a)*(~c))), (~x))), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_2_64") : nothing) + +("1_2_1_2_65", +@rule ∫(sqrt((~d) + (~!e)*(~x))/sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~c)/((~b)^2 - 4*(~a)*(~c)), 0) ? +4⨸(~e)*sqrt(-(~c)⨸((~b)^2 - 4*(~a)*(~c)))* int_and_subst((~x)^2⨸sqrt(simp(1 - (~b)^2*(~x)^4⨸((~d)^2*((~b)^2 - 4*(~a)*(~c))), (~x))), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_2_65") : nothing) + +("1_2_1_2_66", +@rule ∫(((~d) + (~!e)*(~x))^(~m)/sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m)^2, 1/4) ? +sqrt(-(~c)*((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~b)^2 - 4*(~a)*(~c)))⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)* ∫(((~d) + (~e)*(~x))^(~m)⨸ sqrt(-(~a)*(~c)⨸((~b)^2 - 4*(~a)*(~c)) - (~b)*(~c)*(~x)⨸((~b)^2 - 4*(~a)*(~c)) - (~c)^2*(~x)^2⨸((~b)^2 - 4*(~a)*(~c))), (~x)) : nothing) + +("1_2_1_2_67", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~m) + 2*(~p) + 3, 0) && + gt((~m), 1) && + !eq((~m) + 2*(~p) + 1, 0) && + ( + ext_isinteger(2*(~p)) || + ext_isinteger((~m)) && + isrational((~p)) || + ext_isodd((~m)) + ) ? +2*(~d)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~b)*((~m) + 2*(~p) + 1)) + (~d)^2*((~m) - 1)*((~b)^2 - 4*(~a)*(~c))⨸((~b)^2*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_68", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~m) + 2*(~p) + 3, 0) && + lt((~m), -1) && + ( + ext_isinteger(2*(~p)) || + ext_isinteger((~m)) && + isrational((~p)) || + ext_isinteger(((~m) + 2*(~p) + 3)/2) + ) ? +-2*(~b)*(~d)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~d)^2*((~m) + 1)*((~b)^2 - 4*(~a)*(~c))) + (~b)^2*((~m) + 2*(~p) + 3)⨸((~d)^2*((~m) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_69", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +1⨸(~e)*int_and_subst((~x)^(~m)*((~a) - (~b)^2⨸(4*(~c)) + ((~c)*(~x)^2)⨸(~e)^2)^(~p), (~x), (~x), (~d) + (~e)*(~x), "1_2_1_2_69") : nothing) + +("1_2_1_2_70", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~!a) + (~!c)*(~x)^2)^(1//4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + 2*(~a)*(~e)^2, 0) && + lt((~a), 0) ? +1⨸(2*(-(~a))^(1⨸4)*(~e))* atan((-1 - (~c)*(~x)^2⨸(~a))^(1⨸4)⨸(1 - (~c)*(~d)*(~x)⨸(2*(~a)*(~e)) - sqrt(-1 - (~c)*(~x)^2⨸(~a)))) + 1⨸(4*(-(~a))^(1⨸4)*(~e))* log((1 - (~c)*(~d)*(~x)⨸(2*(~a)*(~e)) + sqrt(-1 - (~c)*(~x)^2⨸(~a)) - (-1 - (~c)*(~x)^2⨸(~a))^(1⨸4))⨸ (1 - (~c)*(~d)*(~x)⨸(2*(~a)*(~e)) + sqrt(-1 - (~c)*(~x)^2⨸(~a)) + (-1 - (~c)*(~x)^2⨸(~a))^(1⨸4))) : nothing) + +("1_2_1_2_71", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 1) && + igt((~m), 0) && + le((~m), (~p)) ? +(~e)*(~m)*(~d)^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*((~p) + 1)) + ∫((((~d) + (~e)*(~x))^(~m) - (~e)*(~m)*(~d)^((~m) - 1)*(~x))*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_72", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_2_73", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + ext_isinteger((~p)) && + ( + gt((~p), 0) || + eq((~a), 0) && + ext_isinteger((~m)) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +#(* Int[Sqrt[d_.+e_.*x_]/(a_.+b_.*x_+c_.*x_^2),x_Symbol] := With[{q=Rt[(c*d^2-b*d*e+a*e^2)/c,2]}, 1/2*Int[(d+q+e*x)/(Sqrt[d+e*x]*(a+b*x+c*x^2)),x] + 1/2*Int[(d-q+e*x)/(Sqrt[d+e*x]*(a+b*x+c*x^2)),x]] /; FreeQ[{a,b,c,d,e},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && NeQ[2*c*d-b*e,0] && LtQ[b^2-4*a*c,0] *) +#(* Int[Sqrt[d_+e_.*x_]/(a_+c_.*x_^2),x_Symbol] := With[{q=Rt[(c*d^2+a*e^2)/c,2]}, 1/2*Int[(d+q+e*x)/(Sqrt[d+e*x]*(a+c*x^2)),x] + 1/2*Int[(d-q+e*x)/(Sqrt[d+e*x]*(a+c*x^2)),x]] /; FreeQ[{a,c,d,e},x] && NeQ[c*d^2+a*e^2,0] && LtQ[-a*c,0] *) +#(* Int[Sqrt[d_.+e_.*x_]/(a_.+b_.*x_+c_.*x_^2),x_Symbol] := With[{q=Rt[b^2-4*a*c,2]}, (2*c*d-b*e+e*q)/q*Int[1/(Sqrt[d+e*x]*(b-q+2*c*x)),x] - (2*c*d-b*e-e*q)/q*Int[1/(Sqrt[d+e*x]*(b+q+2*c*x)),x]] /; FreeQ[{a,b,c,d,e},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && NeQ[2*c*d-b*e,0] (* && Not[LtQ[b^2-4*a*c,0]] *) *) +#(* Int[Sqrt[d_+e_.*x_]/(a_+c_.*x_^2),x_Symbol] := With[{q=Rt[-a*c,2]}, (c*d+e*q)/(2*q)*Int[1/(Sqrt[d+e*x]*(-q+c*x)),x] - (c*d-e*q)/(2*q)*Int[1/(Sqrt[d+e*x]*(+q+c*x)),x]] /; FreeQ[{a,c,d,e},x] && NeQ[c*d^2+a*e^2,0] (* && Not[LtQ[-a*c,0]] *) *) +("1_2_1_2_74", +@rule ∫(sqrt((~!d) + (~!e)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +2*(~e)*int_and_subst((~x)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2 - (2*(~c)*(~d) - (~b)*(~e))*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_2_74") : nothing) + +("1_2_1_2_75", +@rule ∫(sqrt((~d) + (~!e)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +2*(~e)*int_and_subst((~x)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2 - 2*(~c)*(~d)*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_2_75") : nothing) + +("1_2_1_2_76", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + igt((~m), 1) && + ( + !eq((~d), 0) || + gt((~m), 2) + ) ? +∫(polynomial_divide(((~d) + (~e)*(~x))^(~m), (~a) + (~b)*(~x) + (~c)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_2_77", +@rule ∫(((~d) + (~!e)*(~x))^(~m)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~m), 1) && + ( + !eq((~d), 0) || + gt((~m), 2) + ) ? +∫(polynomial_divide(((~d) + (~e)*(~x))^(~m), (~a) + (~c)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_2_78", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + gt((~m), 1) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)⨸((~c)*((~m) - 1)) + 1⨸(~c)* ∫(((~d) + (~e)*(~x))^((~m) - 2)* simp((~c)*(~d)^2 - (~a)*(~e)^2 + (~e)*(2*(~c)*(~d) - (~b)*(~e))*(~x), (~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_79", +@rule ∫(((~d) + (~!e)*(~x))^(~m)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~m), 1) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)⨸((~c)*((~m) - 1)) + 1⨸(~c)* ∫(((~d) + (~e)*(~x))^((~m) - 2)* simp((~c)*(~d)^2 - (~a)*(~e)^2 + 2*(~c)*(~d)*(~e)*(~x), (~x))⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_80", +@rule ∫(1/(((~!d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +(~e)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)*∫(1⨸((~d) + (~e)*(~x)), (~x)) + 1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_81", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +(~e)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(1⨸((~d) + (~e)*(~x)), (~x)) + 1⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~c)*(~d) - (~c)*(~e)*(~x))⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +#(* Int[1/(Sqrt[d_.+e_.*x_]*(a_.+b_.*x_+c_.*x_^2)),x_Symbol] := With[{q=Rt[(c*d^2-b*d*e+a*e^2)/c,2]}, 1/(2*q)*Int[(d+q+e*x)/(Sqrt[d+e*x]*(a+b*x+c*x^2)),x] - 1/(2*q)*Int[(d-q+e*x)/(Sqrt[d+e*x]*(a+b*x+c*x^2)),x]] /; FreeQ[{a,b,c,d,e},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && NeQ[2*c*d-b*e,0] && LtQ[b^2-4*a*c,0] *) +#(* Int[1/(Sqrt[d_+e_.*x_]*(a_+c_.*x_^2)),x_Symbol] := With[{q=Rt[(c*d^2+a*e^2)/c,2]}, 1/(2*q)*Int[(d+q+e*x)/(Sqrt[d+e*x]*(a+c*x^2)),x] - 1/(2*q)*Int[(d-q+e*x)/(Sqrt[d+e*x]*(a+c*x^2)),x]] /; FreeQ[{a,c,d,e},x] && NeQ[c*d^2+a*e^2,0] && LtQ[-a*c,0] *) +#(* Int[1/(Sqrt[d_.+e_.*x_]*(a_.+b_.*x_+c_.*x_^2)),x_Symbol] := With[{q=Rt[b^2-4*a*c,2]}, 2*c/q*Int[1/(Sqrt[d+e*x]*(b-q+2*c*x)),x] - 2*c/q*Int[1/(Sqrt[d+e*x]*(b+q+2*c*x)),x]] /; FreeQ[{a,b,c,d,e},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] && NeQ[2*c*d-b*e,0] (* && Not[LtQ[b^2-4*a*c,0]] *) *) +#(* Int[1/(Sqrt[d_+e_.*x_]*(a_+c_.*x_^2)),x_Symbol] := With[{q=Rt[-a*c,2]}, c/(2*q)*Int[1/(Sqrt[d+e*x]*(-q+c*x)),x] - c/(2*q)*Int[1/(Sqrt[d+e*x]*(q+c*x)),x]] /; FreeQ[{a,c,d,e},x] && NeQ[c*d^2+a*e^2,0] (* && Not[LtQ[-a*c,0]] *) *) +("1_2_1_2_82", +@rule ∫(1/(sqrt((~!d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +2*(~e)*int_and_subst(1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2 - (2*(~c)*(~d) - (~b)*(~e))*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_2_82") : nothing) + +("1_2_1_2_83", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +2*(~e)*int_and_subst(1⨸((~c)*(~d)^2 + (~a)*(~e)^2 - 2*(~c)*(~d)*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_2_83") : nothing) + +("1_2_1_2_84", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~m), -1) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~d) + (~e)*(~x))^((~m) + 1)* simp((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x), (~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_85", +@rule ∫(((~d) + (~!e)*(~x))^(~m)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~m), -1) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + (~c)⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~d) - (~e)*(~x))⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_86", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !(ext_isinteger((~m))) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m), 1⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_2_87", +@rule ∫(((~d) + (~!e)*(~x))^(~m)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m), 1⨸((~a) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_2_88", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~b)*(~d) + (~a)*(~e), 0) && + eq((~c)*(~d) + (~b)*(~e), 0) && + igt((~m) - (~p) + 1, 0) && + !(ext_isinteger((~p))) ? +((~d) + (~e)*(~x))^ fracpart((~p))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^fracpart((~p))⨸((~a)*(~d) + (~c)*(~e)*(~x)^3)^ fracpart((~p))*∫(((~d) + (~e)*(~x))^((~m) - (~p))*((~a)*(~d) + (~c)*(~e)*(~x)^3)^(~p), (~x)) : nothing) + +("1_2_1_2_89", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/sqrt((~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d) - (~b)*(~e), 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m)^2, 1/4) && + lt((~c), 0) && + isrational((~b)) ? +∫(((~d) + (~e)*(~x))^(~m)⨸(sqrt((~b)*(~x))*sqrt(1 + (~c)⨸(~b)*(~x))), (~x)) : nothing) + +("1_2_1_2_90", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/sqrt((~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d) - (~b)*(~e), 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m)^2, 1/4) ? +sqrt((~x))*sqrt((~b) + (~c)*(~x))⨸sqrt((~b)*(~x) + (~c)*(~x)^2)* ∫(((~d) + (~e)*(~x))^(~m)⨸(sqrt((~x))*sqrt((~b) + (~c)*(~x))), (~x)) : nothing) + +("1_2_1_2_91", +@rule ∫((~x)^(~m)/sqrt((~a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~m)^2, 1/4) ? +2*int_and_subst((~x)^(2*(~m) + 1)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~x)), "1_2_1_2_91") : nothing) + +("1_2_1_2_92", +@rule ∫(((~e)*(~x))^(~m)/sqrt((~a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~m)^2, 1/4) ? +((~e)*(~x))^(~m)⨸(~x)^(~m)*∫((~x)^(~m)⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_2_93", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m)^2, 1/4) ? +2*rt((~b)^2 - 4*(~a)*(~c), 2)*((~d) + (~e)*(~x))^(~m)* sqrt(-(~c)*((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~b)^2 - 4*(~a)*(~c)))⨸ ((~c)* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)*(2*(~c)*((~d) + (~e)*(~x))⨸(2*(~c)*(~d) - (~b)*(~e) - (~e)*rt((~b)^2 - 4*(~a)*(~c), 2)))^(~m))* int_and_subst((1 + 2*(~e)*rt((~b)^2 - 4*(~a)*(~c), 2)* (~x)^2⨸(2*(~c)*(~d) - (~b)*(~e) - (~e)*rt((~b)^2 - 4*(~a)*(~c), 2)))^(~m)⨸sqrt(1 - (~x)^2), (~x), (~x), sqrt(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2))), "1_2_1_2_93") : nothing) + +("1_2_1_2_94", +@rule ∫(((~d) + (~!e)*(~x))^(~m)/sqrt((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq((~m)^2, 1/4) ? +2*(~a)*rt(-(~c)⨸(~a), 2)*((~d) + (~e)*(~x))^(~m)* sqrt(1 + (~c)*(~x)^2⨸(~a))⨸((~c)* sqrt((~a) + (~c)*(~x)^2)*((~c)*((~d) + (~e)*(~x))⨸((~c)*(~d) - (~a)*(~e)*rt(-(~c)⨸(~a), 2)))^(~m))* int_and_subst((1 + 2*(~a)*(~e)*rt(-(~c)⨸(~a), 2)*(~x)^2⨸((~c)*(~d) - (~a)*(~e)*rt(-(~c)⨸(~a), 2)))^(~m)⨸ sqrt(1 - (~x)^2), (~x), (~x), sqrt((1 - rt(-(~c)⨸(~a), 2)*(~x))⨸2), "1_2_1_2_94") : nothing) + +("1_2_1_2_95", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m) + 2*(~p) + 2, 0) && + gt((~p), 0) ? +-((~d) + (~e)*(~x))^((~m) + 1)*((~d)*(~b) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ (~p)⨸(2*((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + (~p)*((~b)^2 - 4*(~a)*(~c))⨸(2*((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_96", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq((~m) + 2*(~p) + 2, 0) && + gt((~p), 0) ? +-((~d) + (~e)*(~x))^((~m) + 1)*(-2*(~a)*(~e) + (2*(~c)*(~d))*(~x))*((~a) + (~c)*(~x)^2)^ (~p)⨸(2*((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) - 4*(~a)*(~c)*(~p)⨸(2*((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_97", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m) + 2*(~p) + 2, 0) && + lt((~p), -1) ? +((~d) + (~e)*(~x))^((~m) - 1)*((~d)*(~b) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))* (~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - 2*(2*(~p) + 3)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_98", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq((~m) + 2*(~p) + 2, 0) && + lt((~p), -1) ? +((~d) + (~e)*(~x))^((~m) - 1)*((~a)*(~e) - (~c)*(~d)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*(~c)*((~p) + 1)) + (2*(~p) + 3)*((~c)*(~d)^2 + (~a)*(~e)^2)⨸(2*(~a)*(~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_99", +@rule ∫(1/(((~!d) + (~!e)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +-2*int_and_subst(1⨸(4*(~c)*(~d)^2 - 4*(~b)*(~d)*(~e) + 4*(~a)*(~e)^2 - (~x)^2), (~x), (~x), (2*(~a)*(~e) - (~b)*(~d) - (2*(~c)*(~d) - (~b)*(~e))*(~x))⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2), "1_2_1_2_99") : nothing) + +("1_2_1_2_100", +@rule ∫(1/(((~d) + (~!e)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) ? +-int_and_subst(1⨸((~c)*(~d)^2 + (~a)*(~e)^2 - (~x)^2), (~x), (~x), ((~a)*(~e) - (~c)*(~d)*(~x))⨸sqrt((~a) + (~c)*(~x)^2), "1_2_1_2_100") : nothing) + +("1_2_1_2_101", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !(ext_isinteger((~p))) && + eq((~m) + 2*(~p) + 2, 0) ? +-((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸ (((~m) + 1)*(2*(~c)*(~d) - (~b)*(~e) + (~e)*rt((~b)^2 - 4*(~a)*(~c), 2))* ((2*(~c)*(~d) - (~b)*(~e) + (~e)*rt((~b)^2 - 4*(~a)*(~c), 2))*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸((2*(~c)*(~d) - (~b)*(~e) - (~e)*rt((~b)^2 - 4*(~a)*(~c), 2))*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))))^(~p))* hypergeometric2f1((~m) + 1, -(~p), (~m) + 2, -4*(~c)* rt((~b)^2 - 4*(~a)*(~c), 2)*((~d) + (~e)* (~x))⨸((2*(~c)*(~d) - (~b)*(~e) - (~e)*rt((~b)^2 - 4*(~a)*(~c), 2))*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)))) : nothing) + +("1_2_1_2_102", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + 2*(~p) + 2, 0) ? +(rt(-(~a)*(~c), 2) - (~c)*(~x))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p)⨸ (((~m) + 1)*((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2))*(((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2))*(rt(-(~a)*(~c), 2) + (~c)*(~x))⨸(((~c)*(~d) - (~e)*rt(-(~a)*(~c), 2))*(-rt(-(~a)*(~c), 2) + (~c)*(~x))))^(~p))* hypergeometric2f1((~m) + 1, -(~p), (~m) + 2, 2*(~c)*rt(-(~a)*(~c), 2)*((~d) + (~e)*(~x))⨸(((~c)*(~d) - (~e)*rt(-(~a)*(~c), 2))*(rt(-(~a)*(~c), 2) - (~c)*(~x)))) : nothing) + +("1_2_1_2_103", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m) + 2*(~p) + 3, 0) && + lt((~p), -1) ? +((~d) + (~e)*(~x))^ (~m)*((~b) + 2*(~c)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + (~m)*(2*(~c)*(~d) - (~b)*(~e))⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_104", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq((~m) + 2*(~p) + 3, 0) && + lt((~p), -1) ? +-((~d) + (~e)*(~x))^(~m)*(2*(~c)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(4*(~a)*(~c)*((~p) + 1)) - (~m)*(2*(~c)*(~d))⨸(4*(~a)*(~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_105", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~m) + 2*(~p) + 3, 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + (2*(~c)*(~d) - (~b)*(~e))⨸(2*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_106", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq((~m) + 2*(~p) + 3, 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + (~c)*(~d)⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_107", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + gt((~p), 0) && + ( + ext_isinteger((~p)) || + lt((~m), -1) + ) && + !eq((~m), -1) && + !(ilt((~m) + 2*(~p) + 1, 0)) && + int_quadratic((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 1)) - (~p)⨸((~e)*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~b) + 2*(~c)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_108", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~p), 0) && + ( + ext_isinteger((~p)) || + lt((~m), -1) + ) && + !eq((~m), -1) && + !(ilt((~m) + 2*(~p) + 1, 0)) && + int_quadratic((~a), 0, (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 1)) - 2*(~c)*(~p)⨸((~e)*((~m) + 1))* ∫((~x)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_109", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + gt((~p), 0) && + !eq((~m) + 2*(~p) + 1, 0) && + ( + !(isrational((~m))) || + lt((~m), 1) + ) && + !(ilt((~m) + 2*(~p), 0)) && + int_quadratic((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 2*(~p) + 1)) - (~p)⨸((~e)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^(~m)* simp((~b)*(~d) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))*(~x), (~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_110", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~p), 0) && + !eq((~m) + 2*(~p) + 1, 0) && + ( + !(isrational((~m))) || + lt((~m), 1) + ) && + !(ilt((~m) + 2*(~p), 0)) && + int_quadratic((~a), 0, (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p)⨸((~e)*((~m) + 2*(~p) + 1)) + 2*(~p)⨸((~e)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^(~m)*simp((~a)*(~e) - (~c)*(~d)*(~x), (~x))*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_2_111", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~p), -1) && + gt((~m), 0) && + ( + lt((~m), 1) || + ilt((~m) + 2*(~p) + 3, 0) && + !eq((~m), 2) + ) && + int_quadratic((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^ (~m)*((~b) + 2*(~c)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - 1⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~b)*(~e)*(~m) + 2*(~c)*(~d)*(2*(~p) + 3) + 2*(~c)*(~e)*((~m) + 2*(~p) + 3)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_112", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 0) && + ( + lt((~m), 1) || + ilt((~m) + 2*(~p) + 3, 0) && + !eq((~m), 2) + ) && + int_quadratic((~a), 0, (~c), (~d), (~e), (~m), (~p), (~x)) ? +-(~x)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*((~p) + 1)) + 1⨸(2*(~a)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~d)*(2*(~p) + 3) + (~e)*((~m) + 2*(~p) + 3)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_113", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~p), -1) && + gt((~m), 1) && + int_quadratic((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^((~m) - 1)*((~d)*(~b) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))* (~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 2)* simp((~e)*(2*(~a)*(~e)*((~m) - 1) + (~b)*(~d)*(2*(~p) - (~m) + 4)) - 2*(~c)*(~d)^2*(2*(~p) + 3) + (~e)*((~b)*(~e) - 2*(~d)*(~c))*((~m) + 2*(~p) + 2)*(~x), (~x))* ((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_114", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 1) && + int_quadratic((~a), 0, (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^((~m) - 1)*((~a)*(~e) - (~c)*(~d)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*(~c)*((~p) + 1)) + 1⨸(((~p) + 1)*(-2*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 2)* simp((~a)*(~e)^2*((~m) - 1) - (~c)*(~d)^2*(2*(~p) + 3) - (~d)*(~c)*(~e)*((~m) + 2*(~p) + 2)*(~x), (~x))*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_115", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~p), -1) && + int_quadratic((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~b)*(~c)*(~d) - (~b)^2*(~e) + 2*(~a)*(~c)*(~e) + (~c)*(2*(~c)*(~d) - (~b)*(~e))* (~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^(~m)* simp((~b)*(~c)*(~d)*(~e)*(2*(~p) - (~m) + 2) + (~b)^2*(~e)^2*((~m) + (~p) + 2) - 2*(~c)^2*(~d)^2*(2*(~p) + 3) - 2*(~a)*(~c)*(~e)^2*((~m) + 2*(~p) + 3) - (~c)*(~e)*(2*(~c)*(~d) - (~b)*(~e))*((~m) + 2*(~p) + 4)*(~x), (~x))* ((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_116", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + int_quadratic((~a), 0, (~c), (~d), (~e), (~m), (~p), (~x)) ? +-((~d) + (~e)*(~x))^((~m) + 1)*((~a)*(~e) + (~c)*(~d)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*((~p) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸(2*(~a)*((~p) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^(~m)* simp((~c)*(~d)^2*(2*(~p) + 3) + (~a)*(~e)^2*((~m) + 2*(~p) + 3) + (~c)*(~e)*(~d)*((~m) + 2*(~p) + 4)*(~x), (~x))*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_2_117", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + ifelse(isrational((~m)), gt((~m), 1), sumsimpler((~m), -2)) && + !eq((~m) + 2*(~p) + 1, 0) && + int_quadratic((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 1)) + 1⨸((~c)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)* simp((~c)*(~d)^2*((~m) + 2*(~p) + 1) - (~e)*((~a)*(~e)*((~m) - 1) + (~b)*(~d)*((~p) + 1)) + (~e)*(2*(~c)*(~d) - (~b)*(~e))*((~m) + (~p))*(~x), (~x))* ((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_118", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ifelse(isrational((~m)), gt((~m), 1), sumsimpler((~m), -2)) && + !eq((~m) + 2*(~p) + 1, 0) && + int_quadratic((~a), 0, (~c), (~d), (~e), (~m), (~p), (~x)) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 1)) + 1⨸((~c)*((~m) + 2*(~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)* simp((~c)*(~d)^2*((~m) + 2*(~p) + 1) - (~a)*(~e)^2*((~m) - 1) + 2*(~c)*(~d)*(~e)*((~m) + (~p))*(~x), (~x))*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_119", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !eq((~m), -1) && + ( + lt((~m), -1) && + int_quadratic((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) || + sumsimpler((~m), 1) && + ext_isinteger((~p)) || + ilt(simplify((~m) + 2*(~p) + 3), 0) + ) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)* simp((~c)*(~d)*((~m) + 1) - (~b)*(~e)*((~m) + (~p) + 2) - (~c)*(~e)*((~m) + 2*(~p) + 3)*(~x), (~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_120", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !eq((~m), -1) && + ( + lt((~m), -1) && + int_quadratic((~a), 0, (~c), (~d), (~e), (~m), (~p), (~x)) || + sumsimpler((~m), 1) && + ext_isinteger((~p)) || + ilt(simplify((~m) + 2*(~p) + 3), 0) + ) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + (~c)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)* simp((~d)*((~m) + 1) - (~e)*((~m) + 2*(~p) + 3)*(~x), (~x))*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_2_121", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)^(1//4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +(~d)*∫(1⨸(((~d)^2 - (~e)^2*(~x)^2)*((~a) + (~c)*(~x)^2)^(1⨸4)), (~x)) - (~e)*∫((~x)⨸(((~d)^2 - (~e)^2*(~x)^2)*((~a) + (~c)*(~x)^2)^(1⨸4)), (~x)) : nothing) + +("1_2_1_2_122", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)^(3//4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +(~d)*∫(1⨸(((~d)^2 - (~e)^2*(~x)^2)*((~a) + (~c)*(~x)^2)^(3⨸4)), (~x)) - (~e)*∫((~x)⨸(((~d)^2 - (~e)^2*(~x)^2)*((~a) + (~c)*(~x)^2)^(3⨸4)), (~x)) : nothing) + +("1_2_1_2_123", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + gt(4*(~a) - (~b)^2/(~c), 0) && + ext_isinteger(4*(~p)) ? +1⨸(-4*(~c)⨸((~b)^2 - 4*(~a)*(~c)))^(~p)* int_and_subst( simp(1 - (~x)^2⨸((~b)^2 - 4*(~a)*(~c)), (~x))^(~p)⨸simp(2*(~c)*(~d) - (~b)*(~e) + (~e)*(~x), (~x)), (~x), (~x), (~b) + 2*(~c)*(~x), "1_2_1_2_123") : nothing) + +("1_2_1_2_124", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !(gt(4*(~a) - (~b)^2/(~c), 0)) && + ext_isinteger(4*(~p)) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸(-(~c)*((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~b)^2 - 4*(~a)*(~c)))^(~p)* ∫((-(~a)*(~c)⨸((~b)^2 - 4*(~a)*(~c)) - (~b)*(~c)*(~x)⨸((~b)^2 - 4*(~a)*(~c)) - (~c)^2*(~x)^2⨸((~b)^2 - 4*(~a)*(~c)))^(~p)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("1_2_1_2_125", +@rule ∫(1/(((~!d) + (~!e)*(~x))*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(1//3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~c)^2*(~d)^2 - (~b)*(~c)*(~d)*(~e) + (~b)^2*(~e)^2 - 3*(~a)*(~c)*(~e)^2, 0) && + pos((~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e))) ? +-sqrt(3)*(~c)*(~e)* atan(1⨸sqrt(3) + 2*((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x))⨸(sqrt(3)*rt(3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(1⨸3)))⨸ rt(3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)^2 - 3*(~c)*(~e)*log((~d) + (~e)*(~x))⨸(2*rt(3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)^2) + 3*(~c)*(~e)* log((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x) - rt(3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(1⨸3))⨸(2*rt(3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)^2) : nothing) + +("1_2_1_2_126", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)^(1//3)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 - 3*(~a)*(~e)^2, 0) ? +-sqrt(3)*(~c)*(~e)* atan(1⨸sqrt(3) + 2*(~c)*((~d) - (~e)*(~x))⨸(sqrt(3)*(~d)*rt(6*(~c)^2*(~e)^2⨸(~d)^2, 3)*((~a) + (~c)*(~x)^2)^(1⨸3)))⨸((~d)^2*rt(6*(~c)^2*(~e)^2⨸(~d)^2, 3)^2) - 3*(~c)*(~e)*log((~d) + (~e)*(~x))⨸(2*(~d)^2*rt(6*(~c)^2*(~e)^2⨸(~d)^2, 3)^2) + 3*(~c)*(~e)*log((~c)*(~d) - (~c)*(~e)*(~x) - (~d)*rt(6*(~c)^2*(~e)^2⨸(~d)^2, 3)*((~a) + (~c)*(~x)^2)^(1⨸3))⨸(2*(~d)^2*rt(6*(~c)^2*(~e)^2⨸(~d)^2, 3)^2) : nothing) + +("1_2_1_2_127", +@rule ∫(1/(((~!d) + (~!e)*(~x))*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(1//3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + eq((~c)^2*(~d)^2 - (~b)*(~c)*(~d)*(~e) + (~b)^2*(~e)^2 - 3*(~a)*(~c)*(~e)^2, 0) && + neg((~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e))) ? +-sqrt(3)*(~c)*(~e)* atan(1⨸sqrt(3) - 2*((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x))⨸(sqrt(3)*rt(-3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(1⨸3)))⨸ rt(-3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)^2 - 3*(~c)*(~e)*log((~d) + (~e)*(~x))⨸(2*rt(-3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)^2) + 3*(~c)*(~e)* log((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x) + rt(-3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(1⨸3))⨸(2*rt(-3*(~c)*(~e)^2*(2*(~c)*(~d) - (~b)*(~e)), 3)^2) : nothing) + +#(* Int[1/((d_+e_.*x_)*(a_+c_.*x_^2)^(1/3)),x_Symbol] := With[{q=Rt[-6*c^2*d*e^2,3]}, -Sqrt[3]*c*e*ArcTan[1/Sqrt[3]-2*(c*d-c*e*x)/(Sqrt[3]*q*(a+c*x^2)^(1/ 3))]/q^2 - 3*c*e*Log[d+e*x]/(2*q^2) + 3*c*e*Log[c*d-c*e*x+q*(a+c*x^2)^(1/3)]/(2*q^2)] /; FreeQ[{a,c,d,e},x] && EqQ[c*d^2-3*a*e^2,0] && NegQ[c^2*d*e^2] *) +("1_2_1_2_128", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)^(1//3)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + 9*(~a)*(~e)^2, 0) && + gt((~a), 0) ? +(~a)^(1⨸3)* ∫(1⨸(((~d) + (~e)*(~x))*(1 - 3*(~e)*(~x)⨸(~d))^(1⨸3)*(1 + 3*(~e)*(~x)⨸(~d))^(1⨸3)), (~x)) : nothing) + +("1_2_1_2_129", +@rule ∫(1/(((~d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)^(1//3)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 + 9*(~a)*(~e)^2, 0) && + !(gt((~a), 0)) ? +(1 + (~c)*(~x)^2⨸(~a))^(1⨸3)⨸((~a) + (~c)*(~x)^2)^(1⨸3)* ∫(1⨸(((~d) + (~e)*(~x))*(1 + (~c)*(~x)^2⨸(~a))^(1⨸3)), (~x)) : nothing) + +("1_2_1_2_130", +@rule ∫(1/(((~!d) + (~!e)*(~x))*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(1//3)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)^2*(~d)^2 - (~b)*(~c)*(~d)*(~e) - 2*(~b)^2*(~e)^2 + 9*(~a)*(~c)*(~e)^2, 0) ? +((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))^(1⨸ 3)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))^(1⨸3)⨸((~a) + (~b)*(~x) + (~c)*(~x)^2)^(1⨸3)* ∫(1⨸(((~d) + (~e)*(~x))*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))^(1⨸3)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))^(1⨸3)), (~x)) : nothing) + +("1_2_1_2_131", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + gt((~a), 0) && + lt((~c), 0) ? +∫(((~d) + (~e)*(~x))^(~m)*(rt((~a), 2) + rt(-(~c), 2)*(~x))^ (~p)*(rt((~a), 2) - rt(-(~c), 2)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_2_132", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~m), 0) ? +∫(ext_expand(((~a) + (~c)*(~x)^2)^ (~p), ((~d)⨸((~d)^2 - (~e)^2*(~x)^2) - (~e)*(~x)⨸((~d)^2 - (~e)^2*(~x)^2))^(-(~m)), (~x)), (~x)) : nothing) + +("1_2_1_2_133", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !(ext_isinteger((~p))) && + ilt((~m), 0) ? +-(1⨸((~d) + (~e)*(~x)))^(2*(~p))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ (~p)⨸((~e)*((~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸(2*(~c)*((~d) + (~e)*(~x))))^ (~p)*((~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸(2*(~c)*((~d) + (~e)*(~x))))^(~p))* int_and_subst((~x)^(-(~m) - 2*((~p) + 1))*simp(1 - ((~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c)))*(~x), (~x))^(~p)* simp(1 - ((~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c)))*(~x), (~x))^(~p), (~x), (~x), 1⨸((~d) + (~e)*(~x)), "1_2_1_2_133") : nothing) + +("1_2_1_2_134", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^ (~p)⨸((~e)*(1 - ((~d) + (~e)*(~x))⨸((~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c))))^ (~p)*(1 - ((~d) + (~e)*(~x))⨸((~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c))))^(~p))* int_and_subst((~x)^(~m)*simp(1 - (~x)⨸((~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c))), (~x))^(~p)* simp(1 - (~x)⨸((~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c))), (~x))^(~p), (~x), (~x), (~d) + (~e)*(~x), "1_2_1_2_134") : nothing) + +("1_2_1_2_135", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) ? +((~a) + (~c)*(~x)^2)^ (~p)⨸((~e)*(1 - ((~d) + (~e)*(~x))⨸((~d) + (~e)*rt(-(~a)*(~c), 2)⨸(~c)))^(~p)*(1 - ((~d) + (~e)*(~x))⨸((~d) - (~e)*rt(-(~a)*(~c), 2)⨸(~c)))^ (~p))* int_and_subst((~x)^(~m)*simp(1 - (~x)⨸((~d) + (~e)*rt(-(~a)*(~c), 2)⨸(~c)), (~x))^(~p)* simp(1 - (~x)⨸((~d) - (~e)*rt(-(~a)*(~c), 2)⨸(~c)), (~x))^(~p), (~x), (~x), (~d) + (~e)*(~x), "1_2_1_2_135") : nothing) + +("1_2_1_2_136", +@rule ∫(((~!d) + (~!e)*(~u))^(~!m)*((~a) + (~!b)*(~u) + (~!c)*(~u)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~u), "1_2_1_2_136") : nothing) + +("1_2_1_2_137", +@rule ∫(((~!d) + (~!e)*(~u))^(~!m)*((~a) + (~!c)*(~u)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x), (~x), (~u), "1_2_1_2_137") : nothing) + +#(* 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. *) IntQuadraticQ[a_, b_, c_, d_, e_, m_, p_, x_] := IntegerQ[p] || IGtQ[m, 0] || IntegersQ[2*m, 2*p] || IntegersQ[m, 4*p] || IntegersQ[m, p + 1/3] && (EqQ[c^2*d^2 - b*c*d*e + b^2*e^2 - 3*a*c*e^2, 0] || EqQ[c^2*d^2 - b*c*d*e - 2*b^2*e^2 + 9*a*c*e^2, 0]) + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.3 (d+e x)^m (f+g x) (a+b x+c x^2)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.3 (d+e x)^m (f+g x) (a+b x+c x^2)^p.jl new file mode 100644 index 0000000..cd2b9ac --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.3 (d+e x)^m (f+g x) (a+b x+c x^2)^p.jl @@ -0,0 +1,783 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.1.3 (d+e x)^m (f+g x) (a+b x+c x^2)^p *) +("1_2_1_3_1", +@rule ∫(((~!e)*(~x))^(~!m)*((~f) + (~!g)*(~x))*((~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~b), (~c), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~b)*(~g)*((~m) + (~p) + 1) - (~c)*(~f)*((~m) + 2*(~p) + 2), 0) && + !eq((~m) + 2*(~p) + 2, 0) ? +(~g)*((~e)*(~x))^(~m)*((~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 2)) : nothing) + +("1_2_1_3_2", +@rule ∫((~x)^(~!m)*((~f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~f), (~g), (~p), (~x)) && + ext_isinteger((~m)) && + !(ext_isinteger(2*(~p))) ? +(~f)*∫((~x)^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)) + (~g)*∫((~x)^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_3", +@rule ∫(((~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~g), (~m), (~x)) && + ext_isinteger((~p)) && + ( + gt((~p), 0) || + eq((~a), 0) && + ext_isinteger((~m)) + ) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~f) + (~g)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_3_4", +@rule ∫(((~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~e), (~f), (~g), (~m), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~e)*(~x))^(~m)*((~f) + (~g)*(~x))*((~a) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_3_5", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~f) + (~!g)*(~x))*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~m) + 2*(~p) + 3, 0) && + eq(2*(~c)*(~f) - (~b)*(~g), 0) ? +-(~f)*(~g)*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~b)*((~p) + 1)*((~e)*(~f) - (~d)*(~g))) : nothing) + +("1_2_1_3_6", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq(2*(~c)*(~f) - (~b)*(~g), 0) && + lt((~p), -1) && + gt((~m), 0) ? +(~g)*((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*((~p) + 1)) - (~e)*(~g)*(~m)⨸(2*(~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_7", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~m) + 2*(~p) + 3, 0) && + !eq(2*(~c)*(~f) - (~b)*(~g), 0) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +-2*(~c)*((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*(2*(~c)*(~d) - (~b)*(~e))^2) + (2*(~c)*(~f) - (~b)*(~g))⨸(2*(~c)*(~d) - (~b)*(~e))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_8", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^ fracpart((~p))⨸((~c)^intpart((~p))*((~b)⨸2 + (~c)*(~x))^(2*fracpart((~p))))* ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))*((~b)⨸2 + (~c)*(~x))^(2*(~p)), (~x)) : nothing) + +("1_2_1_3_9", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) && + ( + gt((~p), 0) || + eq((~a), 0) && + ext_isinteger((~m)) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_3_10", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))*((~a) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_3_11", +@rule ∫(((~!d) + (~!e)*(~x))*((~f) + (~!g)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +(~e)*(~g)*(~x)⨸(~c) + 1⨸(~c)*∫(((~c)*(~d)*(~f) - (~a)*(~e)*(~g) + ((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))*(~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_3_12", +@rule ∫(((~!d) + (~!e)*(~x))*((~f) + (~!g)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) ? +(~e)*(~g)*(~x)⨸(~c) + 1⨸(~c)*∫(((~c)*(~d)*(~f) - (~a)*(~e)*(~g) + (~c)*((~e)*(~f) + (~d)*(~g))*(~x))⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_3_13", +@rule ∫(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~b)^2*(~e)*(~g)*((~p) + 2) - 2*(~a)*(~c)*(~e)*(~g) + (~c)*(2*(~c)*(~d)*(~f) - (~b)*((~e)*(~f) + (~d)*(~g)))*(2*(~p) + 3), 0) && + !eq((~p), -1) ? +-((~b)*(~e)*(~g)*((~p) + 2) - (~c)*((~e)*(~f) + (~d)*(~g))*(2*(~p) + 3) - 2*(~c)*(~e)*(~g)*((~p) + 1)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(2* (~c)^2*((~p) + 1)*(2*(~p) + 3)) : nothing) + +("1_2_1_3_14", +@rule ∫(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + eq((~a)*(~e)*(~g) - (~c)*(~d)*(~f)*(2*(~p) + 3), 0) && + !eq((~p), -1) ? +(((~e)*(~f) + (~d)*(~g))*(2*(~p) + 3) + 2*(~e)*(~g)*((~p) + 1)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*((~p) + 1)*(2*(~p) + 3)) : nothing) + +("1_2_1_3_15", +@rule ∫(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) ? +-(2*(~a)*(~c)*((~e)*(~f) + (~d)*(~g)) - (~b)*((~c)*(~d)*(~f) + (~a)*(~e)*(~g)) - ((~b)^2*(~e)*(~g) - (~b)*(~c)*((~e)*(~f) + (~d)*(~g)) + 2*(~c)*((~c)*(~d)*(~f) - (~a)*(~e)*(~g)))*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - ((~b)^2*(~e)*(~g)*((~p) + 2) - 2*(~a)*(~c)*(~e)*(~g) + (~c)*(2*(~c)*(~d)*(~f) - (~b)*((~e)*(~f) + (~d)*(~g)))*(2*(~p) + 3))⨸((~c)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))*∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_16", +@rule ∫(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + lt((~p), -1) ? +((~a)*((~e)*(~f) + (~d)*(~g)) - ((~c)*(~d)*(~f) - (~a)*(~e)*(~g))*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)* (~c)*((~p) + 1)) - ((~a)*(~e)*(~g) - (~c)*(~d)*(~f)*(2*(~p) + 3))⨸(2*(~a)*(~c)*((~p) + 1))* ∫(((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_17", +@rule ∫(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(le((~p), -1)) ? +-((~b)*(~e)*(~g)*((~p) + 2) - (~c)*((~e)*(~f) + (~d)*(~g))*(2*(~p) + 3) - 2*(~c)*(~e)*(~g)*((~p) + 1)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(2* (~c)^2*((~p) + 1)*(2*(~p) + 3)) + ((~b)^2*(~e)*(~g)*((~p) + 2) - 2*(~a)*(~c)*(~e)*(~g) + (~c)*(2*(~c)*(~d)*(~f) - (~b)*((~e)*(~f) + (~d)*(~g)))*(2*(~p) + 3))⨸(2*(~c)^2*(2*(~p) + 3))* ∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_18", +@rule ∫(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !(le((~p), -1)) ? +(((~e)*(~f) + (~d)*(~g))*(2*(~p) + 3) + 2*(~e)*(~g)*((~p) + 1)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*((~p) + 1)*(2*(~p) + 3)) - ((~a)*(~e)*(~g) - (~c)*(~d)*(~f)*(2*(~p) + 3))⨸((~c)*(2*(~p) + 3))*∫(((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_19", +@rule ∫(((~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))*((~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~b), (~c), (~e), (~f), (~g), (~m), (~x)) && + ext_isinteger((~p)) ? +1⨸(~e)^(~p)*∫(((~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))*((~b) + (~c)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_3_20", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_3_21", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ( + ext_isinteger((~p)) || + gt((~a), 0) && + gt((~d), 0) && + eq((~m) + (~p), 0) + ) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_3_22", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger(2*(~p))) && + ilt((~m), 0) ? +(~d)^(~m)*(~e)^(~m)* ∫(((~f) + (~g)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~m) + (~p))⨸((~a)*(~e) + (~c)*(~d)*(~x))^(~m), (~x)) : nothing) + +("1_2_1_3_23", +@rule ∫((~x)*((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~m), 0) && + eq((~m), -1) && + !(ilt((~p) - 1/2, 0)) ? +(~d)^(~m)*(~e)^(~m)*∫((~x)*((~a) + (~c)*(~x)^2)^((~m) + (~p))⨸((~a)*(~e) + (~c)*(~d)*(~x))^(~m), (~x)) : nothing) + +("1_2_1_3_24", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + eq((~m)*((~g)*((~c)*(~d) - (~b)*(~e)) + (~c)*(~e)*(~f)) + (~e)*((~p) + 1)*(2*(~c)*(~f) - (~b)*(~g)), 0) ? +(~g)*((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 2)) : nothing) + +("1_2_1_3_25", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq((~m)*((~d)*(~g) + (~e)*(~f)) + 2*(~e)*(~f)*((~p) + 1), 0) ? +(~g)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 2)) : nothing) + +("1_2_1_3_26", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 0) ? +((~g)*((~c)*(~d) - (~b)*(~e)) + (~c)*(~e)*(~f))*((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)*(2*(~c)*(~d) - (~b)*(~e))) - (~e)*((~m)*((~g)*((~c)*(~d) - (~b)*(~e)) + (~c)*(~e)*(~f)) + (~e)*((~p) + 1)*(2*(~c)*(~f) - (~b)*(~g)))⨸((~c)*((~p) + 1)*(2*(~c)*(~d) - (~b)*(~e)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_27", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 0) ? +((~d)*(~g) + (~e)*(~f))*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*(~d)*((~p) + 1)) - (~e)*((~m)*((~d)*(~g) + (~e)*(~f)) + 2*(~e)*(~f)*((~p) + 1))⨸(2*(~c)*(~d)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_28", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + sumsimpler((~p), 1) && + sumsimpler((~m), -1) && + !eq((~p), -1) ? +((~g)*((~c)*(~d) - (~b)*(~e)) + (~c)*(~e)*(~f))*((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)*(2*(~c)*(~d) - (~b)*(~e))) - (~e)*((~m)*((~g)*((~c)*(~d) - (~b)*(~e)) + (~c)*(~e)*(~f)) + (~e)*((~p) + 1)*(2*(~c)*(~f) - (~b)*(~g)))⨸((~c)*((~p) + 1)*(2*(~c)*(~d) - (~b)*(~e)))* ∫(((~d) + (~e)*(~x))^simplify((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ simplify((~p) + 1), (~x)) : nothing) + +("1_2_1_3_29", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + sumsimpler((~p), 1) && + sumsimpler((~m), -1) && + !eq((~p), -1) && + !(igt((~m), 0)) ? +((~d)*(~g) + (~e)*(~f))*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*(~d)*((~p) + 1)) - (~e)*((~m)*((~d)*(~g) + (~e)*(~f)) + 2*(~e)*(~f)*((~p) + 1))⨸(2*(~c)*(~d)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^simplify((~m) - 1)*((~a) + (~c)*(~x)^2)^simplify((~p) + 1), (~x)) : nothing) + +("1_2_1_3_30", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ( + lt((~m), -1) && + !(igt((~m) + (~p) + 1, 0)) || + lt((~m), 0) && + lt((~p), -1) || + eq((~m) + 2*(~p) + 2, 0) + ) && + !eq((~m) + (~p) + 1, 0) ? +((~d)*(~g) - (~e)*(~f))*((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((2*(~c)*(~d) - (~b)*(~e))*((~m) + (~p) + 1)) + ((~m)*((~g)*((~c)*(~d) - (~b)*(~e)) + (~c)*(~e)*(~f)) + (~e)*((~p) + 1)*(2*(~c)*(~f) - (~b)*(~g)))⨸((~e)*(2*(~c)*(~d) - (~b)*(~e))*((~m) + (~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_31", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ( + lt((~m), -1) && + !(igt((~m) + (~p) + 1, 0)) || + lt((~m), 0) && + lt((~p), -1) || + eq((~m) + 2*(~p) + 2, 0) + ) && + !eq((~m) + (~p) + 1, 0) ? +((~d)*(~g) - (~e)*(~f))*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~c)*(~d)*((~m) + (~p) + 1)) + ((~m)*((~g)*(~c)*(~d) + (~c)*(~e)*(~f)) + 2*(~e)*(~c)*(~f)*((~p) + 1))⨸((~e)*(2*(~c)*(~d))*((~m) + (~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_32", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq((~m) + 2*(~p) + 2, 0) && + ( + !eq((~m), 2) || + eq((~d), 0) + ) ? +(~g)*((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 2)) + ((~m)*((~g)*((~c)*(~d) - (~b)*(~e)) + (~c)*(~e)*(~f)) + (~e)*((~p) + 1)*(2*(~c)*(~f) - (~b)*(~g)))⨸((~c)* (~e)*((~m) + 2*(~p) + 2))*∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_33", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !eq((~m) + 2*(~p) + 2, 0) && + !eq((~m), 2) ? +(~g)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 2)) + ((~m)*((~d)*(~g) + (~e)*(~f)) + 2*(~e)*(~f)*((~p) + 1))⨸((~e)*((~m) + 2*(~p) + 2))* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_34", +@rule ∫((~x)^2*((~f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~f), (~g), (~x)) && + eq((~a)*(~g)^2 + (~f)^2*(~c), 0) && + lt((~p), -2) ? +(~x)^2*((~a)*(~g) - (~c)*(~f)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*(~c)*((~p) + 1)) - 1⨸(2*(~a)*(~c)*((~p) + 1))* ∫((~x)*simp(2*(~a)*(~g) - (~c)*(~f)*(2*(~p) + 5)*(~x), (~x))*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_35", +@rule ∫((~x)^2*((~f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~f), (~g), (~p), (~x)) && + eq((~a)*(~g)^2 + (~f)^2*(~c), 0) ? +1⨸(~c)*∫(((~f) + (~g)*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) - (~a)⨸(~c)*∫(((~f) + (~g)*(~x))*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_36", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~f)^2 - (~b)*(~f)*(~g) + (~a)*(~g)^2, 0) && + ext_isinteger((~p)) ? +∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~p) + 1)*((~a)⨸(~f) + (~c)⨸(~g)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_3_37", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + eq((~c)*(~f)^2 + (~a)*(~g)^2, 0) && + ( + ext_isinteger((~p)) || + gt((~a), 0) && + gt((~f), 0) && + eq((~p), -1) + ) ? +∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~p) + 1)*((~a)⨸(~f) + (~c)⨸(~g)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_3_38", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~m)) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_3_39", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~m)) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))⨸((~a) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_3_40", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + eq(simplify((~m) + 2*(~p) + 3), 0) && + eq((~b)*((~e)*(~f) + (~d)*(~g)) - 2*((~c)*(~d)*(~f) + (~a)*(~e)*(~g)), 0) ? +-((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(2*((~p) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) : nothing) + +("1_2_1_3_41", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq(simplify((~m) + 2*(~p) + 3), 0) && + eq((~c)*(~d)*(~f) + (~a)*(~e)*(~g), 0) ? +-((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*((~p) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) : nothing) + +("1_2_1_3_42", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + eq(simplify((~m) + 2*(~p) + 3), 0) && + lt((~p), -1) ? +((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)*((~b)*(~f) - 2*(~a)*(~g) + (2*(~c)*(~f) - (~b)*(~g))*(~x))⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - (~m)*((~b)*((~e)*(~f) + (~d)*(~g)) - 2*((~c)*(~d)*(~f) + (~a)*(~e)*(~g)))⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_43", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq(simplify((~m) + 2*(~p) + 3), 0) && + lt((~p), -1) ? +((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)*((~a)*(~g) - (~c)*(~f)*(~x))⨸(2*(~a)*(~c)*((~p) + 1)) - (~m)*((~c)*(~d)*(~f) + (~a)*(~e)*(~g))⨸(2*(~a)*(~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_3_44", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + eq(simplify((~m) + 2*(~p) + 3), 0) ? +-((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(2*((~p) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) - ((~b)*((~e)*(~f) + (~d)*(~g)) - 2*((~c)*(~d)*(~f) + (~a)*(~e)*(~g)))⨸(2*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_45", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq(simplify((~m) + 2*(~p) + 3), 0) ? +-((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*((~p) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + ((~c)*(~d)*(~f) + (~a)*(~e)*(~g))⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_46", +@rule ∫(((~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~e), (~f), (~g), (~p), (~x)) && + !(isrational((~m))) && + !(igt((~p), 0)) ? +(~f)*∫(((~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)) + (~g)⨸(~e)*∫(((~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_47", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~m), (~p)) && + eq((~b)*(~d) + (~a)*(~e), 0) && + eq((~c)*(~d) + (~b)*(~e), 0) ? +((~d) + (~e)*(~x))^ fracpart((~p))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^fracpart((~p))⨸((~a)*(~d) + (~c)*(~e)*(~x)^3)^ fracpart((~p))*∫(((~f) + (~g)*(~x))*((~a)*(~d) + (~c)*(~e)*(~x)^3)^(~p), (~x)) : nothing) + +("1_2_1_3_48", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + gt((~p), 0) && + lt((~m), -2) && + lt((~m) + 2*(~p), 0) && + !(ilt((~m) + 2*(~p) + 3, 0)) ? +-((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ (~p)⨸((~e)^2*((~m) + 1)*((~m) + 2)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* (((~d)*(~g) - (~e)*(~f)*((~m) + 2))*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2) - (~d)*(~p)*(2*(~c)*(~d) - (~b)*(~e))*((~e)*(~f) - (~d)*(~g)) - (~e)*((~g)*((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2) + (~p)*(2*(~c)*(~d) - (~b)*(~e))*((~e)*(~f) - (~d)*(~g)))*(~x)) - (~p)⨸((~e)^2*((~m) + 1)*((~m) + 2)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1)* simp(2*(~a)*(~c)*(~e)*((~e)*(~f) - (~d)*(~g))*((~m) + 2) + (~b)^2*(~e)*((~d)*(~g)*((~p) + 1) - (~e)*(~f)*((~m) + (~p) + 2)) + (~b)*((~a)*(~e)^2*(~g)*((~m) + 1) - (~c)*(~d)*((~d)*(~g)*(2*(~p) + 1) - (~e)*(~f)*((~m) + 2*(~p) + 2))) - (~c)*(2*(~c)*(~d)*((~d)*(~g)*(2*(~p) + 1) - (~e)*(~f)*((~m) + 2*(~p) + 2)) - (~e)*(2*(~a)*(~e)*(~g)*((~m) + 1) - (~b)*((~d)*(~g)*((~m) - 2*(~p)) + (~e)*(~f)*((~m) + 2*(~p) + 2))))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_49", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~p), 0) && + lt((~m), -2) && + lt((~m) + 2*(~p), 0) && + !(ilt((~m) + 2*(~p) + 3, 0)) ? +-((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^ (~p)⨸((~e)^2*((~m) + 1)*((~m) + 2)*((~c)*(~d)^2 + (~a)*(~e)^2))* (((~d)*(~g) - (~e)*(~f)*((~m) + 2))*((~c)*(~d)^2 + (~a)*(~e)^2) - 2*(~c)*(~d)^2*(~p)*((~e)*(~f) - (~d)*(~g)) - (~e)*((~g)*((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2) + 2*(~c)*(~d)*(~p)*((~e)*(~f) - (~d)*(~g)))*(~x)) - (~p)⨸((~e)^2*((~m) + 1)*((~m) + 2)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*((~a) + (~c)*(~x)^2)^((~p) - 1)* simp(2*(~a)*(~c)*(~e)*((~e)*(~f) - (~d)*(~g))*((~m) + 2) - (~c)*(2*(~c)*(~d)*((~d)*(~g)*(2*(~p) + 1) - (~e)*(~f)*((~m) + 2*(~p) + 2)) - 2*(~a)*(~e)^2*(~g)*((~m) + 1))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_50", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + isrational((~p)) && + (~p) > 0 && + ( + lt((~m), -1) || + eq((~p), 1) || + ext_isinteger((~p)) && + !(isrational((~m))) + ) && + !eq((~m), -1) && + !(ilt((~m) + 2*(~p) + 1, 0)) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~e)*(~f)*((~m) + 2*(~p) + 2) - (~d)*(~g)*(2*(~p) + 1) + (~e)*(~g)*((~m) + 1)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~e)^2*((~m) + 1)*((~m) + 2*(~p) + 2)) + (~p)⨸((~e)^2*((~m) + 1)*((~m) + 2*(~p) + 2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1)* simp((~g)*((~b)*(~d) + 2*(~a)*(~e) + 2*(~a)*(~e)*(~m) + 2*(~b)*(~d)*(~p)) - (~f)*(~b)*(~e)*((~m) + 2*(~p) + 2) + ((~g)*(2*(~c)*(~d) + (~b)*(~e) + (~b)*(~e)*(~m) + 4*(~c)*(~d)*(~p)) - 2*(~c)*(~e)*(~f)*((~m) + 2*(~p) + 2))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_51", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + isrational((~p)) && + (~p) > 0 && + ( + lt((~m), -1) || + eq((~p), 1) || + ext_isinteger((~p)) && + !(isrational((~m))) + ) && + !eq((~m), -1) && + !(ilt((~m) + 2*(~p) + 1, 0)) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~e)*(~f)*((~m) + 2*(~p) + 2) - (~d)*(~g)*(2*(~p) + 1) + (~e)*(~g)*((~m) + 1)*(~x))*((~a) + (~c)*(~x)^2)^(~p)⨸((~e)^2*((~m) + 1)*((~m) + 2*(~p) + 2)) + (~p)⨸((~e)^2*((~m) + 1)*((~m) + 2*(~p) + 2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) - 1)* simp((~g)*(2*(~a)*(~e) + 2*(~a)*(~e)*(~m)) + ((~g)*(2*(~c)*(~d) + 4*(~c)*(~d)*(~p)) - 2*(~c)*(~e)*(~f)*((~m) + 2*(~p) + 2))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_52", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + gt((~p), 0) && + ( + ext_isinteger((~p)) || + !(isrational((~m))) || + ge((~m), -1) && + lt((~m), 0) + ) && + !(ilt((~m) + 2*(~p), 0)) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~c)*(~e)*(~f)*((~m) + 2*(~p) + 2) - (~g)*((~c)*(~d) + 2*(~c)*(~d)*(~p) - (~b)*(~e)*(~p)) + (~g)*(~c)*(~e)*((~m) + 2*(~p) + 1)*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸ ((~c)*(~e)^2*((~m) + 2*(~p) + 1)*((~m) + 2*(~p) + 2)) - (~p)⨸((~c)*(~e)^2*((~m) + 2*(~p) + 1)*((~m) + 2*(~p) + 2))* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1)* simp((~c)*(~e)*(~f)*((~b)*(~d) - 2*(~a)*(~e))*((~m) + 2*(~p) + 2) + (~g)*((~a)*(~e)*((~b)*(~e) - 2*(~c)*(~d)*(~m) + (~b)*(~e)*(~m)) + (~b)*(~d)*((~b)*(~e)*(~p) - (~c)*(~d) - 2*(~c)*(~d)*(~p))) + ((~c)*(~e)*(~f)*(2*(~c)*(~d) - (~b)*(~e))*((~m) + 2*(~p) + 2) + (~g)*((~b)^2*(~e)^2*((~p) + (~m) + 1) - 2*(~c)^2*(~d)^2*(1 + 2*(~p)) - (~c)*(~e)*((~b)*(~d)*((~m) - 2*(~p)) + 2*(~a)*(~e)*((~m) + 2*(~p) + 1))))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_53", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~p), 0) && + ( + ext_isinteger((~p)) || + !(isrational((~m))) || + ge((~m), -1) && + lt((~m), 0) + ) && + !(ilt((~m) + 2*(~p), 0)) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~c)*(~e)*(~f)*((~m) + 2*(~p) + 2) - (~g)*(~c)*(~d)*(2*(~p) + 1) + (~g)*(~c)*(~e)*((~m) + 2*(~p) + 1)*(~x))*((~a) + (~c)*(~x)^2)^(~p)⨸ ((~c)*(~e)^2*((~m) + 2*(~p) + 1)*((~m) + 2*(~p) + 2)) + 2*(~p)⨸((~c)*(~e)^2*((~m) + 2*(~p) + 1)*((~m) + 2*(~p) + 2))* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) - 1)* simp((~f)*(~a)*(~c)*(~e)^2*((~m) + 2*(~p) + 2) + (~a)*(~c)*(~d)*(~e)*(~g)* (~m) - ((~c)^2*(~f)*(~d)*(~e)*((~m) + 2*(~p) + 2) - (~g)*((~c)^2*(~d)^2*(2*(~p) + 1) + (~a)*(~c)*(~e)^2*((~m) + 2*(~p) + 1)))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_54", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ilt((~p), -1) && + igt((~m), 0) && + isrational((~a), (~b), (~c), (~d), (~e), (~f), (~g)) ? +∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)*ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x)), (~x)), (~x)) : nothing) + +("1_2_1_3_55", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ilt((~p), -1) && + igt((~m), 0) && + isrational((~a), (~c), (~d), (~e), (~f), (~g)) ? +∫(((~a) + (~c)*(~x)^2)^(~p)*ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x)), (~x)), (~x)) : nothing) + +("1_2_1_3_56", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 1) && + ( + eq((~m), 2) && + eq((~p), -3) && + isrational((~a), (~b), (~c), (~d), (~e), (~f), (~g)) || + !(ilt((~m) + 2*(~p) + 3, 0)) + ) ? +-((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)*(2*(~a)*(~c)*((~e)*(~f) + (~d)*(~g)) - (~b)*((~c)*(~d)*(~f) + (~a)*(~e)*(~g)) - (2*(~c)^2*(~d)*(~f) + (~b)^2*(~e)*(~g) - (~c)*((~b)*(~e)*(~f) + (~b)*(~d)*(~g) + 2*(~a)*(~e)*(~g)))*(~x))⨸ ((~c)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - 1⨸((~c)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)* simp(2*(~c)^2*(~d)^2*(~f)*(2*(~p) + 3) + (~b)*(~e)*(~g)*((~a)*(~e)*((~m) - 1) + (~b)*(~d)*((~p) + 2)) - (~c)*(2*(~a)*(~e)*((~e)*(~f)*((~m) - 1) + (~d)*(~g)*(~m)) + (~b)*(~d)*((~d)*(~g)*(2*(~p) + 3) - (~e)*(~f)*((~m) - 2*(~p) - 4))) + (~e)*((~b)^2*(~e)*(~g)*((~m) + (~p) + 1) + 2*(~c)^2*(~d)*(~f)*((~m) + 2*(~p) + 2) - (~c)*(2*(~a)*(~e)*(~g)*(~m) + (~b)*((~e)*(~f) + (~d)*(~g))*((~m) + 2*(~p) + 2)))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_57", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 1) && + ( + eq((~d), 0) || + eq((~m), 2) && + eq((~p), -3) && + isrational((~a), (~c), (~d), (~e), (~f), (~g)) || + !(ilt((~m) + 2*(~p) + 3, 0)) + ) ? +((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)*((~a)*((~e)*(~f) + (~d)*(~g)) - ((~c)*(~d)*(~f) - (~a)*(~e)*(~g))*(~x))⨸(2*(~a)*(~c)*((~p) + 1)) - 1⨸(2*(~a)*(~c)*((~p) + 1))*∫(((~d) + (~e)*(~x))^((~m) - 2)*((~a) + (~c)*(~x)^2)^((~p) + 1)* simp((~a)*(~e)*((~e)*(~f)*((~m) - 1) + (~d)*(~g)*(~m)) - (~c)*(~d)^2*(~f)*(2*(~p) + 3) + (~e)*((~a)*(~e)*(~g)*(~m) - (~c)*(~d)*(~f)*((~m) + 2*(~p) + 2))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_58", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 0) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)*((~f)*(~b) - 2*(~a)*(~g) + (2*(~c)*(~f) - (~b)*(~g))*(~x))⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)* simp((~g)*(2*(~a)*(~e)*(~m) + (~b)*(~d)*(2*(~p) + 3)) - (~f)*((~b)*(~e)*(~m) + 2*(~c)*(~d)*(2*(~p) + 3)) - (~e)*(2*(~c)*(~f) - (~b)*(~g))*((~m) + 2*(~p) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_59", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + gt((~m), 0) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)*((~a)*(~g) - (~c)*(~f)*(~x))⨸(2*(~a)*(~c)*((~p) + 1)) - 1⨸(2*(~a)*(~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)* simp((~a)*(~e)*(~g)*(~m) - (~c)*(~d)*(~f)*(2*(~p) + 3) - (~c)*(~e)*(~f)*((~m) + 2*(~p) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_60", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~p), -1) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~f)*((~b)*(~c)*(~d) - (~b)^2*(~e) + 2*(~a)*(~c)*(~e)) - (~a)*(~g)*(2*(~c)*(~d) - (~b)*(~e)) + (~c)*((~f)*(2*(~c)*(~d) - (~b)*(~e)) - (~g)*((~b)*(~d) - 2*(~a)*(~e)))* (~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸ (((~p) + 1)*((~b)^2 - 4*(~a)*(~c))*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c))*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)* simp((~f)*((~b)*(~c)*(~d)*(~e)*(2*(~p) - (~m) + 2) + (~b)^2*(~e)^2*((~p) + (~m) + 2) - 2*(~c)^2*(~d)^2*(2*(~p) + 3) - 2*(~a)*(~c)*(~e)^2*((~m) + 2*(~p) + 3)) - (~g)*((~a)*(~e)*((~b)*(~e) - 2*(~c)*(~d)*(~m) + (~b)*(~e)*(~m)) - (~b)*(~d)*(3*(~c)*(~d) - (~b)*(~e) + 2*(~c)*(~d)*(~p) - (~b)*(~e)*(~p))) + (~c)*(~e)*((~g)*((~b)*(~d) - 2*(~a)*(~e)) - (~f)*(2*(~c)*(~d) - (~b)*(~e)))*((~m) + 2*(~p) + 4)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_61", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +-((~d) + (~e)*(~x))^((~m) + 1)*((~f)*(~a)*(~c)*(~e) - (~a)*(~g)*(~c)*(~d) + (~c)*((~c)*(~d)*(~f) + (~a)*(~e)*(~g))*(~x))*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)* (~c)*((~p) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸(2*(~a)*(~c)*((~p) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)* simp((~f)*((~c)^2*(~d)^2*(2*(~p) + 3) + (~a)*(~c)*(~e)^2*((~m) + 2*(~p) + 3)) - (~a)*(~c)*(~d)*(~e)*(~g)*(~m) + (~c)*(~e)*((~c)*(~d)*(~f) + (~a)*(~e)*(~g))*((~m) + 2*(~p) + 4)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_62", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + isfraction((~m)) && + gt((~m), 0) ? +(~g)*((~d) + (~e)*(~x))^(~m)⨸((~c)*(~m)) + 1⨸(~c)* ∫(((~d) + (~e)*(~x))^((~m) - 1)* simp((~c)*(~d)*(~f) - (~a)*(~e)*(~g) + ((~g)*(~c)*(~d) - (~b)*(~e)*(~g) + (~c)*(~e)*(~f))*(~x), (~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_3_63", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + isfraction((~m)) && + gt((~m), 0) ? +(~g)*((~d) + (~e)*(~x))^(~m)⨸((~c)*(~m)) + 1⨸(~c)* ∫(((~d) + (~e)*(~x))^((~m) - 1)* simp((~c)*(~d)*(~f) - (~a)*(~e)*(~g) + ((~g)*(~c)*(~d) + (~c)*(~e)*(~f))*(~x), (~x))⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_3_64", +@rule ∫(((~!f) + (~!g)*(~x))/(sqrt((~!d) + (~!e)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +2*int_and_subst(((~e)*(~f) - (~d)*(~g) + (~g)*(~x)^2)⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2 - (2*(~c)*(~d) - (~b)*(~e))*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_3_64") : nothing) + +("1_2_1_3_65", +@rule ∫(((~!f) + (~!g)*(~x))/(sqrt((~!d) + (~!e)*(~x))*((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +2*int_and_subst(((~e)*(~f) - (~d)*(~g) + (~g)*(~x)^2)⨸((~c)*(~d)^2 + (~a)*(~e)^2 - 2*(~c)*(~d)*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~d) + (~e)*(~x)), "1_2_1_3_65") : nothing) + +("1_2_1_3_66", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + isfraction((~m)) && + lt((~m), -1) ? +((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~d) + (~e)*(~x))^((~m) + 1)* simp((~c)*(~d)*(~f) - (~f)*(~b)*(~e) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x), (~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_3_67", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + isfraction((~m)) && + lt((~m), -1) ? +((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~d) + (~e)*(~x))^((~m) + 1)* simp((~c)*(~d)*(~f) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x), (~x))⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_3_68", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(isrational((~m))) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m), ((~f) + (~g)*(~x))⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_3_69", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(isrational((~m))) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m), ((~f) + (~g)*(~x))⨸((~a) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_3_70", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + gt((~m), 0) && + !eq((~m) + 2*(~p) + 2, 0) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) && + !( + igt((~m), 0) && + eq((~f), 0) + ) ? +(~g)*((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 2)) + 1⨸((~c)*((~m) + 2*(~p) + 2))*∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)* simp((~m)*((~c)*(~d)*(~f) - (~a)*(~e)*(~g)) + (~d)*(2*(~c)*(~f) - (~b)*(~g))*((~p) + 1) + ((~m)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g)) + (~e)*((~p) + 1)*(2*(~c)*(~f) - (~b)*(~g)))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_71", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~m), 0) && + !eq((~m) + 2*(~p) + 2, 0) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) && + !( + igt((~m), 0) && + eq((~f), 0) + ) ? +(~g)*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) + 2*(~p) + 2)) + 1⨸((~c)*((~m) + 2*(~p) + 2))*∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^(~p)* simp((~c)*(~d)*(~f)*((~m) + 2*(~p) + 2) - (~a)*(~e)*(~g)*(~m) + (~c)*((~e)*(~f)*((~m) + 2*(~p) + 2) + (~d)*(~g)*(~m))*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_72", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~m), -1) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)* simp(((~c)*(~d)*(~f) - (~f)*(~b)*(~e) + (~a)*(~e)*(~g))*((~m) + 1) + (~b)*((~d)*(~g) - (~e)*(~f))*((~p) + 1) - (~c)*((~e)*(~f) - (~d)*(~g))*((~m) + 2*(~p) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_73", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~m), -1) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + ext_isinteger(2*(~m), 2*(~p)) + ) ? +((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p)* simp(((~c)*(~d)*(~f) + (~a)*(~e)*(~g))*((~m) + 1) - (~c)*((~e)*(~f) - (~d)*(~g))*((~m) + 2*(~p) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_74", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ilt(simplify((~m) + 2*(~p) + 3), 0) && + !eq((~m), -1) ? +((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)* simp(((~c)*(~d)*(~f) - (~f)*(~b)*(~e) + (~a)*(~e)*(~g))*((~m) + 1) + (~b)*((~d)*(~g) - (~e)*(~f))*((~p) + 1) - (~c)*((~e)*(~f) - (~d)*(~g))*((~m) + 2*(~p) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_75", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ilt(simplify((~m) + 2*(~p) + 3), 0) && + !eq((~m), -1) ? +((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p)* simp(((~c)*(~d)*(~f) + (~a)*(~e)*(~g))*((~m) + 1) - (~c)*((~e)*(~f) - (~d)*(~g))*((~m) + 2*(~p) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_3_76", +@rule ∫(((~f) + (~!g)*(~x))/(((~!d) + (~!e)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq(4*(~c)*((~a) - (~d)) - ((~b) - (~e))^2, 0) && + eq((~e)*(~f)*((~b) - (~e)) - 2*(~g)*((~b)*(~d) - (~a)*(~e)), 0) && + !eq((~b)*(~d) - (~a)*(~e), 0) ? +4*(~f)*((~a) - (~d))⨸((~b)*(~d) - (~a)*(~e))* int_and_subst(1⨸(4*((~a) - (~d)) - (~x)^2), (~x), (~x), (2*((~a) - (~d)) + ((~b) - (~e))*(~x))⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2), "1_2_1_3_76") : nothing) + +("1_2_1_3_77", +@rule ∫(((~f) + (~!g)*(~x))/(sqrt((~x))*sqrt((~a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +2*int_and_subst(((~f) + (~g)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x), (~x), sqrt((~x)), "1_2_1_3_77") : nothing) + +("1_2_1_3_78", +@rule ∫(((~f) + (~!g)*(~x))/(sqrt((~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~f), (~g), (~x)) ? +2*int_and_subst(((~f) + (~g)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x), (~x), sqrt((~x)), "1_2_1_3_78") : nothing) + +("1_2_1_3_79", +@rule ∫(((~f) + (~!g)*(~x))/(sqrt((~e)*(~x))*sqrt((~a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +sqrt((~x))⨸sqrt((~e)*(~x))* ∫(((~f) + (~g)*(~x))⨸(sqrt((~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_3_80", +@rule ∫(((~f) + (~!g)*(~x))/(sqrt((~e)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~e), (~f), (~g), (~x)) ? +sqrt((~x))⨸sqrt((~e)*(~x))*∫(((~f) + (~g)*(~x))⨸(sqrt((~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_3_81", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(igt((~m), 0)) ? +(~g)⨸(~e)*∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) + ((~e)*(~f) - (~d)*(~g))⨸(~e)* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_3_82", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(igt((~m), 0)) ? +(~g)⨸(~e)*∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) + ((~e)*(~f) - (~d)*(~g))⨸(~e)* ∫(((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.4 (d+e x)^m (f+g x)^n (a+b x+c x^2)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.4 (d+e x)^m (f+g x)^n (a+b x+c x^2)^p.jl new file mode 100644 index 0000000..0d599d1 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.1 Quadratic/1.2.1.4 (d+e x)^m (f+g x)^n (a+b x+c x^2)^p.jl @@ -0,0 +1,1292 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.1.4 (d+e x)^m (f+g x)^n (a+b x+c x^2)^p *) +("1_2_1_4_1", +@rule ∫((~x)^(~!m)*((~f) + (~!g)*(~x))^(~!n)*((~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~b), (~c), (~f), (~g), (~m), (~n), (~x)) && + eq((~c)*(~f)*((~m) + 2) - (~b)*(~g)*((~m) + (~n) + 3), 0) && + !eq((~m) + (~n) + 3, 0) ? +(~c)*(~x)^((~m) + 2)*((~f) + (~g)*(~x))^((~n) + 1)⨸((~g)*((~m) + (~n) + 3)) : nothing) + +("1_2_1_4_2", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^ fracpart((~p))⨸((~c)^intpart((~p))*((~b)⨸2 + (~c)*(~x))^(2*fracpart((~p))))* ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~b)⨸2 + (~c)*(~x))^(2*(~p)), (~x)) : nothing) + +("1_2_1_4_3", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) && + !(igt((~n), 0)) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))^(~n)*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_4_4", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ( + ext_isinteger((~p)) || + gt((~a), 0) && + gt((~d), 0) && + eq((~m) + (~p), 0) + ) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))^(~n)*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_4_5", +@rule ∫((~x)^(~!n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ( + !(ext_isinteger((~n))) || + !(ext_isinteger(2*(~p))) || + igt((~n), 2) || + gt((~p), 0) && + !eq((~n), 2) + ) ? +∫((~x)^(~n)*((~a)⨸(~d) + (~c)*(~x)⨸(~e))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_6", +@rule ∫((~x)^(~!n)*((~a) + (~!c)*(~x)^2)^(~p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~n), (~p), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ( + !(ext_isinteger((~n))) || + !(ext_isinteger(2*(~p))) || + igt((~n), 2) || + gt((~p), 0) && + !eq((~n), 2) + ) ? +∫((~x)^(~n)*((~a)⨸(~d) + (~c)*(~x)⨸(~e))*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_7", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~m), 0) && + ext_isinteger((~n)) && + ( + lt((~n), 0) || + gt((~p), 0) + ) ? +∫(((~a)⨸(~d) + (~c)*(~x)⨸(~e))^(-(~m))*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~m) + (~p)), (~x)) : nothing) + +("1_2_1_4_8", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~f), 0) && + ilt((~m), -1) && + !( + igt((~n), 0) && + ilt((~m) + (~n), 0) && + !(gt((~p), 1)) + ) ? +(~d)^(2*(~m))⨸(~a)^(~m)*∫(((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^((~m) + (~p))⨸((~d) - (~e)*(~x))^(~m), (~x)) : nothing) + +("1_2_1_4_9", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~m), 0) && + ext_isinteger((~n)) ? +(~d)^(2*(~m))⨸(~a)^(~m)*∫(((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^((~m) + (~p))⨸((~d) - (~e)*(~x))^(~m), (~x)) : nothing) + +("1_2_1_4_10", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + igt((~n), 0) && + ilt((~n) + 2*(~p), 0) ? +-(2*(~c)*(~d) - (~b)*(~e))*((~f) + (~g)*(~x))^ (~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~e)*(~p)*((~b)^2 - 4*(~a)*(~c))*((~d) + (~e)*(~x))) - 1⨸((~d)*(~e)*(~p)*((~b)^2 - 4*(~a)*(~c)))*∫(((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)* simp((~b)*((~a)*(~e)*(~g)*(~n) - (~c)*(~d)*(~f)*(2*(~p) + 1)) - 2*(~a)*(~c)*((~d)*(~g)*(~n) - (~e)*(~f)*(2*(~p) + 1)) - (~c)*(~g)*((~b)*(~d) - 2*(~a)*(~e))*((~n) + 2*(~p) + 1)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_4_11", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + igt((~n), 0) && + ilt((~n) + 2*(~p), 0) ? +(~d)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*(~e)*(~p)*((~d) + (~e)*(~x))) - 1⨸(2*(~d)*(~e)*(~p))* ∫(((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~c)*(~x)^2)^(~p)* simp((~d)*(~g)*(~n) - (~e)*(~f)*(2*(~p) + 1) - (~e)*(~g)*((~n) + 2*(~p) + 1)*(~x), (~x)), (~x)) : nothing) + +("1_2_1_4_12", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~n), 0) && + ilt((~n) + 2*(~p), 0) && + !(igt((~n), 0)) ? +((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ (~p)*((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x))⨸((~p)*(2*(~c)*(~d) - (~b)*(~e))*((~e)*(~f) - (~d)*(~g))) + 1⨸((~p)*(2*(~c)*(~d) - (~b)*(~e))*((~e)*(~f) - (~d)*(~g)))* ∫(((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ (~p)*((~b)*(~e)*(~g)*((~n) + (~p) + 1) + (~c)*(~e)*(~f)*(2*(~p) + 1) - (~c)*(~d)*(~g)*((~n) + 2*(~p) + 1) + (~c)*(~e)*(~g)*((~n) + 2*(~p) + 2)*(~x)), (~x)) : nothing) + +("1_2_1_4_13", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~n), 0) && + ilt((~n) + 2*(~p), 0) && + !(igt((~n), 0)) ? +(~d)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)* (~p)*((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))) + 1⨸((~p)*(2*(~c)*(~d))*((~e)*(~f) - (~d)*(~g)))* ∫(((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^ (~p)*((~c)*(~e)*(~f)*(2*(~p) + 1) - (~c)*(~d)*(~g)*((~n) + 2*(~p) + 1) + (~c)*(~e)*(~g)*((~n) + 2*(~p) + 2)*(~x)), (~x)) : nothing) + +("1_2_1_4_14", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + eq((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g), 0) && + !eq((~m) - (~n) - 1, 0) ? +-(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^ (~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) - (~n) - 1)) : nothing) + +("1_2_1_4_15", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + eq((~e)*(~f) + (~d)*(~g), 0) && + !eq((~m) - (~n) - 1, 0) ? +-(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^ (~n)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) - (~n) - 1)) : nothing) + +("1_2_1_4_16", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + eq((~m) - (~n) - 2, 0) ? +-(~e)^2*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~n) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))) : nothing) + +("1_2_1_4_17", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + eq((~m) - (~n) - 2, 0) ? +-(~e)^2*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~n) + 1)*((~e)*(~f) + (~d)*(~g))) : nothing) + +("1_2_1_4_18", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + gt((~p), 0) && + lt((~n), -1) && + !( + ext_isinteger((~n) + (~p)) && + le((~n) + (~p) + 2, 0) + ) ? +((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~g)*((~n) + 1)) + (~c)*(~m)⨸((~e)*(~g)*((~n) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_19", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + gt((~p), 0) && + lt((~n), -1) && + !( + ext_isinteger((~n) + (~p)) && + le((~n) + (~p) + 2, 0) + ) ? +((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^(~p)⨸((~g)*((~n) + 1)) + (~c)*(~m)⨸((~e)*(~g)*((~n) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_20", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + gt((~p), 0) && + !eq((~m) - (~n) - 1, 0) && + !(igt((~n), 0)) && + !( + ext_isinteger((~n) + (~p)) && + lt((~n) + (~p) + 2, 0) + ) && + isrational((~n)) ? +-((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^ (~p)⨸((~g)*((~m) - (~n) - 1)) - (~m)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))⨸((~e)^2*(~g)*((~m) - (~n) - 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_21", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + gt((~p), 0) && + !eq((~m) - (~n) - 1, 0) && + !(igt((~n), 0)) && + !( + ext_isinteger((~n) + (~p)) && + lt((~n) + (~p) + 2, 0) + ) && + isrational((~n)) ? +-((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^(~p)⨸((~g)*((~m) - (~n) - 1)) - (~c)*(~m)*((~e)*(~f) + (~d)*(~g))⨸((~e)^2*(~g)*((~m) - (~n) - 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_22", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + lt((~p), -1) && + gt((~n), 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^ (~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) - (~e)*(~g)*(~n)⨸((~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_4_23", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + lt((~p), -1) && + gt((~n), 0) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)) - (~e)*(~g)*(~n)⨸((~c)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_4_24", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + lt((~p), -1) && + isrational((~n)) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~p) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))) + (~e)^2*(~g)*((~m) - (~n) - 2)⨸(((~p) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_4_25", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + lt((~p), -1) && + isrational((~n)) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~p) + 1)*((~e)*(~f) + (~d)*(~g))) + (~e)^2*(~g)*((~m) - (~n) - 2)⨸((~c)*((~p) + 1)*((~e)*(~f) + (~d)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^((~p) + 1), (~x)) : nothing) + +("1_2_1_4_26", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + gt((~n), 0) && + !eq((~m) - (~n) - 1, 0) && + ( + ext_isinteger(2*(~p)) || + ext_isinteger((~n)) + ) ? +-(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^ (~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) - (~n) - 1)) - (~n)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))⨸((~c)*(~e)*((~m) - (~n) - 1))* ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_27", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + gt((~n), 0) && + !eq((~m) - (~n) - 1, 0) && + ( + ext_isinteger(2*(~p)) || + ext_isinteger((~n)) + ) ? +-(~e)*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^ (~n)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*((~m) - (~n) - 1)) - (~n)*((~e)*(~f) + (~d)*(~g))⨸((~e)*((~m) - (~n) - 1))* ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_28", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + lt((~n), -1) && + ext_isinteger(2*(~p)) ? +-(~e)^2*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸(((~n) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))) - (~c)*(~e)*((~m) - (~n) - 2)⨸(((~n) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g)))* ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_29", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p), 0) && + lt((~n), -1) && + ext_isinteger(2*(~p)) ? +-(~e)^2*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(((~n) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g))) - (~e)*((~m) - (~n) - 2)⨸(((~n) + 1)*((~e)*(~f) + (~d)*(~g)))* ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_30", +@rule ∫(sqrt((~d) + (~!e)*(~x))/(((~!f) + (~!g)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +2*(~e)^2* int_and_subst(1⨸((~c)*((~e)*(~f) + (~d)*(~g)) - (~b)*(~e)*(~g) + (~e)^2*(~g)*(~x)^2), (~x), (~x), sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸sqrt((~d) + (~e)*(~x)), "1_2_1_4_30") : nothing) + +("1_2_1_4_31", +@rule ∫(sqrt((~d) + (~!e)*(~x))/(((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +2*(~e)^2* int_and_subst(1⨸((~c)*((~e)*(~f) + (~d)*(~g)) + (~e)^2*(~g)*(~x)^2), (~x), (~x), sqrt((~a) + (~c)*(~x)^2)⨸sqrt((~d) + (~e)*(~x)), "1_2_1_4_31") : nothing) + +("1_2_1_4_32", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) && + eq((~b)*(~e)*(~g)*((~n) + 1) + (~c)*(~e)*(~f)*((~p) + 1) - (~c)*(~d)*(~g)*(2*(~n) + (~p) + 3), 0) && + !eq((~n) + (~p) + 2, 0) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) - 2)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*(~g)*((~n) + (~p) + 2)) : nothing) + +("1_2_1_4_33", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) && + eq((~e)*(~f)*((~p) + 1) - (~d)*(~g)*(2*(~n) + (~p) + 3), 0) && + !eq((~n) + (~p) + 2, 0) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) - 2)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)* (~g)*((~n) + (~p) + 2)) : nothing) + +("1_2_1_4_34", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) && + lt((~n), -1) && + ext_isinteger(2*(~p)) ? +(~e)^2*((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) - 2)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~g)*((~n) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))) - (~e)*((~b)*(~e)*(~g)*((~n) + 1) + (~c)*(~e)*(~f)*((~p) + 1) - (~c)*(~d)*(~g)*(2*(~n) + (~p) + 3))⨸((~g)*((~n) + 1)*((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_35", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) && + lt((~n), -1) && + ext_isinteger(2*(~p)) ? +(~e)^2*((~e)*(~f) - (~d)*(~g))*((~d) + (~e)*(~x))^((~m) - 2)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)* (~g)*((~n) + 1)*((~e)*(~f) + (~d)*(~g))) - (~e)*((~e)*(~f)*((~p) + 1) - (~d)*(~g)*(2*(~n) + (~p) + 3))⨸((~g)*((~n) + 1)*((~e)*(~f) + (~d)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_36", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) && + !(lt((~n), -1)) && + ext_isinteger(2*(~p)) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) - 2)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*(~g)*((~n) + (~p) + 2)) - ((~b)*(~e)*(~g)*((~n) + 1) + (~c)*(~e)*(~f)*((~p) + 1) - (~c)*(~d)*(~g)*(2*(~n) + (~p) + 3))⨸((~c)* (~g)*((~n) + (~p) + 2))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_37", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) && + !(lt((~n), -1)) && + ext_isinteger(2*(~p)) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) - 2)*((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)* (~g)*((~n) + (~p) + 2)) - ((~e)*(~f)*((~p) + 1) - (~d)*(~g)*(2*(~n) + (~p) + 3))⨸((~g)*((~n) + (~p) + 2))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_38", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~m), 0) && + ( + ilt((~n), 0) || + igt((~n), 0) && + ilt((~p) + 1/2, 0) + ) && + !(igt((~n), 0)) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_39", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~p) - 1/2) && + ilt((~m), 0) && + ilt((~n), 0) && + !(igt((~n), 0)) ? +∫(ext_expand( 1⨸sqrt((~a) + (~c)*(~x)^2), ((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^((~p) + 1⨸2), (~x)), (~x)) : nothing) + +("1_2_1_4_40", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~m), 0) && + ( + ilt((~n), 0) || + igt((~n), 0) && + ilt((~p) + 1/2, 0) + ) && + !(igt((~n), 0)) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_41", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ilt((~p) + 1/2, 0) && + igt((~m), 0) && + igt((~n), 0) && + !(igt((~n), 0)) ? +poly_remainder(((~f) + (~g)*(~x))^(~n), (~a)*(~e) + (~c)*(~d)*(~x), (~x))*(2*(~c)*(~d) - (~b)*(~e))*((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~e)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)* expand_to_sum( (~d)*(~e)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))*poly_quotient(((~f) + (~g)*(~x))^(~n), (~a)*(~e) + (~c)*(~d)*(~x), (~x)) - poly_remainder(((~f) + (~g)*(~x))^(~n), (~a)*(~e) + (~c)*(~d)*(~x), (~x))*(2*(~c)*(~d) - (~b)*(~e))*((~m) + 2*(~p) + 2), (~x)), (~x)) : nothing) + +("1_2_1_4_42", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ilt((~p) + 1/2, 0) && + igt((~m), 0) && + igt((~n), 0) && + !(igt((~n), 0)) ? +-(~d)*poly_remainder(((~f) + (~g)*(~x))^(~n), (~a)*(~e) + (~c)*(~d)*(~x), (~x))*((~d) + (~e)*(~x))^(~m)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸(2*(~a)*(~e)*((~p) + 1)) + (~d)⨸(2*(~a)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)* expand_to_sum(2*(~a)*(~e)*((~p) + 1)*poly_quotient(((~f) + (~g)*(~x))^(~n), (~a)*(~e) + (~c)*(~d)*(~x), (~x)) + poly_remainder(((~f) + (~g)*(~x))^(~n), (~a)*(~e) + (~c)*(~d)*(~x), (~x))*((~m) + 2*(~p) + 2), (~x)), (~x)) : nothing) + +("1_2_1_4_43", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~n) + 2*(~p) + 1, 0) && + ilt((~m), 0) && + ilt((~n), 0) ? +∫(ext_expand(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), ((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n), (~x)), (~x)) : nothing) + +("1_2_1_4_44", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + eq((~m) + (~n) + 2*(~p) + 1, 0) && + ilt((~m), 0) && + ilt((~n), 0) ? +∫(ext_expand(((~a) + (~c)*(~x)^2)^(~p), ((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n), (~x)), (~x)) : nothing) + +#(* Int[(d_.+e_.*x_)^m_.*(f_.+g_.*x_)^n_*(a_.+b_.*x_+c_.*x_^2)^p_,x_ Symbol] := g^n*(d+e*x)^(m+n-1)*(a+b*x+c*x^2)^(p+1)/(c*e^(n-1)*(m+n+2*p+1)) + 1/(c*e^n*(m+n+2*p+1))*Int[(d+e*x)^m*(a+b*x+c*x^2)^p* ExpandToSum[c*e^n*(m+n+2*p+1)*(f+g*x)^n-c*g^n*(m+n+2*p+1)*(d+e*x)^ n+e*g^n*(m+p+n)*(d+e*x)^(n-2)*(b*d-2*a*e+(2*c*d-b*e)*x),x],x] /; FreeQ[{a,b,c,d,e,f,g,m,p},x] && NeQ[e*f-d*g,0] && NeQ[b^2-4*a*c,0] && EqQ[c*d^2-b*d*e+a*e^2,0] && Not[IntegerQ[p]] && NeQ[m+n+2*p+1,0] && IGtQ[n,0] *) +#(* Int[(d_.+e_.*x_)^m_.*(f_.+g_.*x_)^n_*(a_+c_.*x_^2)^p_,x_Symbol] := g^n*(d+e*x)^(m+n-1)*(a+c*x^2)^(p+1)/(c*e^(n-1)*(m+n+2*p+1)) + 1/(c*e^n*(m+n+2*p+1))*Int[(d+e*x)^m*(a+c*x^2)^p* ExpandToSum[c*e^n*(m+n+2*p+1)*(f+g*x)^n-c*g^n*(m+n+2*p+1)*(d+e*x)^ n-2*e*g^n*(m+p+n)*(d+e*x)^(n-2)*(a*e-c*d*x),x],x] /; FreeQ[{a,c,d,e,f,g,m,p},x] && NeQ[e*f-d*g,0] && EqQ[c*d^2+a*e^2,0] && Not[IntegerQ[p]] && NeQ[m+n+2*p+1,0] && IGtQ[n,0] *) +("1_2_1_4_45", +@rule ∫(((~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~b), (~c), (~e), (~f), (~g), (~m), (~n), (~x)) && + !(ext_isinteger((~p))) && + !(igt((~n), 0)) ? +((~e)*(~x))^(~m)*((~b)*(~x) + (~c)*(~x)^2)^(~p)⨸((~x)^((~m) + (~p))*((~b) + (~c)*(~x))^(~p))* ∫((~x)^((~m) + (~p))*((~f) + (~g)*(~x))^(~n)*((~b) + (~c)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_4_46", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + gt((~a), 0) && + gt((~d), 0) && + !(igt((~m), 0)) && + !(igt((~n), 0)) ? +∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))^(~n)*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +#(* original line: Int[(d_ + e_.*x_)^m_*(f_. + g_.*x_)^n_*(a_. + b_.*x_ + c_.*x_^2)^p_, x_Symbol] := (*(a+b*x+c*x^2)^p/((d+e*x)^p*(a*e+c*d*x)^p)*Int[(d+e*x)^(m+p)*(f+g*x) ^n*(a*e+c*d*x)^p,x] /; *) (a + b*x + c*x^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/e*x)^p, x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && Not[IntegerQ[p]] && Not[IGtQ[m, 0]] && Not[IGtQ[n, 0]] *) +("1_2_1_4_47", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + !(igt((~m), 0)) && + !(igt((~n), 0)) ? +((~a) + (~b)*(~x) + (~c)*(~x)^2)^ fracpart((~p))⨸(((~d) + (~e)*(~x))^fracpart((~p))*((~a)⨸(~d) + ((~c)*(~x))⨸(~e))^fracpart((~p)))* ∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))^(~n)*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_4_48", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + !(igt((~m), 0)) && + !(igt((~n), 0)) ? +((~a) + (~c)*(~x)^2)^ fracpart((~p))⨸(((~d) + (~e)*(~x))^fracpart((~p))*((~a)⨸(~d) + ((~c)*(~x))⨸(~e))^fracpart((~p)))* ∫(((~d) + (~e)*(~x))^((~m) + (~p))*((~f) + (~g)*(~x))^(~n)*((~a)⨸(~d) + (~c)⨸(~e)*(~x))^(~p), (~x)) : nothing) + +("1_2_1_4_49", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) && + ( + eq((~p), 1) && + ext_isinteger((~m), (~n)) || + ilt((~m), 0) && + ilt((~n), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_50", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) && + ( + eq((~p), 1) && + ext_isinteger((~m), (~n)) || + ilt((~m), 0) && + ilt((~n), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_51", +@rule ∫(((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + isfraction((~p)) && + gt((~p), 0) ? +((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) - 1⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(simp((~c)*(~d)*(~f) - (~b)*(~e)*(~f) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x), (~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1)⨸((~f) + (~g)*(~x)), (~x)) : nothing) + +("1_2_1_4_52", +@rule ∫(((~a) + (~!c)*(~x)^2)^(~p)/(((~!d) + (~!e)*(~x))*((~!f) + (~!g)*(~x))),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + isfraction((~p)) && + gt((~p), 0) ? +((~c)*(~d)^2 + (~a)*(~e)^2)⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(((~a) + (~c)*(~x)^2)^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) - 1⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(simp((~c)*(~d)*(~f) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x), (~x))*((~a) + (~c)*(~x)^2)^((~p) - 1)⨸((~f) + (~g)*(~x)), (~x)) : nothing) + +("1_2_1_4_53", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~n), (~p)) && + isfraction((~m)) ? +ext_den((~m))⨸(~e)*int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*(((~e)*(~f) - (~d)*(~g))⨸(~e) + (~g)*(~x)^ext_den((~m))⨸(~e))^(~n)* (((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸(~e)^2 - (2*(~c)*(~d) - (~b)*(~e))*(~x)^ext_den((~m))⨸(~e)^2 + (~c)*(~x)^(2*ext_den((~m)))⨸(~e)^2)^(~p), (~x), (~x), ((~d) + (~e)*(~x))^(1⨸ext_den((~m))), "1_2_1_4_53") : nothing) + +("1_2_1_4_54", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~n), (~p)) && + isfraction((~m)) ? +ext_den((~m))⨸(~e)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*(((~e)*(~f) - (~d)*(~g))⨸(~e) + (~g)*(~x)^ext_den((~m))⨸(~e))^ (~n)*(((~c)*(~d)^2 + (~a)*(~e)^2)⨸(~e)^2 - 2*(~c)*(~d)*(~x)^ext_den((~m))⨸(~e)^2 + (~c)*(~x)^(2*ext_den((~m)))⨸(~e)^2)^(~p), (~x), (~x), ((~d) + (~e)*(~x))^(1⨸ext_den((~m))), "1_2_1_4_54") : nothing) + +("1_2_1_4_55", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~m) - (~n), 0) && + eq((~e)*(~f) + (~d)*(~g), 0) && + ( + ext_isinteger((~m)) || + gt((~d), 0) && + gt((~f), 0) + ) ? +∫(((~d)*(~f) + (~e)*(~g)*(~x)^2)^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_56", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))^(~n)*((~!a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~m) - (~n), 0) && + eq((~e)*(~f) + (~d)*(~g), 0) && + ( + ext_isinteger((~m)) || + gt((~d), 0) && + gt((~f), 0) + ) ? +∫(((~d)*(~f) + (~e)*(~g)*(~x)^2)^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_57", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~m) - (~n), 0) && + eq((~e)*(~f) + (~d)*(~g), 0) ? +((~d) + (~e)*(~x))^ fracpart((~m))*((~f) + (~g)*(~x))^fracpart((~m))⨸((~d)*(~f) + (~e)*(~g)*(~x)^2)^fracpart((~m))* ∫(((~d)*(~f) + (~e)*(~g)*(~x)^2)^(~m)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_58", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))^(~n)*((~!a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~m) - (~n), 0) && + eq((~e)*(~f) + (~d)*(~g), 0) ? +((~d) + (~e)*(~x))^ fracpart((~m))*((~f) + (~g)*(~x))^fracpart((~m))⨸((~d)*(~f) + (~e)*(~g)*(~x)^2)^fracpart((~m))* ∫(((~d)*(~f) + (~e)*(~g)*(~x)^2)^(~m)*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_59", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~m), 0) && + gt((~n), 1) ? +(~g)⨸(~c)^2* ∫(simp(2*(~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g) + (~c)*(~e)*(~g)*(~x), (~x))*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 2), (~x)) + 1⨸(~c)^2* ∫(simp( (~c)^2*(~d)*(~f)^2 - 2*(~a)*(~c)*(~e)*(~f)*(~g) - (~a)*(~c)*(~d)*(~g)^2 + (~a)*(~b)*(~e)*(~g)^2 + ((~c)^2*(~e)*(~f)^2 + 2*(~c)^2*(~d)*(~f)*(~g) - 2*(~b)*(~c)*(~e)*(~f)*(~g) - (~b)*(~c)*(~d)*(~g)^2 + (~b)^2*(~e)*(~g)^2 - (~a)*(~c)*(~e)*(~g)^2)*(~x), (~x))* ((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 2)⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_4_60", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~m), 0) && + gt((~n), 1) ? +(~g)⨸(~c)*∫( simp(2*(~e)*(~f) + (~d)*(~g) + (~e)*(~g)*(~x), (~x))*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 2), (~x)) + 1⨸(~c)* ∫(simp( (~c)*(~d)*(~f)^2 - 2*(~a)*(~e)*(~f)*(~g) - (~a)*(~d)*(~g)^2 + ((~c)*(~e)*(~f)^2 + 2*(~c)*(~d)*(~f)*(~g) - (~a)*(~e)*(~g)^2)*(~x), (~x))*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 2)⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_4_61", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~m), 0) && + gt((~n), 0) ? +(~e)*(~g)⨸(~c)*∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 1), (~x)) + 1⨸(~c)* ∫(simp((~c)*(~d)*(~f) - (~a)*(~e)*(~g) + ((~c)*(~e)*(~f) + (~c)*(~d)*(~g) - (~b)*(~e)*(~g))*(~x), (~x))*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 1)⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_4_62", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~m), 0) && + gt((~n), 0) ? +(~e)*(~g)⨸(~c)*∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 1), (~x)) + 1⨸(~c)* ∫(simp((~c)*(~d)*(~f) - (~a)*(~e)*(~g) + ((~c)*(~e)*(~f) + (~c)*(~d)*(~g))*(~x), (~x))*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) - 1)⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_4_63", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~m), 0) && + lt((~n), -1) ? +-(~g)*((~e)*(~f) - (~d)*(~g))⨸((~c)*(~f)^2 - (~b)*(~f)*(~g) + (~a)*(~g)^2)* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^(~n), (~x)) + 1⨸((~c)*(~f)^2 - (~b)*(~f)*(~g) + (~a)*(~g)^2)* ∫( simp((~c)*(~d)*(~f) - (~b)*(~d)*(~g) + (~a)*(~e)*(~g) + (~c)*((~e)*(~f) - (~d)*(~g))*(~x), (~x))*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_4_64", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + gt((~m), 0) && + lt((~n), -1) ? +-(~g)*((~e)*(~f) - (~d)*(~g))⨸((~c)*(~f)^2 + (~a)*(~g)^2)* ∫(((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^(~n), (~x)) + 1⨸((~c)*(~f)^2 + (~a)*(~g)^2)* ∫( simp((~c)*(~d)*(~f) + (~a)*(~e)*(~g) + (~c)*((~e)*(~f) - (~d)*(~g))*(~x), (~x))*((~d) + (~e)*(~x))^((~m) - 1)*((~f) + (~g)*(~x))^((~n) + 1)⨸((~a) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_1_4_65", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/(sqrt((~!f) + (~!g)*(~x))*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~m) + 1/2, 0) ? +∫(ext_expand( 1⨸(sqrt((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))), ((~d) + (~e)*(~x))^((~m) + 1⨸2)⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_4_66", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/(sqrt((~!f) + (~!g)*(~x))*((~!a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~m) + 1/2, 0) ? +∫(ext_expand( 1⨸(sqrt((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))), ((~d) + (~e)*(~x))^((~m) + 1⨸2)⨸((~a) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_4_67", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n), 1⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_4_68", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n), 1⨸((~a) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("1_2_1_4_69", +@rule ∫((~x)^2*((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~b)*(~e)*((~m) + (~p) + 2) + 2*(~c)*(~d)*((~p) + 1), 0) && + eq((~b)*(~d)*((~p) + 1) + (~a)*(~e)*((~m) + 1), 0) && + !eq((~m) + 2*(~p) + 3, 0) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*(~e)*((~m) + 2*(~p) + 3)) : nothing) + +("1_2_1_4_70", +@rule ∫((~x)^2*((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~m), (~p), (~x)) && + eq((~d)*((~p) + 1), 0) && + eq((~a)*((~m) + 1), 0) && + !eq((~m) + 2*(~p) + 3, 0) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~c)*(~e)*((~m) + 2*(~p) + 3)) : nothing) + +("1_2_1_4_71", +@rule ∫(((~!g)*(~x))^(~n)*((~!d) + (~!e)*(~x))^(~m)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~m), (~n), (~p), (~x)) && + eq((~m) - (~p), 0) && + eq((~b)*(~d) + (~a)*(~e), 0) && + eq((~c)*(~d) + (~b)*(~e), 0) ? +((~d) + (~e)*(~x))^ fracpart((~p))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^fracpart((~p))⨸((~a)*(~d) + (~c)*(~e)*(~x)^3)^ fracpart((~p))*∫(((~g)*(~x))^(~n)*((~a)*(~d) + (~c)*(~e)*(~x)^3)^(~p), (~x)) : nothing) + +("1_2_1_4_72", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sqrt((~!f) + (~!g)*(~x))* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) - 1⨸(2*(~e)*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp((~b)*(~f) + (~a)*(~g) + 2*((~c)*(~f) + (~b)*(~g))*(~x) + 3*(~c)*(~g)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_73", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) - 1⨸(2*(~e)*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp((~a)*(~g) + 2*(~c)*(~f)*(~x) + 3*(~c)*(~g)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_74", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sqrt((~!f) + (~!g)*(~x))* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + !(lt((~m), -1)) ? +2*((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*(2*(~m) + 5)) - 1⨸((~e)*(2*(~m) + 5))* ∫(((~d) + (~e)*(~x))^(~m)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp((~b)*(~d)*(~f) - 3*(~a)*(~e)*(~f) + (~a)*(~d)*(~g) + 2*((~c)*(~d)*(~f) - (~b)*(~e)*(~f) + (~b)*(~d)*(~g) - (~a)*(~e)*(~g))* (~x) - ((~c)*(~e)*(~f) - 3*(~c)*(~d)*(~g) + (~b)*(~e)*(~g))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_75", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + !(lt((~m), -1)) ? +2*((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)⨸((~e)*(2*(~m) + 5)) + 1⨸((~e)*(2*(~m) + 5))*∫(((~d) + (~e)*(~x))^(~m)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp(3*(~a)*(~e)*(~f) - (~a)*(~d)*(~g) - 2*((~c)*(~d)*(~f) - (~a)*(~e)*(~g))*(~x) + ((~c)*(~e)*(~f) - 3*(~c)*(~d)*(~g))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_76", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)/sqrt((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + gt((~m), 0) ? +2*((~d) + (~e)*(~x))^(~m)*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~g)*(2*(~m) + 3)) - 1⨸((~g)*(2*(~m) + 3))* ∫(((~d) + (~e)*(~x))^((~m) - 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp((~b)*(~d)*(~f) + 2*(~a)*((~e)*(~f)*(~m) - (~d)*(~g)*((~m) + 1)) + (2*(~c)*(~d)*(~f) - 2*(~a)*(~e)*(~g) + (~b)*((~e)*(~f) - (~d)*(~g))*(2*(~m) + 1))* (~x) - ((~b)*(~e)*(~g) + 2*(~c)*((~d)*(~g)*(~m) - (~e)*(~f)*((~m) + 1)))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_77", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sqrt((~a) + (~!c)*(~x)^2)/sqrt((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + gt((~m), 0) ? +2*((~d) + (~e)*(~x))^(~m)*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)⨸((~g)*(2*(~m) + 3)) - 1⨸((~g)*(2*(~m) + 3))* ∫(((~d) + (~e)*(~x))^((~m) - 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp(2*(~a)*((~e)*(~f)*(~m) - (~d)*(~g)*((~m) + 1)) + (2*(~c)*(~d)*(~f) - 2*(~a)*(~e)*(~g))* (~x) - (2*(~c)*((~d)*(~g)*(~m) - (~e)*(~f)*((~m) + 1)))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_78", +@rule ∫(sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)/(((~!d) + (~!e)*(~x))*sqrt((~!f) + (~!g)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸(~e)^2* ∫(1⨸(((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) - 1⨸(~e)^2* ∫(((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x))⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_79", +@rule ∫(sqrt((~a) + (~!c)*(~x)^2)/(((~!d) + (~!e)*(~x))*sqrt((~!f) + (~!g)*(~x))),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +((~c)*(~d)^2 + (~a)*(~e)^2)⨸(~e)^2* ∫(1⨸(((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) - 1⨸(~e)^2*∫(((~c)*(~d) - (~c)*(~e)*(~x))⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_80", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)/sqrt((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g))) - 1⨸(2*((~m) + 1)*((~e)*(~f) - (~d)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp((~b)*(~f) + (~a)*(~g)*(2*(~m) + 3) + 2*((~c)*(~f) + (~b)*(~g)*((~m) + 2))*(~x) + (~c)*(~g)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_81", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sqrt((~a) + (~!c)*(~x)^2)/sqrt((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~c)*(~x)^2)⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g))) - 1⨸(2*((~m) + 1)*((~e)*(~f) - (~d)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp((~a)*(~g)*(2*(~m) + 3) + 2*((~c)*(~f))*(~x) + (~c)*(~g)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_82", +@rule ∫(sqrt( (~!d) + (~!e)*(~x))/(sqrt((~!f) + (~!g)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +sqrt(2)*sqrt(2*(~c)*(~f) - (~g)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))*sqrt((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))*((~d) + (~e)*(~x))* sqrt(((~e)*(~f) - (~d)*(~g))*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸((2*(~c)*(~f) - (~g)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))*((~d) + (~e)*(~x))))* sqrt(((~e)*(~f) - (~d)*(~g))*(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x))⨸(((~b)*(~f) + rt((~b)^2 - 4*(~a)*(~c), 2)*(~f) - 2*(~a)*(~g))*((~d) + (~e)*(~x))))⨸ ((~g)*sqrt(2*(~c)*(~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))*sqrt(2*(~a)*(~c)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)) + (~c)*(~x))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* elliptic_pi((~e)*(2*(~c)*(~f) - (~g)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))⨸((~g)*(2*(~c)*(~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))), asin(sqrt(2*(~c)*(~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))* sqrt((~f) + (~g)*(~x))⨸(sqrt(2*(~c)*(~f) - (~g)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))*sqrt((~d) + (~e)*(~x)))), ((~b)*(~d) + rt((~b)^2 - 4*(~a)*(~c), 2)*(~d) - 2*(~a)*(~e))*(2*(~c)*(~f) - (~g)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))⨸(((~b)*(~f) + rt((~b)^2 - 4*(~a)*(~c), 2)*(~f) - 2*(~a)*(~g))*(2*(~c)*(~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))))) : nothing) + +("1_2_1_4_83", +@rule ∫(sqrt((~!d) + (~!e)*(~x))/(sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +sqrt(2)*sqrt(2*(~c)*(~f) - (~g)*rt(-4*(~a)*(~c), 2))*sqrt(-rt(-4*(~a)*(~c), 2) + 2*(~c)*(~x))*((~d) + (~e)*(~x))* sqrt(((~e)*(~f) - (~d)*(~g))*(rt(-4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸((2*(~c)*(~f) - (~g)*rt(-4*(~a)*(~c), 2))*((~d) + (~e)*(~x))))* sqrt(((~e)*(~f) - (~d)*(~g))*(2*(~a) + rt(-4*(~a)*(~c), 2)*(~x))⨸((rt(-4*(~a)*(~c), 2)*(~f) - 2*(~a)*(~g))*((~d) + (~e)*(~x))))⨸ ((~g)*sqrt(2*(~c)*(~d) - (~e)*rt(-4*(~a)*(~c), 2))*sqrt(2*(~a)*(~c)⨸rt(-4*(~a)*(~c), 2) + (~c)*(~x))*sqrt((~a) + (~c)*(~x)^2))* elliptic_pi((~e)*(2*(~c)*(~f) - (~g)*rt(-4*(~a)*(~c), 2))⨸((~g)*(2*(~c)*(~d) - (~e)*rt(-4*(~a)*(~c), 2))), asin(sqrt(2*(~c)*(~d) - (~e)*rt(-4*(~a)*(~c), 2))* sqrt((~f) + (~g)*(~x))⨸(sqrt(2*(~c)*(~f) - (~g)*rt(-4*(~a)*(~c), 2))*sqrt((~d) + (~e)*(~x)))), (rt(-4*(~a)*(~c), 2)*(~d) - 2*(~a)*(~e))*(2*(~c)*(~f) - (~g)*rt(-4*(~a)*(~c), 2))⨸((rt(-4*(~a)*(~c), 2)*(~f) - 2*(~a)*(~g))*(2*(~c)*(~d) - (~e)*rt(-4*(~a)*(~c), 2)))) : nothing) + +("1_2_1_4_84", +@rule ∫(((~!d) + (~!e)*(~x))^(3//2)/(sqrt((~!f) + (~!g)*(~x))* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +(~e)⨸(~g)*∫(sqrt((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) - ((~e)*(~f) - (~d)*(~g))⨸(~g)* ∫(sqrt((~d) + (~e)*(~x))⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_85", +@rule ∫(((~!d) + (~!e)*(~x))^(3//2)/(sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +(~e)⨸(~g)*∫(sqrt((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))⨸sqrt((~a) + (~c)*(~x)^2), (~x)) - ((~e)*(~f) - (~d)*(~g))⨸(~g)* ∫(sqrt((~d) + (~e)*(~x))⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_86", +@rule ∫(((~!d) + (~!e)*(~x))^ (~m)/(sqrt((~!f) + (~!g)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + ge((~m), 2) ? +2*(~e)^2*((~d) + (~e)*(~x))^((~m) - 2)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~c)*(~g)*(2*(~m) - 1)) - 1⨸((~c)*(~g)*(2*(~m) - 1))* ∫(((~d) + (~e)*(~x))^((~m) - 3)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp((~b)*(~d)*(~e)^2*(~f) + (~a)*(~e)^2*((~d)*(~g) + 2*(~e)*(~f)*((~m) - 2)) - (~c)*(~d)^3*(~g)*(2*(~m) - 1) + (~e)*((~e)*(2*(~b)*(~d)*(~g) + (~e)*((~b)*(~f) + (~a)*(~g))*(2*(~m) - 3)) + (~c)*(~d)*(2*(~e)*(~f) - 3*(~d)*(~g)*(2*(~m) - 1)))*(~x) + 2*(~e)^2*((~c)*(~e)*(~f) - 3*(~c)*(~d)*(~g) + (~b)*(~e)*(~g))*((~m) - 1)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_87", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/(sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + ge((~m), 2) ? +2*(~e)^2*((~d) + (~e)*(~x))^((~m) - 2)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~c)*(~x)^2)⨸((~c)*(~g)*(2*(~m) - 1)) - 1⨸((~c)*(~g)*(2*(~m) - 1))* ∫(((~d) + (~e)*(~x))^((~m) - 3)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp((~a)*(~e)^2*((~d)*(~g) + 2*(~e)*(~f)*((~m) - 2)) - (~c)*(~d)^3*(~g)*(2*(~m) - 1) + (~e)*((~e)*((~a)*(~e)*(~g)*(2*(~m) - 3)) + (~c)*(~d)*(2*(~e)*(~f) - 3*(~d)*(~g)*(2*(~m) - 1)))*(~x) + 2*(~e)^2*((~c)*(~e)*(~f) - 3*(~c)*(~d)*(~g))*((~m) - 1)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_88", +@rule ∫(1/(((~!d) + (~!e)*(~x))*sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~a), 0) ? +1⨸sqrt((~a))* ∫(1⨸(((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt(1 - rt(-(~c)⨸(~a), 2)*(~x))*sqrt(1 + rt(-(~c)⨸(~a), 2)*(~x))), (~x)) : nothing) + +("1_2_1_4_89", +@rule ∫(1/(((~!d) + (~!e)*(~x))*sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(gt((~a), 0)) ? +sqrt(1 + (~c)*(~x)^2⨸(~a))⨸sqrt((~a) + (~c)*(~x)^2)* ∫(1⨸(((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt(1 - rt(-(~c)⨸(~a), 2)*(~x))*sqrt(1 + rt(-(~c)⨸(~a), 2)*(~x))), (~x)) : nothing) + +("1_2_1_4_90", +@rule ∫(1/(((~!d) + (~!e)*(~x))*sqrt((~!f) + (~!g)*(~x))* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +sqrt((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))*sqrt((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))⨸sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)* ∫(1⨸(((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))* sqrt((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x))), (~x)) : nothing) + +("1_2_1_4_91", +@rule ∫(1/(sqrt((~!d) + (~!e)*(~x))*sqrt((~!f) + (~!g)*(~x))* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +-2*((~d) + (~e)*(~x))* sqrt(((~e)*(~f) - (~d)*(~g))^2*((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(((~c)*(~f)^2 - (~b)*(~f)*(~g) + (~a)*(~g)^2)*((~d) + (~e)*(~x))^2))⨸(((~e)*(~f) - (~d)*(~g))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* int_and_subst( 1⨸sqrt(1 - (2*(~c)*(~d)*(~f) - (~b)*(~e)*(~f) - (~b)*(~d)*(~g) + 2*(~a)*(~e)*(~g))* (~x)^2⨸((~c)*(~f)^2 - (~b)*(~f)*(~g) + (~a)*(~g)^2) + ((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* (~x)^4⨸((~c)*(~f)^2 - (~b)*(~f)*(~g) + (~a)*(~g)^2)), (~x), (~x), sqrt((~f) + (~g)*(~x))⨸sqrt((~d) + (~e)*(~x)), "1_2_1_4_91") : nothing) + +("1_2_1_4_92", +@rule ∫(1/(sqrt((~!d) + (~!e)*(~x))*sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +-2*((~d) + (~e)*(~x))* sqrt(((~e)*(~f) - (~d)*(~g))^2*((~a) + (~c)*(~x)^2)⨸(((~c)*(~f)^2 + (~a)*(~g)^2)*((~d) + (~e)*(~x))^2))⨸(((~e)* (~f) - (~d)*(~g))*sqrt((~a) + (~c)*(~x)^2))* int_and_subst( 1⨸sqrt(1 - (2*(~c)*(~d)*(~f) + 2*(~a)*(~e)*(~g))* (~x)^2⨸((~c)*(~f)^2 + (~a)*(~g)^2) + ((~c)*(~d)^2 + (~a)*(~e)^2)*(~x)^4⨸((~c)*(~f)^2 + (~a)*(~g)^2)), (~x), (~x), sqrt((~f) + (~g)*(~x))⨸sqrt((~d) + (~e)*(~x)), "1_2_1_4_92") : nothing) + +("1_2_1_4_93", +@rule ∫(1/(((~!d) + (~!e)*(~x))^(3//2)*sqrt((~!f) + (~!g)*(~x))* sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +-(~g)⨸((~e)*(~f) - (~d)*(~g))* ∫(1⨸(sqrt((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) + (~e)⨸((~e)*(~f) - (~d)*(~g))* ∫(sqrt((~f) + (~g)*(~x))⨸(((~d) + (~e)*(~x))^(3⨸2)*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_94", +@rule ∫(1/(((~!d) + (~!e)*(~x))^(3//2)*sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +-(~g)⨸((~e)*(~f) - (~d)*(~g))* ∫(1⨸(sqrt((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) + (~e)⨸((~e)*(~f) - (~d)*(~g))* ∫(sqrt((~f) + (~g)*(~x))⨸(((~d) + (~e)*(~x))^(3⨸2)*sqrt((~a) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_95", +@rule ∫(((~!d) + (~!e)*(~x))^ (~m)/(sqrt((~!f) + (~!g)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + le((~m), -2) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g))*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(2*((~m) + 1)*((~e)*(~f) - (~d)*(~g))*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp(2*(~d)*((~c)*(~e)*(~f) - (~c)*(~d)*(~g) + (~b)*(~e)*(~g))*((~m) + 1) - (~e)^2*((~b)*(~f) + (~a)*(~g))*(2*(~m) + 3) + 2*(~e)*((~c)*(~d)*(~g)*((~m) + 1) - (~e)*((~c)*(~f) + (~b)*(~g))*((~m) + 2))*(~x) - (~c)*(~e)^2*(~g)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_96", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)/(sqrt((~!f) + (~!g)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + le((~m), -2) ? +(~e)^2*((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~c)*(~x)^2)⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g))*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸(2*((~m) + 1)*((~e)*(~f) - (~d)*(~g))*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp(2*(~d)*((~c)*(~e)*(~f) - (~c)*(~d)*(~g))*((~m) + 1) - (~a)*(~e)^2*(~g)*(2*(~m) + 3) + 2*(~e)*((~c)*(~d)*(~g)*((~m) + 1) - (~c)*(~e)*(~f)*((~m) + 2))*(~x) - (~c)*(~e)^2*(~g)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing) + +#(* Int[Sqrt[d_.+e_.*x_]*Sqrt[f_.+g_.*x_]/Sqrt[a_.+b_.*x_+c_.*x_^2],x_ Symbol] := 0 /; FreeQ[{a,b,c,d,e,f,g},x] && NeQ[e*f-d*g,0] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] *) +("1_2_1_4_97", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)* sqrt((~!f) + (~!g)*(~x))/sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + gt((~m), 1) ? +2*(~e)*((~d) + (~e)*(~x))^((~m) - 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~c)*(2*(~m) + 1)) - 1⨸((~c)*(2*(~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp((~e)*((~b)*(~d)*(~f) + (~a)*((~d)*(~g) + 2*(~e)*(~f)*((~m) - 1))) - (~c)*(~d)^2*(~f)*(2*(~m) + 1) + ((~a)*(~e)^2*(~g)*(2*(~m) - 1) - (~c)*(~d)*(4*(~e)*(~f)*(~m) + (~d)*(~g)*(2*(~m) + 1)) + (~b)*(~e)*(2*(~d)*(~g) + (~e)*(~f)*(2*(~m) - 1)))*(~x) + (~e)*(2*(~b)*(~e)*(~g)*(~m) - (~c)*((~e)*(~f) + (~d)*(~g)*(4*(~m) - 1)))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_98", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*sqrt((~!f) + (~!g)*(~x))/sqrt((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + gt((~m), 1) ? +2*(~e)*((~d) + (~e)*(~x))^((~m) - 1)*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)⨸((~c)*(2*(~m) + 1)) - 1⨸((~c)*(2*(~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) - 2)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp((~a)*(~e)*((~d)*(~g) + 2*(~e)*(~f)*((~m) - 1)) - (~c)*(~d)^2*(~f)*(2*(~m) + 1) + ((~a)*(~e)^2*(~g)*(2*(~m) - 1) - (~c)*(~d)*(4*(~e)*(~f)*(~m) + (~d)*(~g)*(2*(~m) + 1)))*(~x) - (~c)*(~e)*((~e)*(~f) + (~d)*(~g)*(4*(~m) - 1))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_99", +@rule ∫(sqrt((~!f) + (~!g)*(~x))/(((~!d) + (~!e)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +(~g)⨸(~e)*∫(1⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) + ((~e)*(~f) - (~d)*(~g))⨸(~e)* ∫(1⨸(((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_100", +@rule ∫(sqrt((~!f) + (~!g)*(~x))/(((~!d) + (~!e)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +(~g)⨸(~e)*∫(1⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) + ((~e)*(~f) - (~d)*(~g))⨸(~e)* ∫(1⨸(((~d) + (~e)*(~x))*sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_1_4_101", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)* sqrt((~!f) + (~!g)*(~x))/sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + le((~m), -2) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(2*((~m) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))* simp(2*(~c)*(~d)*(~f)*((~m) + 1) - (~e)*((~a)*(~g) + (~b)*(~f)*(2*(~m) + 3)) - 2*((~b)*(~e)*(~g)*(2 + (~m)) - (~c)*((~d)*(~g)*((~m) + 1) - (~e)*(~f)*((~m) + 2)))*(~x) - (~c)*(~e)*(~g)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_102", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*sqrt((~!f) + (~!g)*(~x))/sqrt((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger(2*(~m)) && + le((~m), -2) ? +(~e)*((~d) + (~e)*(~x))^((~m) + 1)*sqrt((~f) + (~g)*(~x))* sqrt((~a) + (~c)*(~x)^2)⨸(((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸(2*((~m) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x))^((~m) + 1)⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2))* simp(2*(~c)*(~d)*(~f)*((~m) + 1) - (~e)*((~a)*(~g)) + 2*(~c)*((~d)*(~g)*((~m) + 1) - (~e)*(~f)*((~m) + 2))*(~x) - (~c)*(~e)*(~g)*(2*(~m) + 5)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_1_4_103", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p), 0) && + ( + igt((~m), 0) || + eq((~m), -2) && + eq((~p), 1) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_104", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) && + ( + igt((~m), 0) || + eq((~m), -2) && + eq((~p), 1) && + eq((~d), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_105", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p), 0) && + lt((~m), -1) ? +poly_remainder(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~d) + (~e)*(~x), (~x))*((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^((~n) + 1)⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g))) + 1⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^(~n)* expand_to_sum(((~m) + 1)*((~e)*(~f) - (~d)*(~g))*poly_quotient(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~d) + (~e)*(~x), (~x)) - (~g)*poly_remainder(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~d) + (~e)*(~x), (~x))*((~m) + (~n) + 2), (~x)), (~x)) : nothing) + +("1_2_1_4_106", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) && + lt((~m), -1) ? +poly_remainder(((~a) + (~c)*(~x)^2)^(~p), (~d) + (~e)*(~x), (~x))*((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^((~n) + 1)⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g))) + 1⨸(((~m) + 1)*((~e)*(~f) - (~d)*(~g)))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~f) + (~g)*(~x))^(~n)* expand_to_sum(((~m) + 1)*((~e)*(~f) - (~d)*(~g))*poly_quotient(((~a) + (~c)*(~x)^2)^(~p), (~d) + (~e)*(~x), (~x)) - (~g)*poly_remainder(((~a) + (~c)*(~x)^2)^(~p), (~d) + (~e)*(~x), (~x))*((~m) + (~n) + 2), (~x)), (~x)) : nothing) + +("1_2_1_4_107", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p), 0) && + !eq((~m) + (~n) + 2*(~p) + 1, 0) && + ( + ext_isinteger((~n)) || + !(ext_isinteger((~m))) + ) ? +(~c)^(~p)*((~d) + (~e)*(~x))^((~m) + 2*(~p))*((~f) + (~g)*(~x))^((~n) + 1)⨸((~g)* (~e)^(2*(~p))*((~m) + (~n) + 2*(~p) + 1)) + 1⨸((~g)*(~e)^(2*(~p))*((~m) + (~n) + 2*(~p) + 1))*∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)* expand_to_sum( (~g)*((~m) + (~n) + 2*(~p) + 1)*((~e)^(2*(~p))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p) - (~c)^(~p)*((~d) + (~e)*(~x))^(2*(~p))) - (~c)^(~p)*((~e)*(~f) - (~d)*(~g))*((~m) + 2*(~p))*((~d) + (~e)*(~x))^(2*(~p) - 1), (~x)), (~x)) : nothing) + +("1_2_1_4_108", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) && + !eq((~m) + (~n) + 2*(~p) + 1, 0) && + ( + ext_isinteger((~n)) || + !(ext_isinteger((~m))) + ) ? +(~c)^(~p)*((~d) + (~e)*(~x))^((~m) + 2*(~p))*((~f) + (~g)*(~x))^((~n) + 1)⨸((~g)* (~e)^(2*(~p))*((~m) + (~n) + 2*(~p) + 1)) + 1⨸((~g)*(~e)^(2*(~p))*((~m) + (~n) + 2*(~p) + 1))*∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)* expand_to_sum( (~g)*((~m) + (~n) + 2*(~p) + 1)*((~e)^(2*(~p))*((~a) + (~c)*(~x)^2)^(~p) - (~c)^(~p)*((~d) + (~e)*(~x))^(2*(~p))) - (~c)^(~p)*((~e)*(~f) - (~d)*(~g))*((~m) + 2*(~p))*((~d) + (~e)*(~x))^(2*(~p) - 1), (~x)), (~x)) : nothing) + +("1_2_1_4_109", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~p))) && + gt((~p), 0) && + lt((~n), -1) ? +((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) - 1⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(((~f) + (~g)*(~x))^ (~n)*((~c)*(~d)*(~f) - (~b)*(~e)*(~f) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_110", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~p))) && + gt((~p), 0) && + lt((~n), -1) ? +((~c)*(~d)^2 + (~a)*(~e)^2)⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(((~f) + (~g)*(~x))^((~n) + 1)*((~a) + (~c)*(~x)^2)^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) - 1⨸((~e)*((~e)*(~f) - (~d)*(~g)))* ∫(((~f) + (~g)*(~x))^ (~n)*((~c)*(~d)*(~f) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x))*((~a) + (~c)*(~x)^2)^((~p) - 1), (~x)) : nothing) + +("1_2_1_4_111", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~p))) && + lt((~p), -1) && + gt((~n), 0) ? +(~e)*((~e)*(~f) - (~d)*(~g))⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^((~p) + 1)⨸((~d) + (~e)*(~x)), (~x)) + 1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f) + (~g)*(~x))^((~n) - 1)*((~c)*(~d)*(~f) - (~b)*(~e)*(~f) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x))*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_112", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~p))) && + lt((~p), -1) && + gt((~n), 0) ? +(~e)*((~e)*(~f) - (~d)*(~g))⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f) + (~g)*(~x))^((~n) - 1)*((~a) + (~c)*(~x)^2)^((~p) + 1)⨸((~d) + (~e)*(~x)), (~x)) + 1⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f) + (~g)*(~x))^((~n) - 1)*((~c)*(~d)*(~f) + (~a)*(~e)*(~g) - (~c)*((~e)*(~f) - (~d)*(~g))*(~x))*((~a) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_1_4_113", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)/(((~!d) + (~!e)*(~x))*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~n) + 1/2) ? +∫(ext_expand( 1⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), ((~f) + (~g)*(~x))^((~n) + 1⨸2)⨸((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("1_2_1_4_114", +@rule ∫(((~!f) + (~!g)*(~x))^(~n)/(((~!d) + (~!e)*(~x))*sqrt((~a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~n) + 1/2) ? +∫(ext_expand( 1⨸(sqrt((~f) + (~g)*(~x))*sqrt((~a) + (~c)*(~x)^2)), ((~f) + (~g)*(~x))^((~n) + 1⨸2)⨸((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("1_2_1_4_115", +@rule ∫(((~!g)*(~x))^(~!n)*((~a) + (~!c)*(~x)^2)^(~p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~g), (~n), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + !(ext_isinteger((~n), 2*(~p))) ? +(~d)*((~g)*(~x))^(~n)⨸(~x)^(~n)*∫(((~x)^(~n)*((~a) + (~c)*(~x)^2)^(~p))⨸((~d)^2 - (~e)^2*(~x)^2), (~x)) - (~e)*((~g)*(~x))^(~n)⨸(~x)^(~n)*∫(((~x)^((~n) + 1)*((~a) + (~c)*(~x)^2)^(~p))⨸((~d)^2 - (~e)^2*(~x)^2), (~x)) : nothing) + +("1_2_1_4_116", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ( + ext_isinteger((~p)) || + ilt((~m), 0) && + ilt((~n), 0) + ) && + !( + igt((~m), 0) || + igt((~n), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_117", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ( + ext_isinteger((~p)) || + ilt((~m), 0) && + ilt((~n), 0) + ) && + !( + igt((~m), 0) || + igt((~n), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +("1_2_1_4_118", +@rule ∫(((~!g)*(~x))^(~!n)*((~d) + (~!e)*(~x))^(~m)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~g), (~n), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ilt((~m), 0) && + !(ext_isinteger((~p))) && + !(ext_isinteger((~n))) ? +((~g)*(~x))^(~n)⨸(~x)^(~n)* ∫(ext_expand( (~x)^(~n)*((~a) + (~c)*(~x)^2)^ (~p), ((~d)⨸((~d)^2 - (~e)^2*(~x)^2) - (~e)*(~x)⨸((~d)^2 - (~e)^2*(~x)^2))^(-(~m)), (~x)), (~x)) : nothing) + +# ("1_2_1_4_119", +# @rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && +# !( +# igt((~m), 0) || +# igt((~n), 0) +# ) ? +# Unintegrable[((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x)] : nothing) + +# ("1_2_1_4_120", +# @rule ∫(((~!d) + (~!e)*(~x))^(~m)*((~!f) + (~!g)*(~x))^(~n)*((~a) + (~!c)*(~x)^2)^(~p),(~x)) => +# !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && +# !( +# igt((~m), 0) || +# igt((~n), 0) +# ) ? +# Unintegrable[((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^(~p), (~x)] : nothing) + +("1_2_1_4_121", +@rule ∫(((~!d) + (~!e)*(~u))^(~!m)*((~!f) + (~!g)*(~u))^(~!n)*((~a) + (~!b)*(~u) + (~!c)*(~u)^2)^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~u), "1_2_1_4_121") : nothing) + +("1_2_1_4_122", +@rule ∫(((~!d) + (~!e)*(~u))^(~!m)*((~!f) + (~!g)*(~u))^(~!n)*((~a) + (~!c)*(~u)^2)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~n)*((~a) + (~c)*(~x)^2)^(~p), (~x), (~x), (~u), "1_2_1_4_122") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.1 (a+b x^2+c x^4)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.1 (a+b x^2+c x^4)^p.jl new file mode 100644 index 0000000..bad054b --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.1 (a+b x^2+c x^4)^p.jl @@ -0,0 +1,156 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.2.1 (a+b x^2+c x^4)^p *) +#(* Int[(a_+b_.*x_^2+c_.*x_^4)^p_,x_Symbol] := 1/c^p*Int[(b/2+c*x^2)^(2*p),x] /; FreeQ[{a,b,c,p},x] && EqQ[b^2-4*a*c,0] && IntegerQ[p] *) +#(* Int[1/(a_+b_.*x_^2+c_.*x_^4)^(5/4),x_Symbol] := 2*x/(3*a*(a+b*x^2+c*x^4)^(1/4)) + x*(2*a+b*x^2)/(6*a*(a+b*x^2+c*x^4)^(5/4)) /; FreeQ[{a,b,c},x] && EqQ[b^2-4*a*c,0] *) +("1_2_2_1_1", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p) - 1/2) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)⨸((~b) + 2*(~c)*(~x)^2)^(2*(~p))* ∫(((~b) + 2*(~c)*(~x)^2)^(2*(~p)), (~x)) : nothing) + +("1_2_2_1_2", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger(2*(~p))) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart((~p))⨸(1 + 2*(~c)*(~x)^2⨸(~b))^(2*fracpart((~p)))* ∫((1 + 2*(~c)*(~x)^2⨸(~b))^(2*(~p)), (~x)) : nothing) + +("1_2_2_1_3", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_1_4", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + ext_isinteger(2*(~p)) ? +(~x)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)⨸(4*(~p) + 1) + 2*(~p)⨸(4*(~p) + 1)*∫((2*(~a) + (~b)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1), (~x)) : nothing) + +("1_2_2_1_5", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + ext_isinteger(2*(~p)) ? +-(~x)*((~b)^2 - 2*(~a)*(~c) + (~b)*(~c)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(2* (~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~b)^2 - 2*(~a)*(~c) + 2*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)) + (~b)*(~c)*(4*(~p) + 7)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1), (~x)) : nothing) + +("1_2_2_1_6", +@rule ∫(1/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~b)^2 - 4*(~a)*(~c)) ? +(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) - (~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_1_7", +@rule ∫(1/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + neg((~b)^2 - 4*(~a)*(~c)) ? +1⨸(2*(~c)*rt((~a)⨸(~c), 2)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((rt(2*(~q) - (~b)⨸(~c), 2) - (~x))⨸(rt((~a)⨸(~c), 2) - rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) + 1⨸(2*(~c)*rt((~a)⨸(~c), 2)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((rt(2*(~q) - (~b)⨸(~c), 2) + (~x))⨸(rt((~a)⨸(~c), 2) + rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) : nothing) + +("1_2_2_1_8", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~c), 0) ? +2*sqrt(-(~c))* ∫(1⨸(sqrt((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)*sqrt(-(~b) + rt((~b)^2 - 4*(~a)*(~c), 2) - 2*(~c)*(~x)^2)), (~x)) : nothing) + +("1_2_2_1_9", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + gt((~c)/(~a), 0) && + lt((~b)/(~a), 0) ? +(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)* sqrt(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)^2))⨸(2*rt((~c)⨸(~a), 4)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_f(2*atan(rt((~c)⨸(~a), 4)*(~x)), 1⨸2 - (~b)*rt((~c)⨸(~a), 4)^2⨸(4*(~c))) : nothing) + +("1_2_2_1_10", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~a), 0) && + gt((~c), 0) && + ext_isinteger(rt((~b)^2 - 4*(~a)*(~c), 2)) ? +sqrt(-2*(~a) - ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)* sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*sqrt(-(~a))* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_f( asin((~x)⨸sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))), ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_1_11", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~a), 0) && + gt((~c), 0) ? +sqrt((2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2))* sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* sqrt((~a)⨸(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)))* elliptic_f( asin((~x)⨸sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))), ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_1_12", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + pos(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + !( + pos(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + simpler(rt(((~b) - rt((~b)^2 - 4*(~a)*(~c),2),rt( 2))/(2*(~a)), ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(2*(~a)),2)) + ) ? +(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)* sqrt((2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2))⨸(2*(~a)* rt(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_f(atan(rt(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), 2*rt((~b)^2 - 4*(~a)*(~c), 2)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_1_13", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + pos(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) ? +(2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)* sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2))⨸(2*(~a)* rt(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_f(atan(rt(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), -2*rt((~b)^2 - 4*(~a)*(~c), 2)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_1_14", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + !( + neg(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + simpler(rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c),2),rt( 2))/(2*(~a)), -((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(2*(~a)),2)) + ) ? +sqrt(1 + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))* sqrt(1 + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))⨸(rt(-((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_f(asin(rt(-((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_1_15", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) ? +sqrt(1 + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))* sqrt(1 + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))⨸(rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_f(asin(rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_1_16", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~c)/(~a)) ? +(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)* sqrt(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)^2))⨸(2*rt((~c)⨸(~a), 4)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_f(2*atan(rt((~c)⨸(~a), 4)*(~x)), 1⨸2 - (~b)*rt((~c)⨸(~a), 4)^2⨸(4*(~c))) : nothing) + +("1_2_2_1_17", +@rule ∫(1/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + neg((~c)/(~a)) ? +sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))* sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* ∫(1⨸(sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))*sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))), (~x)) : nothing) + +("1_2_2_1_18", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart( (~p))⨸((1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))^fracpart((~p))*(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))^ fracpart((~p)))* ∫((1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))^(~p)*(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))^(~p), (~x)) : nothing) + +("1_2_2_1_19", +@rule ∫((~P4)^(~p),(~x)) => + !contains_var((~p), (~x)) && + poly((~P4), (~x), 4) && + !eq((~p), 2) && + !eq((~p), 3) && + eq(ext_coeff((~P4), (~x), 3)^3 - 4*ext_coeff((~P4), (~x), 2)*ext_coeff((~P4), (~x), 3)*ext_coeff((~P4), (~x), 4) + 8*ext_coeff((~P4), (~x), 1)*ext_coeff((~P4), (~x), 4)^2, 0) && + !eq(ext_coeff((~P4), (~x), 3), 0) ? +int_and_subst(ext_simplify((ext_coeff((~P4), (~x), 0) + ext_coeff((~P4), (~x), 3)^4⨸(256*ext_coeff((~P4), (~x), 4)^3) - ext_coeff((~P4), (~x), 1)*ext_coeff((~P4), (~x), 3)⨸(8*ext_coeff((~P4), (~x), 4)) + (ext_coeff((~P4), (~x), 2) - 3*ext_coeff((~P4), (~x), 3)^2⨸(8*ext_coeff((~P4), (~x), 4)))*(~x)^2 + ext_coeff((~P4), (~x), 4)*(~x)^4)^(~p), (~x)), (~x), (~x), ext_coeff((~P4), (~x), 3)⨸(4*ext_coeff((~P4), (~x), 4)) + (~x), "1_2_2_1_19") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.2 (d x)^m (a+b x^2+c x^4)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.2 (d x)^m (a+b x^2+c x^4)^p.jl new file mode 100644 index 0000000..d09cc93 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.2 (d x)^m (a+b x^2+c x^4)^p.jl @@ -0,0 +1,325 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.2.2 (d x)^m (a+b x^2+c x^4)^p *) +#(* Int[(d_.*x_)^m_.*(b_.*x_^2+c_.*x_^4)^p_.,x_Symbol] := 1/d^(2*p)*Int[(d*x)^(m+2*p)*(b+c*x^2)^p,x] /; FreeQ[{b,c,d,m},x] && IntegerQ[p] *) +#(* Int[(d_.*x_)^m_.*(b_.*x_^2+c_.*x_^4)^p_,x_Symbol] := (b*x^2+c*x^4)^p/((d*x)^(2*p)*(b+c*x^2)^p)*Int[(d*x)^(m+2*p)*(b+c*x^ 2)^p,x] /; FreeQ[{b,c,d,m,p},x] && Not[IntegerQ[p]] *) +("1_2_2_2_1", +@rule ∫((~x)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) ? +1⨸2*int_and_subst(((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_2_1") : nothing) + +("1_2_2_2_2", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + igt((~p), 0) && + !(ext_isinteger(((~m) + 1)/2)) ? +∫(ext_expand(((~d)*(~x))^(~m)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +#(* Int[(d_.*x_)^m_.*(a_+b_.*x_^2+c_.*x_^4)^p_.,x_Symbol] := 1/c^p*Int[(d*x)^m*(b/2+c*x^2)^(2*p),x] /; FreeQ[{a,b,c,d,m,p},x] && EqQ[b^2-4*a*c,0] && IntegerQ[p] *) +("1_2_2_2_3", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + eq((~m) + 4*(~p) + 5, 0) && + lt((~p), -1) ? +2*((~d)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~d)*((~m) + 3)*(2*(~a) + (~b)*(~x)^2)) - ((~d)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(2*(~a)* (~d)*((~m) + 3)*((~p) + 1)) : nothing) + +("1_2_2_2_4", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + eq((~m) + 4*(~p) + 5, 0) && + !eq((~p), -1/2) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(4*(~a)* (~d)*((~p) + 1)*(2*(~p) + 1)) - ((~d)*(~x))^((~m) + 1)*(2*(~a) + (~b)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ (~p)⨸(4*(~a)*(~d)*(2*(~p) + 1)) : nothing) + +("1_2_2_2_5", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p) - 1/2) && + ext_isinteger(((~m) - 1)/2) && + ( + gt((~m), 0) || + lt(0, 4*(~p), -(~m) - 1) + ) ? +1⨸2*int_and_subst((~x)^(((~m) - 1)⨸2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_2_5") : nothing) + +#(* Int[(d_.*x_)^m_.*(a_+b_.*x_^2+c_.*x_^4)^p_,x_Symbol] := c*(a+b*x^2+c*x^4)^(p+1)/(b/2+c*x^2)^(2*(p+1))*Int[(d*x)^m*(b/2+c*x^ 2)^(2*p),x] /; FreeQ[{a,b,c,d,m,p},x] && EqQ[b^2-4*a*c,0] && IntegerQ[p-1/2] && IGeQ[m,2*p] *) +("1_2_2_2_6", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p) - 1/2) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart((~p))⨸((~c)^intpart((~p))*((~b)⨸2 + (~c)*(~x)^2)^(2*fracpart((~p))))* ∫(((~d)*(~x))^(~m)*((~b)⨸2 + (~c)*(~x)^2)^(2*(~p)), (~x)) : nothing) + +("1_2_2_2_7", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger(2*(~p))) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart((~p))⨸(1 + 2*(~c)*(~x)^2⨸(~b))^(2*fracpart((~p)))* ∫(((~d)*(~x))^(~m)*(1 + 2*(~c)*(~x)^2⨸(~b))^(2*(~p)), (~x)) : nothing) + +("1_2_2_2_8", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) ? +1⨸2*int_and_subst((~x)^(((~m) - 1)⨸2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_2_8") : nothing) + +("1_2_2_2_9", +@rule ∫(((~!d)*(~x))^(~m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + isfraction((~m)) && + ext_isinteger((~p)) ? +ext_den((~m))⨸(~d)* int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*(~x)^(2*ext_den((~m)))⨸(~d)^2 + (~c)*(~x)^(4*ext_den((~m)))⨸(~d)^4)^(~p), (~x), (~x), ((~d)*(~x))^(1⨸ext_den((~m))), "1_2_2_2_9") : nothing) + +("1_2_2_2_10", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + gt((~m), 1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~d)*((~d)*(~x))^((~m) - 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ (~p)*(2*(~b)*(~p) + (~c)*((~m) + 4*(~p) - 1)*(~x)^2)⨸((~c)*((~m) + 4*(~p) + 1)*((~m) + 4*(~p) - 1)) - 2*(~p)*(~d)^2⨸((~c)*((~m) + 4*(~p) + 1)*((~m) + 4*(~p) - 1))* ∫(((~d)*(~x))^((~m) - 2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1)* simp((~a)*(~b)*((~m) - 1) - (2*(~a)*(~c)*((~m) + 4*(~p) - 1) - (~b)^2*((~m) + 2*(~p) - 1))* (~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_2_11", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + lt((~m), -1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)⨸((~d)*((~m) + 1)) - 2*(~p)⨸((~d)^2*((~m) + 1))* ∫(((~d)*(~x))^((~m) + 2)*((~b) + 2*(~c)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1), (~x)) : nothing) + +("1_2_2_2_12", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + !eq((~m) + 4*(~p) + 1, 0) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)⨸((~d)*((~m) + 4*(~p) + 1)) + 2*(~p)⨸((~m) + 4*(~p) + 1)* ∫(((~d)*(~x))^(~m)*(2*(~a) + (~b)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1), (~x)) : nothing) + +("1_2_2_2_13", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + gt((~m), 1) && + le((~m), 3) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~d)*((~d)*(~x))^((~m) - 1)*((~b) + 2*(~c)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(2*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - (~d)^2⨸(2*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d)*(~x))^((~m) - 2)*((~b)*((~m) - 1) + 2*(~c)*((~m) + 4*(~p) + 5)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1), (~x)) : nothing) + +("1_2_2_2_14", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + gt((~m), 3) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +-(~d)^3*((~d)*(~x))^((~m) - 3)*(2*(~a) + (~b)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(2*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + (~d)^4⨸(2*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d)*(~x))^((~m) - 4)*(2*(~a)*((~m) - 3) + (~b)*((~m) + 4*(~p) + 3)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1), (~x)) : nothing) + +("1_2_2_2_15", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +-((~d)*(~x))^((~m) + 1)*((~b)^2 - 2*(~a)*(~c) + (~b)*(~c)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(2*(~a)* (~d)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~d)*(~x))^(~m)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)* simp((~b)^2*((~m) + 2*(~p) + 3) - 2*(~a)*(~c)*((~m) + 4*(~p) + 5) + (~b)*(~c)*((~m) + 4*(~p) + 7)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_2_16", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~m), 3) && + !eq((~m) + 4*(~p) + 1, 0) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~d)^3*((~d)*(~x))^((~m) - 3)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*((~m) + 4*(~p) + 1)) - (~d)^4⨸((~c)*((~m) + 4*(~p) + 1))* ∫(((~d)*(~x))^((~m) - 4)* simp((~a)*((~m) - 3) + (~b)*((~m) + 2*(~p) - 1)*(~x)^2, (~x))*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) : nothing) + +("1_2_2_2_17", +@rule ∫(((~!d)*(~x))^(~m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~m), -1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~a)*(~d)*((~m) + 1)) - 1⨸((~a)*(~d)^2*((~m) + 1))* ∫(((~d)*(~x))^((~m) + 2)*((~b)*((~m) + 2*(~p) + 3) + (~c)*((~m) + 4*(~p) + 5)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) : nothing) + +("1_2_2_2_18", +@rule ∫(((~!d)*(~x))^(~m)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~m), -1) ? +((~d)*(~x))^((~m) + 1)⨸((~a)*(~d)*((~m) + 1)) - 1⨸((~a)*(~d)^2)*∫(((~d)*(~x))^((~m) + 2)*((~b) + (~c)*(~x)^2)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_19", +@rule ∫((~x)^(~m)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~m), 5) ? +∫(polynomial_divide((~x)^(~m), ((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_2_20", +@rule ∫(((~!d)*(~x))^(~m)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~m), 3) ? +(~d)^3*((~d)*(~x))^((~m) - 3)⨸((~c)*((~m) - 3)) - (~d)^4⨸(~c)*∫(((~d)*(~x))^((~m) - 4)*((~a) + (~b)*(~x)^2)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_21", +@rule ∫((~x)^2/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + lt((~b)^2 - 4*(~a)*(~c), 0) && + pos((~a)*(~c)) ? +1⨸2*∫((rt((~a)⨸(~c), 2) + (~x)^2)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - 1⨸2*∫((rt((~a)⨸(~c), 2) - (~x)^2)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_22", +@rule ∫((~x)^(~!m)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ge((~m), 3) && + lt((~m), 4) && + neg((~b)^2 - 4*(~a)*(~c)) ? +1⨸(2*(~c)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((~x)^((~m) - 3)*(rt((~a)⨸(~c), 2) + rt(2*(~q) - (~b)⨸(~c), 2)*(~x))⨸(rt((~a)⨸(~c), 2) + rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) - 1⨸(2*(~c)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((~x)^((~m) - 3)*(rt((~a)⨸(~c), 2) - rt(2*(~q) - (~b)⨸(~c), 2)*(~x))⨸(rt((~a)⨸(~c), 2) - rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) : nothing) + +("1_2_2_2_23", +@rule ∫((~x)^(~!m)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ge((~m), 1) && + lt((~m), 3) && + neg((~b)^2 - 4*(~a)*(~c)) ? +1⨸(2*(~c)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((~x)^((~m) - 1)⨸(rt((~a)⨸(~c), 2) - rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) - 1⨸(2*(~c)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((~x)^((~m) - 1)⨸(rt((~a)⨸(~c), 2) + rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) : nothing) + +("1_2_2_2_24", +@rule ∫(((~!d)*(~x))^(~m)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ge((~m), 2) ? +(~d)^2⨸2*((~b)⨸rt((~b)^2 - 4*(~a)*(~c), 2) + 1)*∫(((~d)*(~x))^((~m) - 2)⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) - (~d)^2⨸2*((~b)⨸rt((~b)^2 - 4*(~a)*(~c), 2) - 1)*∫(((~d)*(~x))^((~m) - 2)⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_2_25", +@rule ∫(((~!d)*(~x))^(~!m)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~d)*(~x))^(~m)⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) - (~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~d)*(~x))^(~m)⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_2_26", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~c), 0) ? +2*sqrt(-(~c))* ∫((~x)^2⨸(sqrt((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)*sqrt(-(~b) + rt((~b)^2 - 4*(~a)*(~c), 2) - 2*(~c)*(~x)^2)), (~x)) : nothing) + +("1_2_2_2_27", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + gt((~c)/(~a), 0) && + lt((~b)/(~a), 0) ? +1⨸rt((~c)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - 1⨸rt((~c)⨸(~a), 2)*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_28", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~a), 0) && + gt((~c), 0) ? +-((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + 1⨸(2*(~c))*∫(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_29", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + pos(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + !( + pos(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + simpler(rt(((~b) - rt((~b)^2 - 4*(~a)*(~c),2),rt( 2))/(2*(~a)), ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(2*(~a)),2)) + ) ? +(~x)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸(2*(~c)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)) - rt(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)* sqrt((2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2))⨸(2*(~c)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_e(atan(rt(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), 2*rt((~b)^2 - 4*(~a)*(~c), 2)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_2_30", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + pos(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) ? +(~x)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸(2*(~c)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)) - rt(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)* sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2))⨸(2*(~c)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_e(atan(rt(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), -2*rt((~b)^2 - 4*(~a)*(~c), 2)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_2_31", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + !( + neg(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + simpler(rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c),2),rt( 2))/(2*(~a)), -((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(2*(~a)),2)) + ) ? +-((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + 1⨸(2*(~c))*∫(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_32", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) ? +-((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + 1⨸(2*(~c))*∫(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_33", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~c)/(~a)) ? +1⨸rt((~c)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - 1⨸rt((~c)⨸(~a), 2)*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_2_34", +@rule ∫((~x)^2/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + neg((~c)/(~a)) ? +sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))* sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* ∫((~x)^2⨸(sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))*sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))), (~x)) : nothing) + +("1_2_2_2_35", +@rule ∫(((~!d)*(~x))^(~!m)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~x)) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^fracpart((~p))⨸ ((1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))^ fracpart((~p))*(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))^fracpart((~p)))* ∫(((~d)*(~x))^(~m)*(1 + 2*(~c)*(~x)^2⨸((~b) + sqrt((~b)^2 - 4*(~a)*(~c))))^ (~p)*(1 + 2*(~c)*(~x)^2⨸((~b) - sqrt((~b)^2 - 4*(~a)*(~c))))^(~p), (~x)) : nothing) + +("1_2_2_2_36", +@rule ∫((~u)^(~!m)*((~!a) + (~!b)*(~v)^2 + (~!c)*(~v)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~p), (~x)) && + linear_pair((~u), (~v), (~x)) ? +(~u)^(~m)⨸(ext_coeff((~v), (~x), 1)*(~v)^(~m))* int_and_subst((~x)^(~m)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^(2*2))^(~p), (~x), (~x), (~v), "1_2_2_2_36") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.3 (d+e x^2)^q (a+b x^2+c x^4)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.3 (d+e x^2)^q (a+b x^2+c x^4)^p.jl new file mode 100644 index 0000000..197e584 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.3 (d+e x^2)^q (a+b x^2+c x^4)^p.jl @@ -0,0 +1,793 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.2.3 (d+e x^2)^q (a+b x^2+c x^4)^p *) +("1_2_2_3_1", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~!b)*(~x)^2 + (~!c)*(~x)^4)^(3//4),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~x)) ? +-2*((~c)*(~d) - (~b)*(~e))*((~b)*(~x)^2 + (~c)*(~x)^4)^(1⨸4)⨸((~b)*(~c)*(~x)) + (~e)⨸(~c)*∫(((~b)*(~x)^2 + (~c)*(~x)^4)^(1⨸4)⨸(~x)^2, (~x)) : nothing) + +("1_2_2_3_2", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq(4*(~p) + 3, 0) && + eq((~b)*(~e)*(2*(~p) + 1) - (~c)*(~d)*(4*(~p) + 3), 0) ? +(~e)*((~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*(4*(~p) + 3)*(~x)) : nothing) + +("1_2_2_3_3", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~p), (~x)) && + !(ext_isinteger((~p))) && + !eq(4*(~p) + 3, 0) && + !eq((~b)*(~e)*(2*(~p) + 1) - (~c)*(~d)*(4*(~p) + 3), 0) ? +(~e)*((~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*(4*(~p) + 3)* (~x)) - (((~b)*(~e)*(2*(~p) + 1) - (~c)*(~d)*(4*(~p) + 3))⨸((~c)*(4*(~p) + 3)))* ∫(((~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) : nothing) + +("1_2_2_3_4", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + !(ext_isinteger((~p))) ? +((~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart((~p))⨸((~x)^(2*fracpart((~p)))*((~b) + (~c)*(~x)^2)^fracpart((~p)))* ∫((~x)^(2*(~p))*((~d) + (~e)*(~x)^2)^(~q)*((~b) + (~c)*(~x)^2)^(~p), (~x)) : nothing) + +#(* Int[(d_+e_.*x_^2)^q_.*(a_+b_.*x_^2+c_.*x_^4)^p_.,x_Symbol] := 1/c^p*Int[(d+e*x^2)^q*(b/2+c*x^2)^(2*p),x] /; FreeQ[{a,b,c,d,e,p,q},x] && EqQ[b^2-4*a*c,0] && IntegerQ[p] *) +("1_2_2_3_5", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)⨸((~d) + (~e)*(~x)^2)^(2*(~p))* ∫(((~d) + (~e)*(~x)^2)^((~q) + 2*(~p)), (~x)) : nothing) + +("1_2_2_3_6", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart((~p))⨸((~c)^intpart((~p))*((~b)⨸2 + (~c)*(~x)^2)^(2*fracpart((~p))))* ∫(((~d) + (~e)*(~x)^2)^(~q)*((~b)⨸2 + (~c)*(~x)^2)^(2*(~p)), (~x)) : nothing) + +("1_2_2_3_7", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) ? +∫(((~d) + (~e)*(~x)^2)^((~p) + (~q))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_3_8", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~q), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) ? +∫(((~d) + (~e)*(~x)^2)^((~p) + (~q))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_3_9", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart( (~p))⨸(((~d) + (~e)*(~x)^2)^fracpart((~p))*((~a)⨸(~d) + (~c)*(~x)^2⨸(~e))^fracpart((~p)))* ∫(((~d) + (~e)*(~x)^2)^((~p) + (~q))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_3_10", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~q), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) ? +((~a) + (~c)*(~x)^4)^ fracpart( (~p))⨸(((~d) + (~e)*(~x)^2)^fracpart((~p))*((~a)⨸(~d) + (~c)*(~x)^2⨸(~e))^fracpart((~p)))* ∫(((~d) + (~e)*(~x)^2)^((~p) + (~q))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_3_11", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p), 0) && + igt((~q), -2) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_3_12", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) && + igt((~q), -2) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_3_13", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p), 0) && + ilt((~q) + 1/2, 0) && + lt(4*(~p) + 2*(~q) + 1, 0) ? +(~a)^(~p)*(~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(~d) + 1⨸(~d)* ∫((~x)^2*((~d) + (~e)*(~x)^2)^ (~q)*((~d)*poly_quotient(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p) - (~a)^(~p), (~x)^2, (~x)) - (~e)*(~a)^(~p)*(2*(~q) + 3)), (~x)) : nothing) + +("1_2_2_3_14", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) && + ilt((~q) + 1/2, 0) && + lt(4*(~p) + 2*(~q) + 1, 0) ? +(~a)^(~p)*(~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(~d) + 1⨸(~d)* ∫((~x)^2*((~d) + (~e)*(~x)^2)^ (~q)*((~d)*poly_quotient(((~a) + (~c)*(~x)^4)^(~p) - (~a)^(~p), (~x)^2, (~x)) - (~e)*(~a)^(~p)*(2*(~q) + 3)), (~x)) : nothing) + +("1_2_2_3_15", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p), 0) && + lt((~q), -1) ? +-ext_coeff( poly_remainder(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*(~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~d)*((~q) + 1)) + 1⨸(2*(~d)*((~q) + 1))* ∫(((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum(2*(~d)*((~q) + 1)*poly_quotient(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)) + ext_coeff( poly_remainder(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*(2*(~q) + 3), (~x)), (~x)) : nothing) + +("1_2_2_3_16", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) && + lt((~q), -1) ? +-ext_coeff(poly_remainder(((~a) + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*(~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~d)*((~q) + 1)) + 1⨸(2*(~d)*((~q) + 1))* ∫(((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum(2*(~d)*((~q) + 1)*poly_quotient(((~a) + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)) + ext_coeff(poly_remainder(((~a) + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*(2*(~q) + 3), (~x)), (~x)) : nothing) + +("1_2_2_3_17", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p), 0) && + !(lt((~q), -1)) ? +(~c)^(~p)*(~x)^(4*(~p) - 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸((~e)*(4*(~p) + 2*(~q) + 1)) + 1⨸((~e)*(4*(~p) + 2*(~q) + 1))* ∫(((~d) + (~e)*(~x)^2)^(~q)* expand_to_sum( (~e)*(4*(~p) + 2*(~q) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p) - (~d)*(~c)^(~p)*(4*(~p) - 1)*(~x)^(4*(~p) - 2) - (~e)*(~c)^(~p)*(4*(~p) + 2*(~q) + 1)*(~x)^(4*(~p)), (~x)), (~x)) : nothing) + +("1_2_2_3_18", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~q), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p), 0) && + !(lt((~q), -1)) ? +(~c)^(~p)*(~x)^(4*(~p) - 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸((~e)*(4*(~p) + 2*(~q) + 1)) + 1⨸((~e)*(4*(~p) + 2*(~q) + 1))* ∫(((~d) + (~e)*(~x)^2)^(~q)* expand_to_sum( (~e)*(4*(~p) + 2*(~q) + 1)*((~a) + (~c)*(~x)^4)^(~p) - (~d)*(~c)^(~p)*(4*(~p) - 1)*(~x)^(4*(~p) - 2) - (~e)*(~c)^(~p)*(4*(~p) + 2*(~q) + 1)*(~x)^(4*(~p)), (~x)), (~x)) : nothing) + +("1_2_2_3_19", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + ( + gt(2*(~d)/(~e) - (~b)/(~c), 0) || + !(lt(2*(~d)/(~e) - (~b)/(~c), 0)) && + eq((~d) - (~e)*rt((~a)/(~c), 2), 0) + ) ? +(~e)⨸(2*(~c))*∫(1⨸simp((~d)⨸(~e) + rt(2*(~d)⨸(~e) - (~b)⨸(~c), 2)*(~x) + (~x)^2, (~x)), (~x)) + (~e)⨸(2*(~c))*∫(1⨸simp((~d)⨸(~e) - rt(2*(~d)⨸(~e) - (~b)⨸(~c), 2)*(~x) + (~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_3_20", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + pos((~d)*(~e)) ? +(~e)⨸(2*(~c))*∫(1⨸simp((~d)⨸(~e) + rt(2*(~d)⨸(~e), 2)*(~x) + (~x)^2, (~x)), (~x)) + (~e)⨸(2*(~c))*∫(1⨸simp((~d)⨸(~e) - rt(2*(~d)⨸(~e), 2)*(~x) + (~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_3_21", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + gt((~b)^2 - 4*(~a)*(~c), 0) ? +((~e)⨸2 + (2*(~c)*(~d) - (~b)*(~e))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))* ∫(1⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) + ((~e)⨸2 - (2*(~c)*(~d) - (~b)*(~e))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))* ∫(1⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_22", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + !(gt((~b)^2 - 4*(~a)*(~c), 0)) ? +(~e)⨸(2*(~c)*rt(-2*(~d)⨸(~e) - (~b)⨸(~c), 2))*∫((rt(-2*(~d)⨸(~e) - (~b)⨸(~c), 2) - 2*(~x))⨸simp((~d)⨸(~e) + rt(-2*(~d)⨸(~e) - (~b)⨸(~c), 2)*(~x) - (~x)^2, (~x)), (~x)) + (~e)⨸(2*(~c)*rt(-2*(~d)⨸(~e) - (~b)⨸(~c), 2))*∫((rt(-2*(~d)⨸(~e) - (~b)⨸(~c), 2) + 2*(~x))⨸simp((~d)⨸(~e) - rt(-2*(~d)⨸(~e) - (~b)⨸(~c), 2)*(~x) - (~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_3_23", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + neg((~d)*(~e)) ? +(~e)⨸(2*(~c)*rt(-2*(~d)⨸(~e), 2))*∫((rt(-2*(~d)⨸(~e), 2) - 2*(~x))⨸simp((~d)⨸(~e) + rt(-2*(~d)⨸(~e), 2)*(~x) - (~x)^2, (~x)), (~x)) + (~e)⨸(2*(~c)*rt(-2*(~d)⨸(~e), 2))*∫((rt(-2*(~d)⨸(~e), 2) + 2*(~x))⨸simp((~d)⨸(~e) - rt(-2*(~d)⨸(~e), 2)*(~x) - (~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_3_24", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + pos((~b)^2 - 4*(~a)*(~c)) ? +((~e)⨸2 + (2*(~c)*(~d) - (~b)*(~e))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))* ∫(1⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) + ((~e)⨸2 - (2*(~c)*(~d) - (~b)*(~e))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))* ∫(1⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_25", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + pos(-(~a)*(~c)) ? +((~e)⨸2 + (~c)*(~d)⨸(2*rt(-(~a)*(~c), 2)))*∫(1⨸(-rt(-(~a)*(~c), 2) + (~c)*(~x)^2), (~x)) + ((~e)⨸2 - (~c)*(~d)⨸(2*rt(-(~a)*(~c), 2)))* ∫(1⨸(rt(-(~a)*(~c), 2) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_26", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + neg(-(~a)*(~c)) ? +((~d)*rt((~a)*(~c), 2) + (~a)*(~e))⨸(2*(~a)*(~c))* ∫((rt((~a)*(~c), 2) + (~c)*(~x)^2)⨸((~a) + (~c)*(~x)^4), (~x)) + ((~d)*rt((~a)*(~c), 2) - (~a)*(~e))⨸(2*(~a)*(~c))* ∫((rt((~a)*(~c), 2) - (~c)*(~x)^2)⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_27", +@rule ∫(((~d) + (~!e)*(~x)^2)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + neg((~b)^2 - 4*(~a)*(~c)) ? +1⨸(2*(~c)*rt((~a)⨸(~c), 2)*rt(2*(~q) - (~b)⨸(~c), 2))*∫(((~d)*rt(2*(~q) - (~b)⨸(~c), 2) - ((~d) - (~e)*rt((~a)⨸(~c), 2))*(~x))⨸(rt((~a)⨸(~c), 2) - rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) + 1⨸(2*(~c)*rt((~a)⨸(~c), 2)*rt(2*(~q) - (~b)⨸(~c), 2))*∫(((~d)*rt(2*(~q) - (~b)⨸(~c), 2) + ((~d) - (~e)*rt((~a)⨸(~c), 2))*(~x))⨸(rt((~a)⨸(~c), 2) + rt(2*(~q) - (~b)⨸(~c), 2)*(~x) + (~x)^2), (~x)) : nothing) + +("1_2_2_3_28", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~q)) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_3_29", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~q)) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q)⨸((~a) + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_3_30", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~q))) && + lt((~q), -1) ? +(~e)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)*∫(((~d) + (~e)*(~x)^2)^(~q), (~x)) + 1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~d) + (~e)*(~x)^2)^((~q) + 1)*((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x)^2)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_31", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~q))) && + lt((~q), -1) ? +(~e)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~d) + (~e)*(~x)^2)^(~q), (~x)) + (~c)⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~d) + (~e)*(~x)^2)^((~q) + 1)*((~d) - (~e)*(~x)^2)⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_32", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~q))) ? +2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~d) + (~e)*(~x)^2)^(~q)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2), (~x)) - 2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~d) + (~e)*(~x)^2)^(~q)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_33", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~q), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~q))) ? +-(~c)⨸(2*rt(-(~a)*(~c), 2))*∫(((~d) + (~e)*(~x)^2)^(~q)⨸(rt(-(~a)*(~c), 2) - (~c)*(~x)^2), (~x)) - (~c)⨸(2*rt(-(~a)*(~c), 2))*∫(((~d) + (~e)*(~x)^2)^(~q)⨸(rt(-(~a)*(~c), 2) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_34", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + gt((~p), 0) && + isfraction((~p)) && + ext_isinteger(2*(~p)) ? +(~x)*(2*(~b)*(~e)*(~p) + (~c)*(~d)*(4*(~p) + 3) + (~c)*(~e)*(4*(~p) + 1)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ (~p)⨸((~c)*(4*(~p) + 1)*(4*(~p) + 3)) + 2*(~p)⨸((~c)*(4*(~p) + 1)*(4*(~p) + 3))* ∫(simp( 2*(~a)*(~c)*(~d)*(4*(~p) + 3) - (~a)*(~b)*(~e) + (2*(~a)*(~c)*(~e)*(4*(~p) + 1) + (~b)*(~c)*(~d)*(4*(~p) + 3) - (~b)^2*(~e)*(2*(~p) + 1))*(~x)^2, (~x))* ((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1), (~x)) : nothing) + +("1_2_2_3_35", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~p), 0) && + isfraction((~p)) && + ext_isinteger(2*(~p)) ? +(~x)*((~d)*(4*(~p) + 3) + (~e)*(4*(~p) + 1)*(~x)^2)*((~a) + (~c)*(~x)^4)^ (~p)⨸((4*(~p) + 1)*(4*(~p) + 3)) + 2*(~p)⨸((4*(~p) + 1)*(4*(~p) + 3))* ∫(simp(2*(~a)*(~d)*(4*(~p) + 3) + (2*(~a)*(~e)*(4*(~p) + 1))*(~x)^2, (~x))*((~a) + (~c)*(~x)^4)^((~p) - 1), (~x)) : nothing) + +("1_2_2_3_36", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + lt((~p), -1) && + ext_isinteger(2*(~p)) ? +(~x)*((~a)*(~b)*(~e) - (~d)*((~b)^2 - 2*(~a)*(~c)) - (~c)*((~b)*(~d) - 2*(~a)*(~e))*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(2* (~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(simp((2*(~p) + 3)*(~d)*(~b)^2 - (~a)*(~b)*(~e) - 2*(~a)*(~c)*(~d)*(4*(~p) + 5) + (4*(~p) + 7)*((~d)*(~b) - 2*(~a)*(~e))*(~c)*(~x)^2, (~x))* ((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1), (~x)) : nothing) + +("1_2_2_3_37", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + lt((~p), -1) && + ext_isinteger(2*(~p)) ? +-(~x)*((~d) + (~e)*(~x)^2)*((~a) + (~c)*(~x)^4)^((~p) + 1)⨸(4*(~a)*((~p) + 1)) + 1⨸(4*(~a)*((~p) + 1))* ∫(simp((~d)*(4*(~p) + 5) + (~e)*(4*(~p) + 7)*(~x)^2, (~x))*((~a) + (~c)*(~x)^4)^((~p) + 1), (~x)) : nothing) + +("1_2_2_3_38", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~c), 0) ? +2*sqrt(-(~c))* ∫(((~d) + (~e)*(~x)^2)⨸(sqrt((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)*sqrt(-(~b) + rt((~b)^2 - 4*(~a)*(~c), 2) - 2*(~c)*(~x)^2)), (~x)) : nothing) + +("1_2_2_3_39", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + gt((~a), 0) && + lt((~c), 0) ? +sqrt(-(~c))*∫(((~d) + (~e)*(~x)^2)⨸(sqrt(rt(-(~a)*(~c), 2) + (~c)*(~x)^2)*sqrt(rt(-(~a)*(~c), 2) - (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_2_3_40", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + gt((~c)/(~a), 0) && + lt((~b)/(~a), 0) && + eq((~e) + (~d)*rt((~c)/(~a), 4)^2, 0) ? +-(~d)*(~x)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)) + (~d)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)* sqrt(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)^2))⨸(rt((~c)⨸(~a), 4)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_e(2*atan(rt((~c)⨸(~a), 4)*(~x)), 1⨸2 - (~b)*rt((~c)⨸(~a), 4)^2⨸(4*(~c))) : nothing) + +("1_2_2_3_41", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + gt((~c)/(~a), 0) && + lt((~b)/(~a), 0) && + !eq((~e) + (~d)*rt((~c)/(~a), 2), 0) ? +((~e) + (~d)*rt((~c)⨸(~a), 2))⨸rt((~c)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - (~e)⨸rt((~c)⨸(~a), 2)*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_42", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~a), 0) && + gt((~c), 0) && + eq(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)), 0) ? +(~e)*(~x)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸(2*(~c)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)) - (~e)*rt((~b)^2 - 4*(~a)*(~c), 2)*sqrt((2*(~a) + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2))* sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~c)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* sqrt((~a)⨸(2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)))* elliptic_e( asin((~x)⨸sqrt((2*(~a) + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2)⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))), ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_3_43", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + lt((~a), 0) && + gt((~c), 0) && + eq((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2), 0) && + ext_isinteger(rt(-(~a)*(~c), 2)) ? +(~e)*(~x)*(rt(-(~a)*(~c), 2) + (~c)*(~x)^2)⨸((~c)*sqrt((~a) + (~c)*(~x)^4)) - sqrt(2)*(~e)*rt(-(~a)*(~c), 2)*sqrt(-(~a) + rt(-(~a)*(~c), 2)*(~x)^2)* sqrt(((~a) + rt(-(~a)*(~c), 2)*(~x)^2)⨸rt(-(~a)*(~c), 2))⨸(sqrt(-(~a))*(~c)*sqrt((~a) + (~c)*(~x)^4))* elliptic_e(asin((~x)⨸sqrt(((~a) + rt(-(~a)*(~c), 2)*(~x)^2)⨸(2*rt(-(~a)*(~c), 2)))), 1⨸2) : nothing) + +("1_2_2_3_44", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + lt((~a), 0) && + gt((~c), 0) && + eq((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2), 0) ? +(~e)*(~x)*(rt(-(~a)*(~c), 2) + (~c)*(~x)^2)⨸((~c)*sqrt((~a) + (~c)*(~x)^4)) - sqrt(2)*(~e)*rt(-(~a)*(~c), 2)*sqrt(((~a) - rt(-(~a)*(~c), 2)*(~x)^2)⨸((~a) + rt(-(~a)*(~c), 2)*(~x)^2))* sqrt(((~a) + rt(-(~a)*(~c), 2)*(~x)^2)⨸rt(-(~a)*(~c), 2))⨸((~c)*sqrt((~a) + (~c)*(~x)^4)*sqrt((~a)⨸((~a) + rt(-(~a)*(~c), 2)*(~x)^2)))* elliptic_e(asin((~x)⨸sqrt(((~a) + rt(-(~a)*(~c), 2)*(~x)^2)⨸(2*rt(-(~a)*(~c), 2)))), 1⨸2) : nothing) + +("1_2_2_3_45", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~a), 0) && + gt((~c), 0) && + !eq(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)), 0) ? +(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))⨸(2*(~c))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~e)⨸(2*(~c))*∫(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_46", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + lt((~a), 0) && + gt((~c), 0) && + !eq((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2), 0) ? +((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2))⨸(~c)*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) - (~e)⨸(~c)*∫((rt(-(~a)*(~c), 2) - (~c)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_47", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + pos(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) || + pos(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) ? +(~d)*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~e)*∫((~x)^2⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_48", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + gt(-(~a)*(~c), 0) ? +(~d)*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + (~e)*∫((~x)^2⨸sqrt((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_49", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + eq(2*(~c)*(~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)), 0) && + !(simpler(rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c),2),rt( 2))/(2*(~a)), -((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(2*(~a)),2))) ? +-(~a)*(~e)*rt(-((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*sqrt(1 + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))* sqrt(1 + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))⨸((~c)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_e(asin(rt(-((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_3_50", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + !eq(2*(~c)*(~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)), 0) && + !(simpler(rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c),2),rt( 2))/(2*(~a)), -((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))/(2*(~a)),2))) ? +(2*(~c)*(~d) - (~e)*((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))⨸(2*(~c))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~e)⨸(2*(~c))*∫(((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_51", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + eq(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)), 0) ? +-(~a)*(~e)*rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*sqrt(1 + ((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))* sqrt(1 + ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))*(~x)^2⨸(2*(~a)))⨸((~c)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_e(asin(rt(-((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))⨸(2*(~a)), 2)*(~x)), ((~b) + rt((~b)^2 - 4*(~a)*(~c), 2))⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))) : nothing) + +("1_2_2_3_52", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + neg(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2))/(~a)) && + !eq(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)), 0) ? +(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))⨸(2*(~c))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~e)⨸(2*(~c))*∫(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_53", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~c)/(~a)) && + eq((~e) + (~d)*rt((~c)/(~a), 4)^2, 0) ? +-(~d)*(~x)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)) + (~d)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)* sqrt(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)^2))⨸(rt((~c)⨸(~a), 4)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_e(2*atan(rt((~c)⨸(~a), 4)*(~x)), 1⨸2 - (~b)*rt((~c)⨸(~a), 4)^2⨸(4*(~c))) : nothing) + +("1_2_2_3_54", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + pos((~c)/(~a)) && + eq((~e) + (~d)*rt((~c)/(~a), 4)^2, 0) ? +-(~d)*(~x)*sqrt((~a) + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)) + (~d)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)* sqrt(((~a) + (~c)*(~x)^4)⨸((~a)*(1 + rt((~c)⨸(~a), 4)^2*(~x)^2)^2))⨸(rt((~c)⨸(~a), 4)*sqrt((~a) + (~c)*(~x)^4))* elliptic_e(2*atan(rt((~c)⨸(~a), 4)*(~x)), 1⨸2) : nothing) + +("1_2_2_3_55", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~c)/(~a)) && + !eq((~e) + (~d)*rt((~c)/(~a), 2), 0) ? +((~e) + (~d)*rt((~c)⨸(~a), 2))⨸rt((~c)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - (~e)⨸rt((~c)⨸(~a), 2)*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_56", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + pos((~c)/(~a)) && + !eq((~e) + (~d)*rt((~c)/(~a), 2), 0) ? +((~e) + (~d)*rt((~c)⨸(~a), 2))⨸rt((~c)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) - (~e)⨸rt((~c)⨸(~a), 2)*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_57", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + neg((~c)/(~a)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + gt((~a), 0) ? +(~d)⨸sqrt((~a))*∫(sqrt(1 + (~e)*(~x)^2⨸(~d))⨸sqrt(1 - (~e)*(~x)^2⨸(~d)), (~x)) : nothing) + +("1_2_2_3_58", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + neg((~c)/(~a)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(gt((~a), 0)) ? +sqrt(1 + (~c)*(~x)^4⨸(~a))⨸sqrt((~a) + (~c)*(~x)^4)* ∫(((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)*(~x)^4⨸(~a)), (~x)) : nothing) + +("1_2_2_3_59", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + neg((~c)/(~a)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +((~d)*rt(-(~c)⨸(~a), 2) - (~e))⨸rt(-(~c)⨸(~a), 2)*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + (~e)⨸rt(-(~c)⨸(~a), 2)*∫((1 + rt(-(~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_3_60", +@rule ∫(((~d) + (~!e)*(~x)^2)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + neg((~c)/(~a)) ? +sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))* sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* ∫(((~d) + (~e)*(~x)^2)⨸(sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))* sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))), (~x)) : nothing) + +("1_2_2_3_61", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_3_62", +@rule ∫(((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)*((~a) + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +#(* Int[(d_+e_.*x_^2)^2/Sqrt[a_+b_.*x_^2+c_.*x_^4],x_Symbol] := e^2*x*Sqrt[a+b*x^2+c*x^4]/(3*c) + 2*(3*c*d-b*e)/(3*c)*Int[(d+e*x^2)/Sqrt[a+b*x^2+c*x^4],x] - (3*c*d^2-2*b*d*e+a*e^2)/(3*c)*Int[1/Sqrt[a+b*x^2+c*x^4],x] /; FreeQ[{a,b,c,d,e},x] && NeQ[b^2-4*a*c,0] && NeQ[c*d^2-b*d*e+a*e^2,0] *) +#(* Int[(d_+e_.*x_^2)^2/Sqrt[a_+c_.*x_^4],x_Symbol] := e^2*x*Sqrt[a+c*x^4]/(3*c) + 2*d*Int[(d+e*x^2)/Sqrt[a+c*x^4],x] - (3*c*d^2+a*e^2)/(3*c)*Int[1/Sqrt[a+c*x^4],x] /; FreeQ[{a,c,d,e},x] && NeQ[c*d^2+a*e^2,0] *) +#(* Int[(d_+e_.*x_^2)^q_/Sqrt[a_+b_.*x_^2+c_.*x_^4],x_Symbol] := e^2*x*(d+e*x^2)^(q-2)*Sqrt[a+b*x^2+c*x^4]/(c*(2*q-1)) + 2*(q-1)*(3*c*d-b*e)/(c*(2*q-1))*Int[(d+e*x^2)^(q-1)/Sqrt[a+b*x^2+c* x^4],x] - (2*q-3)*(3*c*d^2-2*b*d*e+a*e^2)/(c*(2*q-1))*Int[(d+e*x^2)^(q-2)/ Sqrt[a+b*x^2+c*x^4],x] + 2*d*(q-2)*(c*d^2-b*d*e+a*e^2)/(c*(2*q-1))*Int[(d+e*x^2)^(q-3)/Sqrt[ a+b*x^2+c*x^4],x] /; FreeQ[{a,b,c,d,e},x] && NeQ[b^2-4*a*c,0] && IGtQ[q,2] *) +#(* Int[(d_+e_.*x_^2)^q_/Sqrt[a_+c_.*x_^4],x_Symbol] := e^2*x*(d+e*x^2)^(q-2)*Sqrt[a+c*x^4]/(c*(2*q-1)) + 6*d*(q-1)/(2*q-1)*Int[(d+e*x^2)^(q-1)/Sqrt[a+c*x^4],x] - (2*q-3)*(3*c*d^2+a*e^2)/(c*(2*q-1))*Int[(d+e*x^2)^(q-2)/Sqrt[a+c*x^ 4],x] + 2*d*(q-2)*(c*d^2+a*e^2)/(c*(2*q-1))*Int[(d+e*x^2)^(q-3)/Sqrt[a+c*x^ 4],x] /; FreeQ[{a,c,d,e},x] && IGtQ[q,2] *) +("1_2_2_3_63", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~q), 1) && + lt((~p), -1) ? +(~x)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)*((~a)*(~b)*ext_coeff( poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2) - ext_coeff(poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*((~b)^2 - 2*(~a)*(~c)) - (~c)*((~b)*ext_coeff(poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0) - 2*(~a)*ext_coeff( poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2))*(~x)^2)⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))*∫(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)* expand_to_sum( 2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))* poly_quotient(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)) + (~b)^2*ext_coeff(poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*(2*(~p) + 3) - 2*(~a)*(~c)*ext_coeff(poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*(4*(~p) + 5) - (~a)*(~b)*ext_coeff( poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2) + (~c)*(4*(~p) + 7)*((~b)*ext_coeff(poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0) - 2*(~a)*ext_coeff( poly_remainder(((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_3_64", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~q), 1) ? +(~e)^(~q)*(~x)^(2*(~q) - 3)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*(4*(~p) + 2*(~q) + 1)) + 1⨸((~c)*(4*(~p) + 2*(~q) + 1))*∫(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)* expand_to_sum( (~c)*(4*(~p) + 2*(~q) + 1)*((~d) + (~e)*(~x)^2)^(~q) - (~a)*(2*(~q) - 3)*(~e)^(~q)*(~x)^(2*(~q) - 4) - (~b)*(2*(~p) + 2*(~q) - 1)*(~e)^(~q)*(~x)^(2*(~q) - 2) - (~c)*(4*(~p) + 2*(~q) + 1)*(~e)^(~q)*(~x)^(2*(~q)), (~x)), (~x)) : nothing) + +("1_2_2_3_65", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~q), 1) ? +(~e)^(~q)*(~x)^(2*(~q) - 3)*((~a) + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*(4*(~p) + 2*(~q) + 1)) + 1⨸((~c)*(4*(~p) + 2*(~q) + 1))*∫(((~a) + (~c)*(~x)^4)^(~p)* expand_to_sum( (~c)*(4*(~p) + 2*(~q) + 1)*((~d) + (~e)*(~x)^2)^(~q) - (~a)*(2*(~q) - 3)*(~e)^(~q)*(~x)^(2*(~q) - 4) - (~c)*(4*(~p) + 2*(~q) + 1)*(~e)^(~q)*(~x)^(2*(~q)), (~x)), (~x)) : nothing) + +("1_2_2_3_66", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + igt((~p) + 1/2, 0) ? +-1⨸(~e)^2* ∫(((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1), (~x)) + ((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸(~e)^2* ∫(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_67", +@rule ∫(((~a) + (~!c)*(~x)^4)^(~p)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + igt((~p) + 1/2, 0) ? +-1⨸(~e)^2*∫(((~c)*(~d) - (~c)*(~e)*(~x)^2)*((~a) + (~c)*(~x)^4)^((~p) - 1), (~x)) + ((~c)*(~d)^2 + (~a)*(~e)^2)⨸(~e)^2*∫(((~a) + (~c)*(~x)^4)^((~p) - 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_68", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +1⨸(2*(~d))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + 1⨸(2*(~d))*∫(((~d) - (~e)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_69", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +1⨸(2*(~d))*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + 1⨸(2*(~d))*∫(((~d) - (~e)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_70", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + lt((~c), 0) ? +2*sqrt(-(~c))* ∫(1⨸(((~d) + (~e)*(~x)^2)*sqrt((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)*sqrt(-(~b) + rt((~b)^2 - 4*(~a)*(~c), 2) - 2*(~c)*(~x)^2)), (~x)) : nothing) + +("1_2_2_3_71", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + gt((~a), 0) && + lt((~c), 0) ? +sqrt(-(~c))* ∫(1⨸(((~d) + (~e)*(~x)^2)*sqrt(rt(-(~a)*(~c), 2) + (~c)*(~x)^2)*sqrt(rt(-(~a)*(~c), 2) - (~c)*(~x)^2)), (~x)) : nothing) + +("1_2_2_3_72", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~b)^2 - 4*(~a)*(~c), 0) && + !(lt((~c), 0)) ? +2*(~c)⨸(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - (~e)⨸(2*(~c)*(~d) - (~e)*((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))* ∫(((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_73", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + gt(-(~a)*(~c), 0) && + !(lt((~c), 0)) ? +(~c)⨸((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2))*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + (~e)⨸((~c)*(~d) + (~e)*rt(-(~a)*(~c), 2))*∫((rt(-(~a)*(~c), 2) - (~c)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_74", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + pos((~c)/(~a)) ? +((~c)*(~d) + (~a)*(~e)*rt((~c)⨸(~a), 2))⨸((~c)*(~d)^2 - (~a)*(~e)^2)*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - ((~a)*(~e)*((~e) + (~d)*rt((~c)⨸(~a), 2)))⨸((~c)*(~d)^2 - (~a)*(~e)^2)* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_75", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + pos((~c)/(~a)) ? +((~c)*(~d) + (~a)*(~e)*rt((~c)⨸(~a), 2))⨸((~c)*(~d)^2 - (~a)*(~e)^2)*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) - ((~a)*(~e)*((~e) + (~d)*rt((~c)⨸(~a), 2)))⨸((~c)*(~d)^2 - (~a)*(~e)^2)* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_76", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + neg((~c)/(~a)) && + gt((~a), 0) ? +1⨸((~d)*sqrt((~a))*rt(-(~c)⨸(~a), 4))*elliptic_pi(-(~e)⨸((~d)*rt(-(~c)⨸(~a), 4)^2), asin(rt(-(~c)⨸(~a), 4)*(~x)), -1) : nothing) + +("1_2_2_3_77", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + neg((~c)/(~a)) && + !(gt((~a), 0)) ? +sqrt(1 + (~c)*(~x)^4⨸(~a))⨸sqrt((~a) + (~c)*(~x)^4)* ∫(1⨸(((~d) + (~e)*(~x)^2)*sqrt(1 + (~c)*(~x)^4⨸(~a))), (~x)) : nothing) + +("1_2_2_3_78", +@rule ∫(1/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + neg((~c)/(~a)) ? +sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))* sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* ∫( 1⨸(((~d) + (~e)*(~x)^2)*sqrt(1 + 2*(~c)*(~x)^2⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))* sqrt(1 + 2*(~c)*(~x)^2⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))), (~x)) : nothing) + +("1_2_2_3_79", +@rule ∫(((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ilt((~p) + 1/2, 0) ? +1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) + (~e)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_80", +@rule ∫(((~a) + (~!c)*(~x)^4)^(~p)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ilt((~p) + 1/2, 0) ? +1⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~c)*(~d) - (~c)*(~e)*(~x)^2)*((~a) + (~c)*(~x)^4)^(~p), (~x)) + (~e)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~a) + (~c)*(~x)^4)^((~p) + 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_81", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ilt((~q), -1) ? +-(~e)^2*(~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸(2*(~d)*((~q) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)) + 1⨸(2*(~d)*((~q) + 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x)^2)^((~q) + 1)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* simp((~a)*(~e)^2*(2*(~q) + 3) + 2*(~d)*((~c)*(~d) - (~b)*(~e))*((~q) + 1) - 2*(~e)*((~c)*(~d)*((~q) + 1) - (~b)*(~e)*((~q) + 2))*(~x)^2 + (~c)*(~e)^2*(2*(~q) + 5)*(~x)^4, (~x)), (~x)) : nothing) + +("1_2_2_3_82", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)/sqrt((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + ilt((~q), -1) ? +-(~e)^2*(~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)* sqrt((~a) + (~c)*(~x)^4)⨸(2*(~d)*((~q) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2)) + 1⨸(2*(~d)*((~q) + 1)*((~c)*(~d)^2 + (~a)*(~e)^2))* ∫(((~d) + (~e)*(~x)^2)^((~q) + 1)⨸sqrt((~a) + (~c)*(~x)^4)* simp((~a)*(~e)^2*(2*(~q) + 3) + 2*(~c)*(~d)^2*((~q) + 1) - 2*(~e)*(~c)*(~d)*((~q) + 1)*(~x)^2 + (~c)*(~e)^2*(2*(~q) + 5)*(~x)^4, (~x)), (~x)) : nothing) + +("1_2_2_3_83", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)/((~d) + (~!e)*(~x)^2)^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + pos((~e)/(~d)) ? +(~c)*((~d) + (~e)*(~x)^2)* sqrt(((~e)^2*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))⨸((~c)*((~d) + (~e)*(~x)^2)^2))⨸(2*(~d)*(~e)^2*rt((~e)⨸(~d), 2)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* elliptic_e(2*atan(rt((~e)⨸(~d), 2)*(~x)), (2*(~c)*(~d) - (~b)*(~e))⨸(4*(~c)*(~d))) : nothing) + +("1_2_2_3_84", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)/((~d) + (~!e)*(~x)^2)^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +(~x)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸(2*(~d)*((~d) + (~e)*(~x)^2)) + (~c)⨸(2*(~d)*(~e)^2)*∫(((~d) - (~e)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - ((~c)*(~d)^2 - (~a)*(~e)^2)⨸(2*(~d)*(~e)^2)* ∫(1⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_85", +@rule ∫(sqrt((~a) + (~!c)*(~x)^4)/((~d) + (~!e)*(~x)^2)^2,(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +(~x)*sqrt((~a) + (~c)*(~x)^4)⨸(2*(~d)*((~d) + (~e)*(~x)^2)) + (~c)⨸(2*(~d)*(~e)^2)*∫(((~d) - (~e)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x)) - ((~c)*(~d)^2 - (~a)*(~e)^2)⨸(2*(~d)*(~e)^2)* ∫(1⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +# ("1_2_2_3_86", +# @rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && +# !eq((~b)^2 - 4*(~a)*(~c), 0) && +# !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && +# ilt((~q), 0) && +# ext_isinteger((~p) + 1/2) ? +# Module[{(~aa), (~bb), (~cc)}, ∫( ReplaceAll[ ext_expand( 1⨸sqrt((~aa) + (~bb)*(~x)^2 + (~cc)*(~x)^4), ((~d) + (~e)*(~x)^2)^ (~q)*((~aa) + (~bb)*(~x)^2 + (~cc)*(~x)^4)^((~p) + 1⨸2), (~x)), {(~aa) -> (~a), (~bb) -> (~b), (~cc) -> (~c)}], (~x))] : nothing) +# +# ("1_2_2_3_87", +# @rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => +# !contains_var((~a), (~c), (~d), (~e), (~x)) && +# !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && +# ilt((~q), 0) && +# ext_isinteger((~p) + 1/2) ? +# Module[{(~aa), (~cc)}, ∫( ReplaceAll[ ext_expand( 1⨸sqrt((~aa) + (~cc)*(~x)^4), ((~d) + (~e)*(~x)^2)^(~q)*((~aa) + (~cc)*(~x)^4)^((~p) + 1⨸2), (~x)), {(~aa) -> (~a), (~cc) -> (~c)}], (~x))] : nothing) + +("1_2_2_3_88", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d) - (~b)*(~e), 0) && + gt((~a), 0) && + gt((~d), 0) ? +1⨸(2*sqrt((~a))*sqrt((~d))*rt(-(~e)⨸(~d), 2))* elliptic_f(2*asin(rt(-(~e)⨸(~d), 2)*(~x)), (~b)*(~d)⨸(4*(~a)*(~e))) : nothing) + +("1_2_2_3_89", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d) - (~b)*(~e), 0) && + !( + gt((~a), 0) && + gt((~d), 0) + ) ? +sqrt(((~d) + (~e)*(~x)^2)⨸(~d))* sqrt(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸(~a))⨸(sqrt((~d) + (~e)*(~x)^2)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* ∫(1⨸(sqrt(1 + (~e)⨸(~d)*(~x)^2)*sqrt(1 + (~b)⨸(~a)*(~x)^2 + (~c)⨸(~a)*(~x)^4)), (~x)) : nothing) + +("1_2_2_3_90", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +(~x)^3*sqrt((~e) + (~d)⨸(~x)^2)* sqrt((~c) + (~b)⨸(~x)^2 + (~a)⨸(~x)^4)⨸(sqrt((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* ∫(1⨸((~x)^3*sqrt((~e) + (~d)⨸(~x)^2)*sqrt((~c) + (~b)⨸(~x)^2 + (~a)⨸(~x)^4)), (~x)) : nothing) + +("1_2_2_3_91", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +(~x)^3*sqrt((~e) + (~d)⨸(~x)^2)* sqrt((~c) + (~a)⨸(~x)^4)⨸(sqrt((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4))* ∫(1⨸((~x)^3*sqrt((~e) + (~d)⨸(~x)^2)*sqrt((~c) + (~a)⨸(~x)^4)), (~x)) : nothing) + +("1_2_2_3_92", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d) - (~b)*(~e), 0) && + gt((~a), 0) && + gt((~d), 0) ? +sqrt((~a))⨸(2*sqrt((~d))*rt(-(~e)⨸(~d), 2))* elliptic_e(2*asin(rt(-(~e)⨸(~d), 2)*(~x)), (~b)*(~d)⨸(4*(~a)*(~e))) : nothing) + +("1_2_2_3_93", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)*(~d) - (~b)*(~e), 0) && + !( + gt((~a), 0) && + gt((~d), 0) + ) ? +sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)* sqrt(((~d) + (~e)*(~x)^2)⨸(~d))⨸(sqrt((~d) + (~e)*(~x)^2)*sqrt(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸(~a)))* ∫(sqrt(1 + (~b)⨸(~a)*(~x)^2 + (~c)⨸(~a)*(~x)^4)⨸sqrt(1 + (~e)⨸(~d)*(~x)^2), (~x)) : nothing) + +("1_2_2_3_94", +@rule ∫(sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) ? +sqrt((~e) + (~d)⨸(~x)^2)* sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~x)*sqrt((~d) + (~e)*(~x)^2)*sqrt((~c) + (~b)⨸(~x)^2 + (~a)⨸(~x)^4))* ∫(((~x)*sqrt((~c) + (~b)⨸(~x)^2 + (~a)⨸(~x)^4))⨸sqrt((~e) + (~d)⨸(~x)^2), (~x)) : nothing) + +("1_2_2_3_95", +@rule ∫(sqrt((~a) + (~!c)*(~x)^4)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) ? +sqrt((~e) + (~d)⨸(~x)^2)*sqrt((~a) + (~c)*(~x)^4)⨸((~x)*sqrt((~d) + (~e)*(~x)^2)*sqrt((~c) + (~a)⨸(~x)^4))* ∫(((~x)*sqrt((~c) + (~a)⨸(~x)^4))⨸sqrt((~e) + (~d)⨸(~x)^2), (~x)) : nothing) + +("1_2_2_3_96", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ( + ext_isinteger((~p)) && + ext_isinteger((~q)) || + igt((~p), 0) || + igt((~q), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_3_97", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~q), (~x)) && + ( + ext_isinteger((~p)) && + ext_isinteger((~q)) || + igt((~p), 0) + ) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_3_98", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) && + ilt((~q), 0) ? +∫(ext_expand(((~a) + (~c)*(~x)^4)^ (~p), ((~d)⨸((~d)^2 - (~e)^2*(~x)^4) - (~e)*(~x)^2⨸((~d)^2 - (~e)^2*(~x)^4))^(-(~q)), (~x)), (~x)) : nothing) + +# ("1_2_2_3_99", +# @rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)] : nothing) + +# ("1_2_2_3_100", +# @rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => +# !contains_var((~a), (~c), (~d), (~e), (~p), (~q), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~c)*(~x)^4)^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.4 (f x)^m (d+e x^2)^q (a+b x^2+c x^4)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.4 (f x)^m (d+e x^2)^q (a+b x^2+c x^4)^p.jl new file mode 100644 index 0000000..9ea6a4e --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.4 (f x)^m (d+e x^2)^q (a+b x^2+c x^4)^p.jl @@ -0,0 +1,801 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.2.4 (f x)^m (d+e x^2)^q (a+b x^2+c x^4)^p *) +#(* Int[(f_.*x_)^m_.*(e_.*x_^2)^q_.*(a_+b_.*x_^2+c_.*x_^4)^p_.,x_ Symbol] := e^q/f^(2*q)*Int[(f*x)^(m+2*q)*(a+b*x^2+c*x^4)^p,x] /; FreeQ[{a,b,c,e,f,m,p},x] && IntegerQ[q] *) +#(* Int[(f_.*x_)^m_.*(e_.*x_^2)^q_.*(a_+c_.*x_^4)^p_.,x_Symbol] := e^q/f^(2*q)*Int[(f*x)^(m+2*q)*(a+c*x^4)^p,x] /; FreeQ[{a,c,e,f,m,p},x] && IntegerQ[q] *) +("1_2_2_4_1", +@rule ∫((~x)^(~!m)*((~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~p), (~q), (~x)) && + !(ext_isinteger((~q))) && + ext_isinteger(((~m) - 1)/2) ? +1⨸(2*(~e)^(((~m) - 1)⨸2))* int_and_subst(((~e)*(~x))^((~q) + ((~m) - 1)⨸2)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_4_1") : nothing) + +("1_2_2_4_2", +@rule ∫((~x)^(~!m)*((~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~e), (~p), (~q), (~x)) && + !(ext_isinteger((~q))) && + ext_isinteger(((~m) - 1)/2) ? +1⨸(2*(~e)^(((~m) - 1)⨸2))* int_and_subst(((~e)*(~x))^((~q) + ((~m) - 1)⨸2)*((~a) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_4_2") : nothing) + +("1_2_2_4_3", +@rule ∫(((~!f)*(~x))^(~!m)*((~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~m), (~p), (~q), (~x)) && + !(ext_isinteger((~q))) ? +(~e)^intpart((~q))*((~e)*(~x)^2)^ fracpart((~q))⨸((~f)^(2*intpart((~q)))*((~f)*(~x))^(2*fracpart((~q))))* ∫(((~f)*(~x))^((~m) + 2*(~q))*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) : nothing) + +("1_2_2_4_4", +@rule ∫(((~!f)*(~x))^(~!m)*((~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~e), (~f), (~m), (~p), (~q), (~x)) && + !(ext_isinteger((~q))) ? +(~e)^intpart((~q))*((~e)*(~x)^2)^ fracpart((~q))⨸((~f)^(2*intpart((~q)))*((~f)*(~x))^(2*fracpart((~q))))* ∫(((~f)*(~x))^((~m) + 2*(~q))*((~a) + (~c)*(~x)^4)^(~p), (~x)) : nothing) + +("1_2_2_4_5", +@rule ∫((~x)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) ? +1⨸2*int_and_subst(((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_4_5") : nothing) + +("1_2_2_4_6", +@rule ∫((~x)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~q), (~x)) ? +1⨸2*int_and_subst(((~d) + (~e)*(~x))^(~q)*((~a) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_4_6") : nothing) + +#(* Int[(f_.*x_)^m_.*(d_+e_.*x_^2)^q_.*(a_+b_.*x_^2+c_.*x_^4)^p_.,x_ Symbol] := 1/c^p*Int[(f*x)^m*(d+e*x^2)^q*(b/2+c*x^2)^(2*p),x] /; FreeQ[{a,b,c,d,e,f,m,p,q},x] && EqQ[b^2-4*a*c,0] && IntegerQ[p] *) +("1_2_2_4_7", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) && + igt(((~m) + 1)/2, 0) ? +1⨸2*int_and_subst((~x)^(((~m) - 1)⨸2)*((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_4_7") : nothing) + +("1_2_2_4_8", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart((~p))⨸((~c)^intpart((~p))*((~b)⨸2 + (~c)*(~x)^2)^(2*fracpart((~p))))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)*((~b)⨸2 + (~c)*(~x)^2)^(2*(~p)), (~x)) : nothing) + +("1_2_2_4_9", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + ext_isinteger(((~m) - 1)/2) ? +1⨸2*int_and_subst((~x)^(((~m) - 1)⨸2)*((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_4_9") : nothing) + +("1_2_2_4_10", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~p), (~q), (~x)) && + ext_isinteger(((~m) + 1)/2) ? +1⨸2*int_and_subst((~x)^(((~m) - 1)⨸2)*((~d) + (~e)*(~x))^(~q)*((~a) + (~c)*(~x)^2)^(~p), (~x), (~x), (~x)^2, "1_2_2_4_10") : nothing) + +("1_2_2_4_11", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) ? +∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_4_12", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~q), (~m), (~q), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + ext_isinteger((~p)) ? +∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_4_13", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart( (~p))⨸(((~d) + (~e)*(~x)^2)^fracpart((~p))*((~a)⨸(~d) + ((~c)*(~x)^2)⨸(~e))^fracpart((~p)))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_4_14", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) && + eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + !(ext_isinteger((~p))) ? +((~a) + (~c)*(~x)^4)^ fracpart( (~p))⨸(((~d) + (~e)*(~x)^2)^fracpart((~p))*((~a)⨸(~d) + ((~c)*(~x)^2)⨸(~e))^fracpart((~p)))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) + (~p))*((~a)⨸(~d) + (~c)⨸(~e)*(~x)^2)^(~p), (~x)) : nothing) + +("1_2_2_4_15", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + ilt((~q), -1) && + igt((~m)/2, 0) ? +(-(~d))^((~m)⨸2 - 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)^(~p)* (~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1)) + 1⨸(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1))*∫(((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum( together( 1⨸((~d) + (~e)*(~x)^2)*(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1)* (~x)^(~m)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p) - (-(~d))^((~m)⨸2 - 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)^ (~p)*((~d) + (~e)*(2*(~q) + 3)*(~x)^2))), (~x)), (~x)) : nothing) + +("1_2_2_4_16", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + igt((~p), 0) && + ilt((~q), -1) && + igt((~m)/2, 0) ? +(-(~d))^((~m)⨸2 - 1)*((~c)*(~d)^2 + (~a)*(~e)^2)^(~p)* (~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1)) + 1⨸(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1))*∫(((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum( together( 1⨸((~d) + (~e)*(~x)^2)*(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1)*(~x)^(~m)*((~a) + (~c)*(~x)^4)^(~p) - (-(~d))^((~m)⨸2 - 1)*((~c)*(~d)^2 + (~a)*(~e)^2)^ (~p)*((~d) + (~e)*(2*(~q) + 3)*(~x)^2))), (~x)), (~x)) : nothing) + +("1_2_2_4_17", +@rule ∫((~x)^(~m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + ilt((~q), -1) && + ilt((~m)/2, 0) ? +(-(~d))^((~m)⨸2 - 1)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)^(~p)* (~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1)) + (-(~d))^((~m)⨸2 - 1)⨸(2*(~e)^(2*(~p))*((~q) + 1))*∫((~x)^(~m)*((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum( together( 1⨸((~d) + (~e)*(~x)^2)*(2*(-(~d))^(-(~m)⨸2 + 1)* (~e)^(2*(~p))*((~q) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p) - ((~e)^(-(~m)⨸2)*((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)^(~p)*(~x)^(-(~m)))*((~d) + (~e)*(2*(~q) + 3)*(~x)^2))), (~x)), (~x)) : nothing) + +("1_2_2_4_18", +@rule ∫((~x)^(~m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + igt((~p), 0) && + ilt((~q), -1) && + ilt((~m)/2, 0) ? +(-(~d))^((~m)⨸2 - 1)*((~c)*(~d)^2 + (~a)*(~e)^2)^(~p)* (~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~e)^(2*(~p) + (~m)⨸2)*((~q) + 1)) + (-(~d))^((~m)⨸2 - 1)⨸(2*(~e)^(2*(~p))*((~q) + 1))*∫((~x)^(~m)*((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum( together( 1⨸((~d) + (~e)*(~x)^2)*(2*(-(~d))^(-(~m)⨸2 + 1)* (~e)^(2*(~p))*((~q) + 1)*((~a) + (~c)*(~x)^4)^(~p) - ((~e)^(-(~m)⨸2)*((~c)*(~d)^2 + (~a)*(~e)^2)^(~p)*(~x)^(-(~m)))*((~d) + (~e)*(2*(~q) + 3)*(~x)^2))), (~x)), (~x)) : nothing) + +("1_2_2_4_19", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + igt((~q), -2) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_4_20", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + igt((~p), 0) && + igt((~q), -2) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_4_21", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + lt((~q), -1) && + gt((~m), 0) ? +-ext_coeff( poly_remainder(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~d)*(~f)*((~q) + 1)) + (~f)⨸(2*(~d)*((~q) + 1))* ∫(((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum(2*(~d)*((~q) + 1)*(~x)*poly_quotient(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)) + ext_coeff( poly_remainder(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*((~m) + 2*(~q) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_2_4_22", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + igt((~p), 0) && + lt((~q), -1) && + gt((~m), 0) ? +-ext_coeff(poly_remainder(((~a) + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸(2*(~d)*(~f)*((~q) + 1)) + (~f)⨸(2*(~d)*((~q) + 1))* ∫(((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)* expand_to_sum(2*(~d)*((~q) + 1)*(~x)*poly_quotient(((~a) + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)) + ext_coeff(poly_remainder(((~a) + (~c)*(~x)^4)^(~p), (~d) + (~e)*(~x)^2, (~x)), (~x), 0)*((~m) + 2*(~q) + 3)*(~x), (~x)), (~x)) : nothing) + +("1_2_2_4_23", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + lt((~m), -1) ? +poly_remainder(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~f)*(~x), (~x))*((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸((~d)*(~f)*((~m) + 1)) + 1⨸((~d)*(~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^(~q)* expand_to_sum((~d)*(~f)*((~m) + 1)*poly_quotient(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~f)*(~x), (~x))⨸(~x) - (~e)*poly_remainder(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~f)*(~x), (~x))*((~m) + 2*(~q) + 3), (~x)), (~x)) : nothing) + +("1_2_2_4_24", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~q), (~x)) && + igt((~p), 0) && + lt((~m), -1) ? +poly_remainder(((~a) + (~c)*(~x)^4)^(~p), (~f)*(~x), (~x))*((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸((~d)*(~f)*((~m) + 1)) + 1⨸((~d)*(~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^(~q)* expand_to_sum((~d)*(~f)*((~m) + 1)*poly_quotient(((~a) + (~c)*(~x)^4)^(~p), (~f)*(~x), (~x))⨸(~x) - (~e)*poly_remainder(((~a) + (~c)*(~x)^4)^(~p), (~f)*(~x), (~x))*((~m) + 2*(~q) + 3), (~x)), (~x)) : nothing) + +("1_2_2_4_25", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) && + !(ext_isinteger((~q))) && + !eq((~m) + 4*(~p) + 2*(~q) + 1, 0) ? +(~c)^(~p)*((~f)*(~x))^((~m) + 4*(~p) - 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸((~e)* (~f)^(4*(~p) - 1)*((~m) + 4*(~p) + 2*(~q) + 1)) + 1⨸((~e)*((~m) + 4*(~p) + 2*(~q) + 1))*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)* expand_to_sum( (~e)*((~m) + 4*(~p) + 2*(~q) + 1)*(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p) - (~c)^(~p)*(~x)^(4*(~p))) - (~d)*(~c)^(~p)*((~m) + 4*(~p) - 1)*(~x)^(4*(~p) - 2), (~x)), (~x)) : nothing) + +("1_2_2_4_26", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + igt((~p), 0) && + !(ext_isinteger((~q))) && + !eq((~m) + 4*(~p) + 2*(~q) + 1, 0) ? +(~c)^(~p)*((~f)*(~x))^((~m) + 4*(~p) - 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)⨸((~e)* (~f)^(4*(~p) - 1)*((~m) + 4*(~p) + 2*(~q) + 1)) + 1⨸((~e)*((~m) + 4*(~p) + 2*(~q) + 1))*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)* expand_to_sum( (~e)*((~m) + 4*(~p) + 2*(~q) + 1)*(((~a) + (~c)*(~x)^4)^(~p) - (~c)^(~p)*(~x)^(4*(~p))) - (~d)*(~c)^(~p)*((~m) + 4*(~p) - 1)*(~x)^(4*(~p) - 2), (~x)), (~x)) : nothing) + +("1_2_2_4_27", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + isfraction((~m)) && + ext_isinteger((~p)) ? +ext_den((~m))⨸(~f)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*((~d) + (~e)*(~x)^(2*ext_den((~m)))⨸(~f)^2)^ (~q)*((~a) + (~b)*(~x)^(2*ext_den((~m)))⨸(~f)^ext_den((~m)) + (~c)*(~x)^(4*ext_den((~m)))⨸(~f)^4)^(~p), (~x), (~x), ((~f)*(~x))^(1⨸ext_den((~m))), "1_2_2_4_27") : nothing) + +("1_2_2_4_28", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~p), (~q), (~x)) && + isfraction((~m)) && + ext_isinteger((~p)) ? +ext_den((~m))⨸(~f)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*((~d) + (~e)*(~x)^(2*ext_den((~m)))⨸(~f))^(~q)*((~a) + (~c)*(~x)^(4*ext_den((~m)))⨸(~f))^(~p), (~x), (~x), ((~f)*(~x))^(1⨸ext_den((~m))), "1_2_2_4_28") : nothing) + +("1_2_2_4_29", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + lt((~m), -1) && + (~m) + 4*(~p) + 3 != 0 && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +((~f)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ (~p)*((~d)*((~m) + 4*(~p) + 3) + (~e)*((~m) + 1)*(~x)^2)⨸((~f)*((~m) + 1)*((~m) + 4*(~p) + 3)) + 2*(~p)⨸((~f)^2*((~m) + 1)*((~m) + 4*(~p) + 3))* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1)* simp(2*(~a)*(~e)*((~m) + 1) - (~b)*(~d)*((~m) + 4*(~p) + 3) + ((~b)*(~e)*((~m) + 1) - 2*(~c)*(~d)*((~m) + 4*(~p) + 3))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_30", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + gt((~p), 0) && + lt((~m), -1) && + (~m) + 4*(~p) + 3 != 0 && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +((~f)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^4)^ (~p)*((~d)*((~m) + 4*(~p) + 3) + (~e)*((~m) + 1)*(~x)^2)⨸((~f)*((~m) + 1)*((~m) + 4*(~p) + 3)) + 4*(~p)⨸((~f)^2*((~m) + 1)*((~m) + 4*(~p) + 3))* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~c)*(~x)^4)^((~p) - 1)*((~a)*(~e)*((~m) + 1) - (~c)*(~d)*((~m) + 4*(~p) + 3)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_31", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + !eq(4*(~p) + (~m) + 1, 0) && + !eq((~m) + 4*(~p) + 3, 0) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +((~f)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ (~p)*((~b)*(~e)*2*(~p) + (~c)*(~d)*((~m) + 4*(~p) + 3) + (~c)*(~e)*(4*(~p) + (~m) + 1)*(~x)^2)⨸ ((~c)*(~f)*(4*(~p) + (~m) + 1)*((~m) + 4*(~p) + 3)) + 2*(~p)⨸((~c)*(4*(~p) + (~m) + 1)*((~m) + 4*(~p) + 3))* ∫(((~f)*(~x))^(~m)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1)* simp(2*(~a)*(~c)*(~d)*((~m) + 4*(~p) + 3) - (~a)*(~b)*(~e)*((~m) + 1) + (2*(~a)*(~c)*(~e)*(4*(~p) + (~m) + 1) + (~b)*(~c)*(~d)*((~m) + 4*(~p) + 3) - (~b)^2*(~e)*((~m) + 2*(~p) + 1))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_32", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~x)) && + gt((~p), 0) && + !eq(4*(~p) + (~m) + 1, 0) && + !eq((~m) + 4*(~p) + 3, 0) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +((~f)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^4)^ (~p)*((~c)*(~d)*((~m) + 4*(~p) + 3) + (~c)*(~e)*(4*(~p) + (~m) + 1)*(~x)^2)⨸((~c)* (~f)*(4*(~p) + (~m) + 1)*((~m) + 4*(~p) + 3)) + 4*(~a)*(~p)⨸((4*(~p) + (~m) + 1)*((~m) + 4*(~p) + 3))* ∫(((~f)*(~x))^(~m)*((~a) + (~c)*(~x)^4)^((~p) - 1)* simp((~d)*((~m) + 4*(~p) + 3) + (~e)*(4*(~p) + (~m) + 1)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_33", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + gt((~m), 1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)*((~b)*(~d) - 2*(~a)*(~e) - ((~b)*(~e) - 2*(~c)*(~d))*(~x)^2)⨸(2*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) - (~f)^2⨸(2*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)* simp(((~m) - 1)*((~b)*(~d) - 2*(~a)*(~e)) - (4*(~p) + 4 + (~m) + 1)*((~b)*(~e) - 2*(~c)*(~d))* (~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_34", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + lt((~p), -1) && + gt((~m), 1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^4)^((~p) + 1)*((~a)*(~e) - (~c)*(~d)*(~x)^2)⨸(4*(~a)* (~c)*((~p) + 1)) - (~f)^2⨸(4*(~a)*(~c)*((~p) + 1))* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~c)*(~x)^4)^((~p) + 1)*((~a)*(~e)*((~m) - 1) - (~c)*(~d)*(4*(~p) + 4 + (~m) + 1)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_35", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +-((~f)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)*((~d)*((~b)^2 - 2*(~a)*(~c)) - (~a)*(~b)*(~e) + ((~b)*(~d) - 2*(~a)*(~e))*(~c)*(~x)^2)⨸(2*(~a)*(~f)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~f)*(~x))^(~m)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)* simp((~d)*((~b)^2*((~m) + 2*((~p) + 1) + 1) - 2*(~a)*(~c)*((~m) + 4*((~p) + 1) + 1)) - (~a)*(~b)*(~e)*((~m) + 1) + (~c)*((~m) + 2*(2*(~p) + 3) + 1)*((~b)*(~d) - 2*(~a)*(~e))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_36", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~x)) && + lt((~p), -1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +-((~f)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^4)^((~p) + 1)*((~d) + (~e)*(~x)^2)⨸(4*(~a)*(~f)*((~p) + 1)) + 1⨸(4*(~a)*((~p) + 1))* ∫(((~f)*(~x))^(~m)*((~a) + (~c)*(~x)^4)^((~p) + 1)* simp((~d)*((~m) + 4*((~p) + 1) + 1) + (~e)*((~m) + 2*(2*(~p) + 3) + 1)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_37", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~m), 1) && + !eq((~m) + 4*(~p) + 3, 0) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~e)*(~f)*((~f)*(~x))^((~m) - 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*((~m) + 4*(~p) + 3)) - (~f)^2⨸((~c)*((~m) + 4*(~p) + 3))* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)* simp((~a)*(~e)*((~m) - 1) + ((~b)*(~e)*((~m) + 2*(~p) + 1) - (~c)*(~d)*((~m) + 4*(~p) + 3))*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_38", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~p), (~x)) && + gt((~m), 1) && + !eq((~m) + 4*(~p) + 3, 0) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~e)*(~f)*((~f)*(~x))^((~m) - 1)*((~a) + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*((~m) + 4*(~p) + 3)) - (~f)^2⨸((~c)*((~m) + 4*(~p) + 3))* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~c)*(~x)^4)^ (~p)*((~a)*(~e)*((~m) - 1) - (~c)*(~d)*((~m) + 4*(~p) + 3)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_39", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~m), -1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~d)*((~f)*(~x))^((~m) + 1)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~a)*(~f)*((~m) + 1)) + 1⨸((~a)*(~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)* simp((~a)*(~e)*((~m) + 1) - (~b)*(~d)*((~m) + 2*(~p) + 3) - (~c)*(~d)*((~m) + 4*(~p) + 5)*(~x)^2, (~x)), (~x)) : nothing) + +("1_2_2_4_40", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~p), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~p)) && + ( + ext_isinteger((~p)) || + ext_isinteger((~m)) + ) ? +(~d)*((~f)*(~x))^((~m) + 1)*((~a) + (~c)*(~x)^4)^((~p) + 1)⨸((~a)*(~f)*((~m) + 1)) + 1⨸((~a)*(~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~c)*(~x)^4)^ (~p)*((~a)*(~e)*((~m) + 1) - (~c)*(~d)*((~m) + 4*(~p) + 5)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_41", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + gt((~d)/(~e), 0) && + pos((~c)/(~e)*(2*(~c)*(~d) - (~b)*(~e))) ? +(~e)⨸2*∫(((~f)*(~x))^(~m)⨸((~c)*(~d)⨸(~e) - rt((~c)⨸(~e)*(2*(~c)*(~d) - (~b)*(~e)), 2)*(~x) + (~c)*(~x)^2), (~x)) + (~e)⨸2*∫(((~f)*(~x))^(~m)⨸((~c)*(~d)⨸(~e) + rt((~c)⨸(~e)*(2*(~c)*(~d) - (~b)*(~e)), 2)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_42", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + gt((~d)/(~e), 0) ? +(~e)⨸2*∫(((~f)*(~x))^(~m)⨸((~c)*(~d)⨸(~e) - rt(2*(~c)^2*(~d)⨸(~e), 2)*(~x) + (~c)*(~x)^2), (~x)) + (~e)⨸2*∫(((~f)*(~x))^(~m)⨸((~c)*(~d)⨸(~e) + rt(2*(~c)^2*(~d)⨸(~e), 2)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_43", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +((~e)⨸2 + (2*(~c)*(~d) - (~b)*(~e))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))* ∫(((~f)*(~x))^(~m)⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) + ((~e)⨸2 - (2*(~c)*(~d) - (~b)*(~e))⨸(2*rt((~b)^2 - 4*(~a)*(~c), 2)))* ∫(((~f)*(~x))^(~m)⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_44", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~x)) ? +-((~e)⨸2 + (~c)*(~d)⨸(2*rt(-(~a)*(~c), 2)))* ∫(((~f)*(~x))^(~m)⨸(rt(-(~a)*(~c), 2) - (~c)*(~x)^2), (~x)) + ((~e)⨸2 - (~c)*(~d)⨸(2*rt(-(~a)*(~c), 2)))* ∫(((~f)*(~x))^(~m)⨸(rt(-(~a)*(~c), 2) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_45", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~q)) && + ext_isinteger((~m)) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_46", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~q)) && + ext_isinteger((~m)) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)⨸((~a) + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_47", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~q)) && + !(ext_isinteger((~m))) ? +∫(ext_expand(((~f)*(~x))^(~m), ((~d) + (~e)*(~x)^2)^(~q)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_48", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~q)) && + !(ext_isinteger((~m))) ? +∫(ext_expand(((~f)*(~x))^(~m), ((~d) + (~e)*(~x)^2)^(~q)⨸((~a) + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_49", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + gt((~q), 0) && + gt((~m), 3) ? +(~f)^4⨸(~c)^2* ∫(((~f)*(~x))^((~m) - 4)*((~c)*(~d) - (~b)*(~e) + (~c)*(~e)*(~x)^2)*((~d) + (~e)*(~x)^2)^((~q) - 1), (~x)) - (~f)^4⨸(~c)^2* ∫(((~f)*(~x))^((~m) - 4)*((~d) + (~e)*(~x)^2)^((~q) - 1)* simp((~a)*((~c)*(~d) - (~b)*(~e)) + ((~b)*(~c)*(~d) - (~b)^2*(~e) + (~a)*(~c)*(~e))*(~x)^2, (~x))⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_50", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~q), (~x)) && + !(ext_isinteger((~q))) && + gt((~m), 3) ? +(~f)^4⨸(~c)*∫(((~f)*(~x))^((~m) - 4)*((~d) + (~e)*(~x)^2)^(~q), (~x)) - (~a)*(~f)^4⨸(~c)*∫(((~f)*(~x))^((~m) - 4)*((~d) + (~e)*(~x)^2)^(~q)⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_51", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + gt((~q), 0) && + gt((~m), 1) && + le((~m), 3) ? +(~e)*(~f)^2⨸(~c)*∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~q) - 1), (~x)) - (~f)^2⨸(~c)* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~q) - 1)* simp((~a)*(~e) - ((~c)*(~d) - (~b)*(~e))*(~x)^2, (~x))⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_52", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + !(ext_isinteger((~q))) && + gt((~q), 0) && + gt((~m), 1) && + le((~m), 3) ? +(~e)*(~f)^2⨸(~c)*∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~q) - 1), (~x)) - (~f)^2⨸(~c)* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~q) - 1)* simp((~a)*(~e) - (~c)*(~d)*(~x)^2, (~x))⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_53", +@rule ∫(((~!f)*(~x))^(~m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + gt((~q), 0) && + lt((~m), 0) ? +(~d)⨸(~a)*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) - 1), (~x)) - 1⨸((~a)*(~f)^2)* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^((~q) - 1)* simp((~b)*(~d) - (~a)*(~e) + (~c)*(~d)*(~x)^2, (~x))⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_54", +@rule ∫(((~!f)*(~x))^(~m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + !(ext_isinteger((~q))) && + gt((~q), 0) && + lt((~m), 0) ? +(~d)⨸(~a)*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) - 1), (~x)) + 1⨸((~a)*(~f)^2)* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^((~q) - 1)* simp((~a)*(~e) - (~c)*(~d)*(~x)^2, (~x))⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_55", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + lt((~q), -1) && + gt((~m), 3) ? +(~d)^2*(~f)^4⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 4)*((~d) + (~e)*(~x)^2)^(~q), (~x)) - (~f)^4⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 4)*((~d) + (~e)*(~x)^2)^((~q) + 1)* simp((~a)*(~d) + ((~b)*(~d) - (~a)*(~e))*(~x)^2, (~x))⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_56", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + !(ext_isinteger((~q))) && + lt((~q), -1) && + gt((~m), 3) ? +(~d)^2*(~f)^4⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~f)*(~x))^((~m) - 4)*((~d) + (~e)*(~x)^2)^(~q), (~x)) - (~a)*(~f)^4⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 4)*((~d) + (~e)*(~x)^2)^((~q) + 1)*((~d) - (~e)*(~x)^2)⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_57", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + lt((~q), -1) && + gt((~m), 1) && + le((~m), 3) ? +-(~d)*(~e)*(~f)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^(~q), (~x)) + (~f)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~q) + 1)* simp((~a)*(~e) + (~c)*(~d)*(~x)^2, (~x))⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_58", +@rule ∫(((~!f)*(~x))^(~!m)*((~!d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + !(ext_isinteger((~q))) && + lt((~q), -1) && + gt((~m), 1) && + le((~m), 3) ? +-(~d)*(~e)*(~f)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^(~q), (~x)) + (~f)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~q) + 1)* simp((~a)*(~e) + (~c)*(~d)*(~x)^2, (~x))⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_59", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + lt((~q), -1) ? +(~e)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~x)) + 1⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) + 1)* simp((~c)*(~d) - (~b)*(~e) - (~c)*(~e)*(~x)^2, (~x))⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_60", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~x)) && + !(ext_isinteger((~q))) && + lt((~q), -1) ? +(~e)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~x)) + (~c)⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~q) + 1)*((~d) - (~e)*(~x)^2)⨸((~a) + (~c)*(~x)^4), (~x)) : nothing) + +("1_2_2_4_61", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + ext_isinteger((~m)) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q), ((~f)*(~x))^(~m)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_62", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~q), (~x)) && + !(ext_isinteger((~q))) && + ext_isinteger((~m)) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~q), ((~f)*(~x))^(~m)⨸((~a) + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_63", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~q))) && + !(ext_isinteger((~m))) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q), 1⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_64", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + !(ext_isinteger((~q))) && + !(ext_isinteger((~m))) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q), 1⨸((~a) + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_4_65", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2), (~x)) - 2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_66", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)/((~a) + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~q), (~x)) ? +-(~c)⨸(2*rt(-(~a)*(~c), 2))*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)⨸(rt(-(~a)*(~c), 2) - (~c)*(~x)^2), (~x)) - (~c)⨸(2*rt(-(~a)*(~c), 2))*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)⨸(rt(-(~a)*(~c), 2) + (~c)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_67", +@rule ∫(((~!f)*(~x))^(~m)*((~!a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + lt((~m), -2) ? +1⨸(~d)^2* ∫(((~f)*(~x))^(~m)*((~a)*(~d) + ((~b)*(~d) - (~a)*(~e))*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1), (~x)) + ((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸((~d)^2*(~f)^4)* ∫(((~f)*(~x))^((~m) + 4)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_68", +@rule ∫(((~!f)*(~x))^(~m)*((~a) + (~!c)*(~x)^4)^(~!p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + gt((~p), 0) && + lt((~m), -2) ? +(~a)⨸(~d)^2*∫(((~f)*(~x))^(~m)*((~d) - (~e)*(~x)^2)*((~a) + (~c)*(~x)^4)^((~p) - 1), (~x)) + ((~c)*(~d)^2 + (~a)*(~e)^2)⨸((~d)^2*(~f)^4)* ∫(((~f)*(~x))^((~m) + 4)*((~a) + (~c)*(~x)^4)^((~p) - 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_69", +@rule ∫(((~!f)*(~x))^(~m)*((~!a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + gt((~p), 0) && + lt((~m), 0) ? +1⨸((~d)*(~e))* ∫(((~f)*(~x))^(~m)*((~a)*(~e) + (~c)*(~d)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1), (~x)) - ((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)⨸((~d)*(~e)*(~f)^2)* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) - 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_70", +@rule ∫(((~!f)*(~x))^(~m)*((~a) + (~!c)*(~x)^4)^(~!p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + gt((~p), 0) && + lt((~m), 0) ? +1⨸((~d)*(~e))*∫(((~f)*(~x))^(~m)*((~a)*(~e) + (~c)*(~d)*(~x)^2)*((~a) + (~c)*(~x)^4)^((~p) - 1), (~x)) - ((~c)*(~d)^2 + (~a)*(~e)^2)⨸((~d)*(~e)*(~f)^2)* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~c)*(~x)^4)^((~p) - 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_71", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + gt((~m), 2) ? +-(~f)^4⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 4)*((~a)*(~d) + ((~b)*(~d) - (~a)*(~e))*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) + (~d)^2*(~f)^4⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 4)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_72", +@rule ∫(((~!f)*(~x))^(~!m)*((~a) + (~!c)*(~x)^4)^(~p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + lt((~p), -1) && + gt((~m), 2) ? +-(~a)*(~f)^4⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 4)*((~d) - (~e)*(~x)^2)*((~a) + (~c)*(~x)^4)^(~p), (~x)) + (~d)^2*(~f)^4⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 4)*((~a) + (~c)*(~x)^4)^((~p) + 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_73", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + gt((~m), 0) ? +(~f)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 2)*((~a)*(~e) + (~c)*(~d)*(~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) - (~d)*(~e)*(~f)^2⨸((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_74", +@rule ∫(((~!f)*(~x))^(~!m)*((~a) + (~!c)*(~x)^4)^(~p)/((~!d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + lt((~p), -1) && + gt((~m), 0) ? +(~f)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 2)*((~a)*(~e) + (~c)*(~d)*(~x)^2)*((~a) + (~c)*(~x)^4)^(~p), (~x)) - (~d)*(~e)*(~f)^2⨸((~c)*(~d)^2 + (~a)*(~e)^2)* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~c)*(~x)^4)^((~p) + 1)⨸((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("1_2_2_4_75", +@rule ∫((~x)^2/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + pos((~c)/(~a)) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +(~d)⨸(2*(~d)*(~e))*∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - (~d)⨸(2*(~d)*(~e))* ∫(((~d) - (~e)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_76", +@rule ∫((~x)^2/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + pos((~c)/(~a)) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +(~d)⨸(2*(~d)*(~e))*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) - (~d)⨸(2*(~d)*(~e))*∫(((~d) - (~e)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_77", +@rule ∫((~x)^2/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !eq((~c)*(~d)^2 - (~b)*(~d)*(~e) + (~a)*(~e)^2, 0) && + pos((~c)/(~a)) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +-(~a)*((~e) + (~d)*rt((~c)⨸(~a), 2))⨸((~c)*(~d)^2 - (~a)*(~e)^2)* ∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~a)*(~d)*((~e) + (~d)*rt((~c)⨸(~a), 2))⨸((~c)*(~d)^2 - (~a)*(~e)^2)* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_78", +@rule ∫((~x)^2/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + !eq((~c)*(~d)^2 + (~a)*(~e)^2, 0) && + pos((~c)/(~a)) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +-(~a)*((~e) + (~d)*rt((~c)⨸(~a), 2))⨸((~c)*(~d)^2 - (~a)*(~e)^2)*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + (~a)*(~d)*((~e) + (~d)*rt((~c)⨸(~a), 2))⨸((~c)*(~d)^2 - (~a)*(~e)^2)* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_79", +@rule ∫((~x)^4/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~c)/(~a)) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +-1⨸(~e)^2*∫(((~d) - (~e)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~d)^2⨸(~e)^2*∫(1⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_80", +@rule ∫((~x)^4/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + pos((~c)/(~a)) && + eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +-1⨸(~e)^2*∫(((~d) - (~e)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + (~d)^2⨸(~e)^2*∫(1⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_81", +@rule ∫((~x)^4/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~c)/(~a)) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + eq(2*(~c)*(~d) - (~a)*(~e)*rt((~c)/(~a), 2), 0) ? +-1⨸((~e)*rt((~c)⨸(~a), 2))*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~d)^2⨸((~e)*((~e) - (~d)*rt((~c)⨸(~a), 2)))* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_82", +@rule ∫((~x)^4/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + pos((~c)/(~a)) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) && + eq(2*(~c)*(~d) - (~a)*(~e)*rt((~c)/(~a), 2), 0) ? +-1⨸((~e)*rt((~c)⨸(~a), 2))*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + (~d)^2⨸((~e)*((~e) - (~d)*rt((~c)⨸(~a), 2)))* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_83", +@rule ∫((~x)^4/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + pos((~c)/(~a)) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +-(2*(~c)*(~d) - (~a)*(~e)*rt((~c)⨸(~a), 2))⨸((~c)*(~e)*((~e) - (~d)*rt((~c)⨸(~a), 2)))* ∫(1⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) - 1⨸((~e)*rt((~c)⨸(~a), 2))*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)) + (~d)^2⨸((~e)*((~e) - (~d)*rt((~c)⨸(~a), 2)))* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_84", +@rule ∫((~x)^4/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + pos((~c)/(~a)) && + !eq((~c)*(~d)^2 - (~a)*(~e)^2, 0) ? +-(2*(~c)*(~d) - (~a)*(~e)*rt((~c)⨸(~a), 2))⨸((~c)*(~e)*((~e) - (~d)*rt((~c)⨸(~a), 2)))*∫(1⨸sqrt((~a) + (~c)*(~x)^4), (~x)) - 1⨸((~e)*rt((~c)⨸(~a), 2))*∫((1 - rt((~c)⨸(~a), 2)*(~x)^2)⨸sqrt((~a) + (~c)*(~x)^4), (~x)) + (~d)^2⨸((~e)*((~e) - (~d)*rt((~c)⨸(~a), 2)))* ∫((1 + rt((~c)⨸(~a), 2)*(~x)^2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4)), (~x)) : nothing) + +("1_2_2_4_85", +@rule ∫((~x)^(~m)/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~m)/2, 2) ? +(~x)^((~m) - 5)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~c)*(~e)*((~m) - 3)) - 1⨸((~c)*(~e)*((~m) - 3))* ∫((~x)^((~m) - 6)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* simp((~a)*(~d)*((~m) - 5) + ((~a)*(~e)*((~m) - 5) + (~b)*(~d)*((~m) - 4))* (~x)^2 + ((~b)*(~e)*((~m) - 4) + (~c)*(~d)*((~m) - 3))*(~x)^4, (~x)), (~x)) : nothing) + +("1_2_2_4_86", +@rule ∫((~x)^(~m)/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + igt((~m)/2, 2) ? +(~x)^((~m) - 5)*sqrt((~a) + (~c)*(~x)^4)⨸((~c)*(~e)*((~m) - 3)) - 1⨸((~c)*(~e)*((~m) - 3))* ∫((~x)^((~m) - 6)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4))* simp((~a)*(~d)*((~m) - 5) + (~a)*(~e)*((~m) - 5)*(~x)^2 + (~c)*(~d)*((~m) - 3)*(~x)^4, (~x)), (~x)) : nothing) + +("1_2_2_4_87", +@rule ∫((~x)^(~m)/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ilt((~m)/2, 0) ? +(~x)^((~m) + 1)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)⨸((~a)*(~d)*((~m) + 1)) - 1⨸((~a)*(~d)*((~m) + 1))* ∫((~x)^((~m) + 2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* simp((~a)*(~e)*((~m) + 1) + (~b)*(~d)*((~m) + 2) + ((~b)*(~e)*((~m) + 2) + (~c)*(~d)*((~m) + 3))*(~x)^2 + (~c)*(~e)*((~m) + 3)*(~x)^4, (~x)), (~x)) : nothing) + +("1_2_2_4_88", +@rule ∫((~x)^(~m)/(((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + ilt((~m)/2, 0) ? +(~x)^((~m) + 1)*sqrt((~a) + (~c)*(~x)^4)⨸((~a)*(~d)*((~m) + 1)) - 1⨸((~a)*(~d)*((~m) + 1))* ∫((~x)^((~m) + 2)⨸(((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4))* simp((~a)*(~e)*((~m) + 1) + (~c)*(~d)*((~m) + 3)*(~x)^2 + (~c)*(~e)*((~m) + 3)*(~x)^4, (~x)), (~x)) : nothing) + +("1_2_2_4_89", +@rule ∫((~x)^(~m)/(sqrt((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~m)/2) ? +(~x)^3*sqrt((~e) + (~d)⨸(~x)^2)* sqrt((~c) + (~b)⨸(~x)^2 + (~a)⨸(~x)^4)⨸(sqrt((~d) + (~e)*(~x)^2)*sqrt((~a) + (~b)*(~x)^2 + (~c)*(~x)^4))* ∫((~x)^((~m) - 3)⨸(sqrt((~e) + (~d)⨸(~x)^2)*sqrt((~c) + (~b)⨸(~x)^2 + (~a)⨸(~x)^4)), (~x)) : nothing) + +("1_2_2_4_90", +@rule ∫((~x)^(~m)/(sqrt((~d) + (~!e)*(~x)^2)*sqrt((~a) + (~!c)*(~x)^4)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~x)) && + ext_isinteger((~m)/2) ? +(~x)^3*sqrt((~e) + (~d)⨸(~x)^2)* sqrt((~c) + (~a)⨸(~x)^4)⨸(sqrt((~d) + (~e)*(~x)^2)*sqrt((~a) + (~c)*(~x)^4))* ∫((~x)^((~m) - 3)⨸(sqrt((~e) + (~d)⨸(~x)^2)*sqrt((~c) + (~a)⨸(~x)^4)), (~x)) : nothing) + +("1_2_2_4_91", +@rule ∫((~x)^(~m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + igt((~q), 1) && + igt((~m)/2, 0) ? +(~x)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)*((~a)*(~b)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2) - ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*((~b)^2 - 2*(~a)*(~c)) - (~c)*((~b)*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0) - 2*(~a)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2))*(~x)^2)⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))*∫(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)* simp(expand_to_sum( 2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))* poly_quotient((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)) + (~b)^2*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*(2*(~p) + 3) - 2*(~a)*(~c)*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*(4*(~p) + 5) - (~a)*(~b)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2) + (~c)*(4*(~p) + 7)*((~b)*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0) - 2*(~a)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2))*(~x)^2, (~x)), (~x)), (~x)) : nothing) + +("1_2_2_4_92", +@rule ∫((~x)^(~m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) && + igt((~q), 1) && + ilt((~m)/2, 0) ? +(~x)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)*((~a)*(~b)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2) - ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*((~b)^2 - 2*(~a)*(~c)) - (~c)*((~b)*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0) - 2*(~a)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2))*(~x)^2)⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫((~x)^(~m)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)* simp(expand_to_sum( 2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))*(~x)^(-(~m))* poly_quotient((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)) + ((~b)^2*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*(2*(~p) + 3) - 2*(~a)*(~c)*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0)*(4*(~p) + 5) - (~a)*(~b)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2))*(~x)^(-(~m)) + (~c)*(4*(~p) + 7)*((~b)*ext_coeff(poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0) - 2*(~a)*ext_coeff( poly_remainder((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~q), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2))*(~x)^(2 - (~m)), (~x)), (~x)), (~x)) : nothing) + +("1_2_2_4_93", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ( + igt((~p), 0) || + igt((~q), 0) || + ext_isinteger((~m), (~q)) + ) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_4_94", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) && + ( + igt((~p), 0) || + igt((~q), 0) || + ext_isinteger((~m), (~q)) + ) ? +∫(ext_expand(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_4_95", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~a) + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + !(ext_isinteger((~p))) && + ilt((~q), 0) ? +((~f)*(~x))^(~m)⨸(~x)^(~m)* ∫(ext_expand( (~x)^(~m)*((~a) + (~c)*(~x)^4)^ (~p), ((~d)⨸((~d)^2 - (~e)^2*(~x)^4) - (~e)*(~x)^2⨸((~d)^2 - (~e)^2*(~x)^4))^(-(~q)), (~x)), (~x)) : nothing) + +# ("1_2_2_4_96", +# @rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)] : nothing) + +# ("1_2_2_4_97", +# @rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~a) + (~!c)*(~x)^4)^(~!p),(~x)) => +# !contains_var((~a), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~c)*(~x)^4)^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.5 P(x) (a+b x^2+c x^4)^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.5 P(x) (a+b x^2+c x^4)^p.jl new file mode 100644 index 0000000..5f2f68e --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.2 Quartic/1.2.2.5 P(x) (a+b x^2+c x^4)^p.jl @@ -0,0 +1,122 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.2.5 P(x) (a+b x^2+c x^4)^p *) +("1_2_2_5_1", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + poly((~Pq), (~x)) && + igt((~p), 0) ? +∫(ext_expand((~Pq)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)), (~x)) : nothing) + +("1_2_2_5_2", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)) && + eq(ext_coeff((~Pq), (~x), 0), 0) ? +∫((~x)*poly_quotient((~Pq), (~x), (~x))*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) : nothing) + +("1_2_2_5_3", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)) && + !(poly((~Pq), (~x)^2)) ? +let + q = exponent_of((~Pq), (~x)) + + ∫( sum([ext_coeff((~Pq), (~x), 2*iii)*(~x)^(2*iii) for iii in ( 0):( q⨸2)])*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ (~p), (~x)) + ∫( (~x)*sum([ext_coeff((~Pq), (~x), 2*iii + 1)*(~x)^(2*iii) for iii in ( 0):( (q - 1)⨸2)])*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p), (~x)) +end : nothing) + +("1_2_2_5_4", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)^2) && + eq(exponent_of((~Pq), (~x)), 4) ? +let + d = ext_coeff((~Pq), (~x), 0) + e = ext_coeff((~Pq), (~x), 2) + f = ext_coeff((~Pq), (~x), 4) + + eq((~a)*e - (~b)*d*(2*(~p) + 3), 0) && + eq((~a)*f - (~c)*d*(4*(~p) + 5), 0) ? + d*(~x)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(~a) : nothing +end : nothing) + +("1_2_2_5_5", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)^2) && + eq(exponent_of((~Pq), (~x)), 6) ? +let + d = ext_coeff((~Pq), (~x), 0) + e = ext_coeff((~Pq), (~x), 2) + f = ext_coeff((~Pq), (~x), 4) + g = ext_coeff((~Pq), (~x), 6) + + eq(3*(~a)^2*g - (~c)*(4*(~p) + 7)*((~a)*e - (~b)*d*(2*(~p) + 3)), 0) && + eq(3*(~a)^2*f - 3*(~a)*(~c)*d*(4*(~p) + 5) - (~b)*(2*(~p) + 5)*((~a)*e - (~b)*d*(2*(~p) + 3)), 0) ? + (~x)*(3*(~a)*d + ((~a)*e - (~b)*d*(2*(~p) + 3))* (~x)^2)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸(3*(~a)^2) : nothing +end : nothing) + +("1_2_2_5_6", +@rule ∫((~Pq)/((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + poly((~Pq), (~x)^2) && + exponent_of((~Pq), (~x)^2) > 1 ? +∫(ext_expand((~Pq)⨸((~a) + (~b)*(~x)^2 + (~c)*(~x)^4), (~x)), (~x)) : nothing) + +("1_2_2_5_7", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)^2) && + exponent_of((~Pq), (~x)^2) > 1 && + eq((~b)^2 - 4*(~a)*(~c), 0) ? +((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^ fracpart((~p))⨸((4*(~c))^intpart((~p))*((~b) + 2*(~c)*(~x)^2)^(2*fracpart((~p))))* ∫((~Pq)*((~b) + 2*(~c)*(~x)^2)^(2*(~p)), (~x)) : nothing) + +("1_2_2_5_8", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + poly((~Pq), (~x)^2) && + exponent_of((~Pq), (~x)^2) > 1 && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + lt((~p), -1) ? +let + d = ext_coeff(poly_remainder((~Pq), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 0) + e = ext_coeff(poly_remainder((~Pq), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)), (~x), 2) + + (~x)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)*((~a)*(~b)*e - d*((~b)^2 - 2*(~a)*(~c)) - (~c)*((~b)*d - 2*(~a)*e)*(~x)^2)⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸(2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))*∫(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)* expand_to_sum( 2*(~a)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))* poly_quotient((~Pq), (~a) + (~b)*(~x)^2 + (~c)*(~x)^4, (~x)) + (~b)^2*d*(2*(~p) + 3) - 2*(~a)*(~c)*d*(4*(~p) + 5) - (~a)*(~b)*e + (~c)*(4*(~p) + 7)*((~b)*d - 2*(~a)*e)*(~x)^2, (~x)), (~x)) +end : nothing) + +("1_2_2_5_9", +@rule ∫((~Pq)*((~a) + (~!b)*(~x)^2 + (~!c)*(~x)^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + poly((~Pq), (~x)^2) && + exponent_of((~Pq), (~x)^2) > 1 && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(lt((~p), -1)) ? +let + q = exponent_of((~Pq), (~x)^2) + e = ext_coeff((~Pq), (~x)^2, exponent_of((~Pq), (~x)^2)) + + e*(~x)^(2*q - 3)*((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^((~p) + 1)⨸((~c)*(2*q + 4*(~p) + 1)) + 1⨸((~c)*(2*q + 4*(~p) + 1))*∫(((~a) + (~b)*(~x)^2 + (~c)*(~x)^4)^(~p)* expand_to_sum( (~c)*(2*q + 4*(~p) + 1)*(~Pq) - (~a)*e*(2*q - 3)*(~x)^(2*q - 4) - (~b)*e*(2*q + 2*(~p) - 1)*(~x)^(2*q - 2) - (~c)*e*(2*q + 4*(~p) + 1)*(~x)^(2*q), (~x)), (~x)) +end : nothing) + +("1_2_2_5_10", +@rule ∫((~Pq)*(~Q4)^(~p),(~x)) => + !contains_var((~p), (~x)) && + poly((~Pq), (~x)) && + poly((~Q4), (~x), 4) && + !(igt((~p), 0)) ? +let + a = ext_coeff((~Q4), (~x), 0) + b = ext_coeff((~Q4), (~x), 1) + c = ext_coeff((~Q4), (~x), 2) + d = ext_coeff((~Q4), (~x), 3) + e = ext_coeff((~Q4), (~x), 4) + + eq(d^3 - 4*c*d*e + 8*b*e^2, 0) && + !eq(d, 0) ? + int_and_subst(ext_simplify( substitute((~Pq), Dict( (~x) => -d⨸(4*e) + (~x)))*(a + d^4⨸(256*e^3) - b*d⨸(8*e) + (c - 3*d^2⨸(8*e))*(~x)^2 + e*(~x)^4)^(~p), (~x)), (~x), (~x), d⨸(4*e) + (~x), "1_2_2_5_10") : nothing +end : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.3 General/1.2.3.1 (a+b x^n+c x^(2 n))^p.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.3 General/1.2.3.1 (a+b x^n+c x^(2 n))^p.jl new file mode 100644 index 0000000..1828bc5 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.2 Trinomial products/1.2.3 General/1.2.3.1 (a+b x^n+c x^(2 n))^p.jl @@ -0,0 +1,98 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.2.3.1 (a+b x^n+c x^(2 n))^p *) +("1_2_3_1_1", +@rule ∫(((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~!n2))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + eq((~n2), 2*(~n)) && + lt((~n), 0) && + ext_isinteger((~p)) ? +∫((~x)^(2*(~n)*(~p))*((~c) + (~b)*(~x)^(-(~n)) + (~a)*(~x)^(-2*(~n)))^(~p), (~x)) : nothing) + +("1_2_3_1_2", +@rule ∫(((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + eq((~n2), 2*(~n)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*(~x)^(ext_den((~n))*(~n)) + (~c)*(~x)^(2*ext_den((~n))*(~n)))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "1_2_3_1_2") : nothing) + +("1_2_3_1_3", +@rule ∫(((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + eq((~n2), 2*(~n)) && + ilt((~n), 0) ? +-int_and_subst(((~a) + (~b)*(~x)^(-(~n)) + (~c)*(~x)^(-2*(~n)))^(~p)⨸(~x)^2, (~x), (~x), 1⨸(~x), "1_2_3_1_3") : nothing) + +("1_2_3_1_4", +@rule ∫(((~a) + (~!b)*(~x)^(~!n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) ? +((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p)⨸((~b) + 2*(~c)*(~x)^(~n))^(2*(~p))* ∫(((~b) + 2*(~c)*(~x)^(~n))^(2*(~p)), (~x)) : nothing) + +("1_2_3_1_5", +@rule ∫(((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~p), 0) ? +∫(ext_expand(((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p), (~x)), (~x)) : nothing) + +("1_2_3_1_6", +@rule ∫(((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ilt((~p), -1) ? +-(~x)*((~b)^2 - 2*(~a)*(~c) + (~b)*(~c)*(~x)^(~n))*((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^((~p) + 1)⨸((~a)* (~n)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c))) + 1⨸((~a)*(~n)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)))* ∫(((~b)^2 - 2*(~a)*(~c) + (~n)*((~p) + 1)*((~b)^2 - 4*(~a)*(~c)) + (~b)*(~c)*((~n)*(2*(~p) + 3) + 1)*(~x)^(~n))*((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^((~p) + 1), (~x)) : nothing) + +("1_2_3_1_7", +@rule ∫(1/((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~n2)),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~n)/2, 0) && + neg((~b)^2 - 4*(~a)*(~c)) ? +1⨸(2*(~c)*rt((~a)⨸(~c), 2)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((rt(2*(~q) - (~b)⨸(~c), 2) - (~x)^((~n)⨸2))⨸(rt((~a)⨸(~c), 2) - rt(2*(~q) - (~b)⨸(~c), 2)*(~x)^((~n)⨸2) + (~x)^(~n)), (~x)) + 1⨸(2*(~c)*rt((~a)⨸(~c), 2)*rt(2*(~q) - (~b)⨸(~c), 2))*∫((rt(2*(~q) - (~b)⨸(~c), 2) + (~x)^((~n)⨸2))⨸(rt((~a)⨸(~c), 2) + rt(2*(~q) - (~b)⨸(~c), 2)*(~x)^((~n)⨸2) + (~x)^(~n)), (~x)) : nothing) + +("1_2_3_1_8", +@rule ∫(1/((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~n2)),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b)⨸2 - rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^(~n)), (~x)) - (~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b)⨸2 + rt((~b)^2 - 4*(~a)*(~c), 2)⨸2 + (~c)*(~x)^(~n)), (~x)) : nothing) + +("1_2_3_1_9", +@rule ∫(((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +(~a)^intpart((~p))*((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^fracpart((~p))⨸ ((1 + 2*(~c)*(~x)^(~n)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2)))^ fracpart((~p))*(1 + 2*(~c)*(~x)^(~n)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2)))^fracpart((~p)))* ∫((1 + 2*(~c)*(~x)^(~n)⨸((~b) + sqrt((~b)^2 - 4*(~a)*(~c))))^ (~p)*(1 + 2*(~c)*(~x)^(~n)⨸((~b) - sqrt((~b)^2 - 4*(~a)*(~c))))^(~p), (~x)) : nothing) + +("1_2_3_1_10", +@rule ∫(((~a) + (~!b)*(~u)^(~n) + (~!c)*(~u)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + linear((~u), (~x)) && + !eq((~u), (~x)) ? +1⨸ext_coeff((~u), (~x), 1)* int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p), (~x), (~x), (~u), "1_2_3_1_10") : nothing) + +("1_2_3_1_11", +@rule ∫(((~a) + (~!b)*(~x)^(~mn) + (~!c)*(~x)^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + eq((~mn), -(~n)) && + ext_isinteger((~p)) && + pos((~n)) ? +∫(((~b) + (~a)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p)⨸(~x)^((~n)*(~p)), (~x)) : nothing) + +("1_2_3_1_12", +@rule ∫(((~a) + (~!b)*(~x)^(~mn) + (~!c)*(~x)^(~!n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) && + eq((~mn), -(~n)) && + !(ext_isinteger((~p))) && + pos((~n)) ? +(~x)^((~n)*fracpart((~p)))*((~a) + (~b)*(~x)^(-(~n)) + (~c)*(~x)^(~n))^ fracpart((~p))⨸((~b) + (~a)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^fracpart((~p))* ∫(((~b) + (~a)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p)⨸(~x)^((~n)*(~p)), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/1 Algebraic functions/1.3 Miscellaneous/1.3.4 Normalizing algebraic functions.jl b/src/methods/rule_based/rules2/1 Algebraic functions/1.3 Miscellaneous/1.3.4 Normalizing algebraic functions.jl new file mode 100644 index 0000000..e44f5c6 --- /dev/null +++ b/src/methods/rule_based/rules2/1 Algebraic functions/1.3 Miscellaneous/1.3.4 Normalizing algebraic functions.jl @@ -0,0 +1,468 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 1.3.4 Normalizing algebraic functions *) +("1_3_4_1", +@rule ∫((~!u)*((~!c)*((~d)*((~!a) + (~!b)* (~x)))^(~q))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~q), (~p), (~x)) && + !(ext_isinteger((~q))) && + !(ext_isinteger((~p))) ? +((~c)*((~d)*((~a) + (~b)*(~x)))^(~q))^(~p)⨸((~a) + (~b)*(~x))^((~p)*(~q))*∫((~u)*((~a) + (~b)*(~x))^((~p)*(~q)), (~x)) : nothing) + +("1_3_4_2", +@rule ∫((~!u)*((~!c)*((~!d)*((~!a) + (~!b)* (~x))^(~n))^(~q))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~q), (~p), (~x)) && + !(ext_isinteger((~q))) && + !(ext_isinteger((~p))) ? +((~c)*((~d)*((~a) + (~b)*(~x))^(~n))^(~q))^(~p)⨸((~a) + (~b)*(~x))^((~n)*(~p)*(~q))* ∫((~u)*((~a) + (~b)*(~x))^((~n)*(~p)*(~q)), (~x)) : nothing) + +("1_3_4_3", +@rule ∫((~!u)*((~!c)*((~!a) + (~!b)*(~x)^(~!n))^(~q))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~q), (~x)) && + ge((~a), 0) ? +simp(((~c)*((~a) + (~b)*(~x)^(~n))^(~q))^(~p)⨸((~a) + (~b)*(~x)^(~n))^((~p)*(~q)))* ∫((~u)*((~a) + (~b)*(~x)^(~n))^((~p)*(~q)), (~x)) : nothing) + +("1_3_4_4", +@rule ∫((~!u)*((~!c)*((~a) + (~!b)*(~x)^(~!n))^(~q))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~q), (~x)) && + !(ge((~a), 0)) ? +simp(((~c)*((~a) + (~b)*(~x)^(~n))^(~q))^(~p)⨸(1 + (~b)*(~x)^(~n)⨸(~a))^((~p)*(~q)))* ∫((~u)*(1 + (~b)*(~x)^(~n)⨸(~a))^((~p)*(~q)), (~x)) : nothing) + +("1_3_4_5", +@rule ∫((~!u)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))^(~!q)*((~c) + (~!d)*(~x)^(~!n))^(~!q))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + ext_isinteger((~q)) && + eq((~b)*(~c) - (~a)*(~d), 0) ? +∫((~u)*((~e)*((~d)⨸(~b))^(~q)*((~a) + (~b)*(~x)^(~n))^(2*(~q)))^(~p), (~x)) : nothing) + +("1_3_4_6", +@rule ∫((~!u)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))^(~q)*((~c) + (~!d)*(~x)^(~!n))^(~q))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + ext_isinteger((~q)) && + eq((~b)*(~c) + (~a)*(~d), 0) ? +∫((~u)*((~e)*(-(~a)^2*(~d)⨸(~b) + (~b)*(~d)*(~x)^(2*(~n)))^(~q))^(~p), (~x)) : nothing) + +#(* Int[u_.*((a_.+b_.*x_^n_.)*(c_+d_.*x_^n_.))^p_,x_Symbol] := Int[u*(a+b*x^n)^p*(c+d*x^n)^p,x] /; FreeQ[{a,b,c,d,n,p},x] && EqQ[b+d,0] && GtQ[a,0] && GtQ[c,0] *) +("1_3_4_7", +@rule ∫((~!u)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))*((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) ? +∫((~u)*((~a)*(~c)*(~e) + ((~b)*(~c) + (~a)*(~d))*(~e)*(~x)^(~n) + (~b)*(~d)*(~e)*(~x)^(2*(~n)))^(~p), (~x)) : nothing) + +("1_3_4_8", +@rule ∫((~!u)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))/((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) ? +((~b)*(~e)⨸(~d))^(~p)*∫((~u), (~x)) : nothing) + +("1_3_4_9", +@rule ∫((~!u)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))/((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + gt((~b)*(~d)*(~e), 0) && + gt((~c) - (~a)*(~d)/(~b), 0) ? +∫((~u)*((~a)*(~e) + (~b)*(~e)*(~x)^(~n))^(~p)⨸((~c) + (~d)*(~x)^(~n))^(~p), (~x)) : nothing) + +#(* Int[u_.*(e_.*(a_.+b_.*x_^n_.)/(c_+d_.*x_^n_.))^p_,x_Symbol] := Int[u*(a*e+b*e*x^n)^p/(c+d*x^n)^p,x] /; FreeQ[{a,b,c,d,e,n,p},x] && EqQ[b*c+a*d,0] && GtQ[b*e/d,0] && GtQ[c,0] *) +#(* Int[u_.*(e_.*(a_.+b_.*x_^n_.)/(c_+d_.*x_^n_.))^p_,x_Symbol] := Int[u*(-a*e-b*e*x^n)^p/(-c-d*x^n)^p,x] /; FreeQ[{a,b,c,d,e,n,p},x] && EqQ[b*c+a*d,0] && GtQ[b*e/d,0] && LtQ[c,0] *) +("1_3_4_10", +@rule ∫(((~!e)*((~!a) + (~!b)*(~x)^(~!n))/((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + isfraction((~p)) && + ext_isinteger(1/(~n)) ? +ext_den((~p))*(~e)*((~b)*(~c) - (~a)*(~d))⨸(~n)*int_and_subst((~x)^(ext_den((~p))*((~p) + 1) - 1)*(-(~a)*(~e) + (~c)*(~x)^ext_den((~p)))^(1⨸(~n) - 1)⨸((~b)*(~e) - (~d)*(~x)^ext_den((~p)))^(1⨸(~n) + 1), (~x), (~x), ((~e)*((~a) + (~b)*(~x)^(~n))⨸((~c) + (~d)*(~x)^(~n)))^(1⨸ext_den((~p))), "1_3_4_10") : nothing) + +("1_3_4_11", +@rule ∫((~x)^(~!m)*((~!e)*((~!a) + (~!b)*(~x))/((~c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + isfraction((~p)) && + ext_isinteger((~m)) ? +ext_den((~p))*(~e)*((~b)*(~c) - (~a)*(~d))* int_and_subst( (~x)^(ext_den((~p))*((~p) + 1) - 1)*(-(~a)*(~e) + (~c)*(~x)^ext_den((~p)))^(~m)⨸((~b)*(~e) - (~d)*(~x)^ext_den((~p)))^((~m) + 2), (~x), (~x), ((~e)*((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(1⨸ext_den((~p))), "1_3_4_11") : nothing) + +("1_3_4_12", +@rule ∫((~x)^(~!m)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))/((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~e)*((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "1_3_4_12") : nothing) + +("1_3_4_13", +@rule ∫(((~f)*(~x))^(~m)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))/((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +simp(((~c)*(~x))^(~m)⨸(~x)^(~m))*∫((~x)^(~m)*((~e)*((~a) + (~b)*(~x)^(~n))⨸((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("1_3_4_14", +@rule ∫((~u)^(~!r)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))/((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + poly((~u), (~x)) && + isfraction((~p)) && + ext_isinteger(1/(~n)) && + ext_isinteger((~r)) ? +ext_den((~p))*(~e)*((~b)*(~c) - (~a)*(~d))⨸(~n)* int_and_subst( ext_simplify( (~x)^(ext_den((~p))*((~p) + 1) - 1)*(-(~a)*(~e) + (~c)*(~x)^ext_den((~p)))^(1⨸(~n) - 1)⨸((~b)*(~e) - (~d)*(~x)^ext_den((~p)))^(1⨸(~n) + 1)* substitute((~u), Dict( (~x) => (-(~a)*(~e) + (~c)*(~x)^ext_den((~p)))^(1⨸(~n))⨸((~b)*(~e) - (~d)*(~x)^ext_den((~p)))^(1⨸(~n))))^(~r), (~x)), (~x), (~x), ((~e)*((~a) + (~b)*(~x)^(~n))⨸((~c) + (~d)*(~x)^(~n)))^(1⨸ext_den((~p))), "1_3_4_14") : nothing) + +("1_3_4_15", +@rule ∫((~x)^(~!m)*(~u)^(~!r)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))/((~c) + (~!d)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + poly((~u), (~x)) && + isfraction((~p)) && + ext_isinteger(1/(~n)) && + ext_isinteger((~m), (~r)) ? +ext_den((~p))*(~e)*((~b)*(~c) - (~a)*(~d))⨸(~n)* int_and_subst( ext_simplify( (~x)^(ext_den((~p))*((~p) + 1) - 1)*(-(~a)*(~e) + (~c)*(~x)^ext_den((~p)))^(((~m) + 1)⨸(~n) - 1)⨸((~b)*(~e) - (~d)*(~x)^ext_den((~p)))^(((~m) + 1)⨸(~n) + 1)* substitute((~u), Dict( (~x) => (-(~a)*(~e) + (~c)*(~x)^ext_den((~p)))^(1⨸(~n))⨸((~b)*(~e) - (~d)*(~x)^ext_den((~p)))^(1⨸(~n))))^(~r), (~x)), (~x), (~x), ((~e)*((~a) + (~b)*(~x)^(~n))⨸((~c) + (~d)*(~x)^(~n)))^(1⨸ext_den((~p))), "1_3_4_15") : nothing) + +("1_3_4_16", +@rule ∫((~!u)*((~a) + (~b)/((~c) + (~!d)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) ? +∫((~u)*(((~b) + (~a)*(~c) + (~a)*(~d)*(~x)^(~n))⨸((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("1_3_4_17", +@rule ∫((~!u)*((~!e)*((~!a) + (~!b)*(~x)^(~!n))^(~!q)*((~c) + (~!d)*(~x)^(~n))^(~!r))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~q), (~r), (~x)) ? +simp(((~e)*((~a) + (~b)*(~x)^(~n))^(~q)*((~c) + (~d)*(~x)^(~n))^(~r))^ (~p)⨸(((~a) + (~b)*(~x)^(~n))^((~p)*(~q))*((~c) + (~d)*(~x)^(~n))^((~p)*(~r))))* ∫((~u)*((~a) + (~b)*(~x)^(~n))^((~p)*(~q))*((~c) + (~d)*(~x)^(~n))^((~p)*(~r)), (~x)) : nothing) + +("1_3_4_18", +@rule ∫(((~!a) + (~!b)*((~c)/(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) ? +-(~c)*int_and_subst(((~a) + (~b)*(~x)^(~n))^(~p)⨸(~x)^2, (~x), (~x), (~c)⨸(~x), "1_3_4_18") : nothing) + +("1_3_4_19", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*((~c)/(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) && + ext_isinteger((~m)) ? +-(~c)^((~m) + 1)*int_and_subst(((~a) + (~b)*(~x)^(~n))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), (~c)⨸(~x), "1_3_4_19") : nothing) + +("1_3_4_20", +@rule ∫(((~!d)*(~x))^(~m)*((~!a) + (~!b)*((~c)/(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +-(~c)*((~d)*(~x))^(~m)*((~c)⨸(~x))^(~m)*int_and_subst(((~a) + (~b)*(~x)^(~n))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), (~c)⨸(~x), "1_3_4_20") : nothing) + +("1_3_4_21", +@rule ∫(((~!a) + (~!b)*((~d)/(~x))^(~n) + (~!c)*((~d)/(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) ? +-(~d)*int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p)⨸(~x)^2, (~x), (~x), (~d)⨸(~x), "1_3_4_21") : nothing) + +("1_3_4_22", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*((~d)/(~x))^(~n) + (~!c)*((~d)/(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + ext_isinteger((~m)) ? +-(~d)^((~m) + 1)* int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), (~d)⨸(~x), "1_3_4_22") : nothing) + +("1_3_4_23", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*((~d)/(~x))^(~n) + (~!c)*((~d)/(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger((~m))) ? +-(~d)*((~e)*(~x))^(~m)*((~d)⨸(~x))^(~m)* int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)*(~x)^(2*(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), (~d)⨸(~x), "1_3_4_23") : nothing) + +("1_3_4_24", +@rule ∫(((~!a) + (~!b)*((~d)/(~x))^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + eq((~n2), -2*(~n)) && + ext_isinteger(2*(~n)) ? +-(~d)*int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)⨸(~d)^(2*(~n))*(~x)^(2*(~n)))^(~p)⨸(~x)^2, (~x), (~x), (~d)⨸(~x), "1_3_4_24") : nothing) + +("1_3_4_25", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*((~d)/(~x))^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + eq((~n2), -2*(~n)) && + ext_isinteger(2*(~n)) && + ext_isinteger((~m)) ? +-(~d)^((~m) + 1)* int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)⨸(~d)^(2*(~n))*(~x)^(2*(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), (~d)⨸(~x), "1_3_4_25") : nothing) + +("1_3_4_26", +@rule ∫(((~!e)*(~x))^(~m)*((~a) + (~!b)*((~d)/(~x))^(~n) + (~!c)*(~x)^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + eq((~n2), -2*(~n)) && + !(ext_isinteger((~m))) && + ext_isinteger(2*(~n)) ? +-(~d)*((~e)*(~x))^(~m)*((~d)⨸(~x))^(~m)* int_and_subst(((~a) + (~b)*(~x)^(~n) + (~c)⨸(~d)^(2*(~n))*(~x)^(2*(~n)))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), (~d)⨸(~x), "1_3_4_26") : nothing) + +("1_3_4_27", +@rule ∫((~!u)*((~!e)*((~a) + (~!b)*(~x)^(~!n))^(~!r))^(~p)*((~!f)*((~c) + (~!d)*(~x)^(~!n))^(~s))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~q), (~r), (~s), (~x)) ? +((~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)))* ∫((~u)*((~a) + (~b)*(~x)^(~n))^((~p)*(~r))*((~c) + (~d)*(~x)^(~n))^((~q)*(~s)), (~x)) : nothing) + +("1_3_4_28", +@rule ∫((~u)^(~m),(~x)) => + !contains_var((~m), (~x)) && + linear((~u), (~x)) && + !(linear_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m), (~x)) : nothing) + +("1_3_4_29", +@rule ∫((~u)^(~!m)*(~v)^(~!n),(~x)) => + !contains_var((~m), (~n), (~x)) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~n), (~x)) : nothing) + +("1_3_4_30", +@rule ∫((~u)^(~!m)*(~v)^(~!n)*(~w)^(~!p),(~x)) => + !contains_var((~m), (~n), (~p), (~x)) && + linear((~u), (~v), (~w), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~n)*expand_to_sum((~w), (~x))^(~p), (~x)) : nothing) + +("1_3_4_31", +@rule ∫((~u)^(~!m)*(~v)^(~!n)*(~w)^(~!p)*(~z)^(~!q),(~x)) => + !contains_var((~m), (~n), (~p), (~q), (~x)) && + linear((~u), (~v), (~w), (~z), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~z), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~n)*expand_to_sum((~w), (~x))^(~p)* expand_to_sum((~z), (~x))^(~q), (~x)) : nothing) + +("1_3_4_32", +@rule ∫((~u)^(~p),(~x)) => + !contains_var((~p), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_33", +@rule ∫(((~!c)*(~x))^(~!m)*(~u)^(~!p),(~x)) => + !contains_var((~c), (~m), (~p), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~c)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_34", +@rule ∫((~u)^(~!p)*(~v)^(~!q),(~x)) => + !contains_var((~p), (~q), (~x)) && + isbinomial([(~u), (~v)], (~x)) && + eq(binomial_degree((~u), (~x)) - binomial_degree((~v), (~x)), 0) && + !(binomial_without_simplify([(~u), (~v)], (~x))) ? +∫(expand_to_sum((~u), (~x))^(~p)*expand_to_sum((~v), (~x))^(~q), (~x)) : nothing) + +("1_3_4_35", +@rule ∫(((~!e)*(~x))^(~!m)*(~u)^(~!p)*(~v)^(~!q),(~x)) => + !contains_var((~e), (~m), (~p), (~q), (~x)) && + isbinomial([(~u), (~v)], (~x)) && + eq(binomial_degree((~u), (~x)) - binomial_degree((~v), (~x)), 0) && + !(binomial_without_simplify([(~u), (~v)], (~x))) ? +∫(((~e)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~p)*expand_to_sum((~v), (~x))^(~q), (~x)) : nothing) + +("1_3_4_36", +@rule ∫((~u)^(~!m)*(~v)^(~!p)*(~w)^(~!q),(~x)) => + !contains_var((~m), (~p), (~q), (~x)) && + isbinomial([(~u), (~v), (~w)], (~x)) && + eq(binomial_degree((~u), (~x)) - binomial_degree((~v), (~x)), 0) && + eq(binomial_degree((~u), (~x)) - binomial_degree((~w), (~x)), 0) && + !(binomial_without_simplify([(~u), (~v), (~w)], (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~p)*expand_to_sum((~w), (~x))^(~q), (~x)) : nothing) + +("1_3_4_37", +@rule ∫(((~!g)*(~x))^(~!m)*(~u)^(~!p)*(~v)^(~!q)*(~z)^(~!r),(~x)) => + !contains_var((~g), (~m), (~p), (~q), (~r), (~x)) && + isbinomial([(~u), (~v), (~z)], (~x)) && + eq(binomial_degree((~u), (~x)) - binomial_degree((~v), (~x)), 0) && + eq(binomial_degree((~u), (~x)) - binomial_degree((~z), (~x)), 0) && + !(binomial_without_simplify([(~u), (~v), (~z)], (~x))) ? +∫(((~g)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~p)*expand_to_sum((~v), (~x))^(~q)* expand_to_sum((~z), (~x))^(~r), (~x)) : nothing) + +("1_3_4_38", +@rule ∫(((~!c)*(~x))^(~!m)*(~Pq)*(~u)^(~!p),(~x)) => + !contains_var((~c), (~m), (~p), (~x)) && + poly((~Pq), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~c)*(~x))^(~m)*(~Pq)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_39", +@rule ∫((~u)^(~p),(~x)) => + !contains_var((~p), (~x)) && + generalized_binomial((~u), (~x)) && + !(generalized_binomial_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_40", +@rule ∫(((~!c)*(~x))^(~!m)*(~u)^(~!p),(~x)) => + !contains_var((~c), (~m), (~p), (~x)) && + generalized_binomial((~u), (~x)) && + !(generalized_binomial_without_simplify((~u), (~x))) ? +∫(((~c)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_41", +@rule ∫((~u)^(~p),(~x)) => + !contains_var((~p), (~x)) && + quadratic((~u), (~x)) && + !(quadratic_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_42", +@rule ∫((~u)^(~!m)*(~v)^(~!p),(~x)) => + !contains_var((~m), (~p), (~x)) && + linear((~u), (~x)) && + quadratic((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + quadratic_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~p), (~x)) : nothing) + +("1_3_4_43", +@rule ∫((~u)^(~!m)*(~v)^(~!n)*(~w)^(~!p),(~x)) => + !contains_var((~m), (~n), (~p), (~x)) && + linear((~u), (~v), (~x)) && + quadratic((~w), (~x)) && + !( + linear_without_simplify((~u), (~v), (~x)) && + quadratic_without_simplify((~w), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~m)*expand_to_sum((~v), (~x))^(~n)*expand_to_sum((~w), (~x))^(~p), (~x)) : nothing) + +("1_3_4_44", +@rule ∫((~u)^(~!p)*(~v)^(~!q),(~x)) => + !contains_var((~p), (~q), (~x)) && + quadratic((~u), (~x)) && + quadratic((~v), (~x))&& + !( + quadratic_without_simplify((~u), (~x)) && + quadratic_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~p)*expand_to_sum((~v), (~x))^(~q), (~x)) : nothing) + +("1_3_4_45", +@rule ∫((~z)^(~!m)*(~u)^(~!p)*(~v)^(~!q),(~x)) => + !contains_var((~m), (~p), (~q), (~x)) && + linear((~z), (~x)) && + quadratic((~u), (~x)) && + quadratic((~v), (~x))&& + !( + linear_without_simplify((~z), (~x)) && + quadratic_without_simplify((~u), (~x)) && + quadratic_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~z), (~x))^(~m)*expand_to_sum((~u), (~x))^(~p)*expand_to_sum((~v), (~x))^(~q), (~x)) : nothing) + +("1_3_4_46", +@rule ∫((~Pq)*(~u)^(~!p),(~x)) => + !contains_var((~p), (~x)) && + poly((~Pq), (~x)) && + quadratic((~u), (~x)) && + !(quadratic_without_simplify((~u), (~x))) ? +∫((~Pq)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_47", +@rule ∫((~u)^(~!m)*(~Pq)*(~v)^(~!p),(~x)) => + !contains_var((~m), (~p), (~x)) && + poly((~Pq), (~x)) && + linear((~u), (~x)) && + quadratic((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + quadratic_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~m)*(~Pq)*expand_to_sum((~v), (~x))^(~p), (~x)) : nothing) + +("1_3_4_48", +@rule ∫((~u)^(~p),(~x)) => + !contains_var((~p), (~x)) && + trinomial((~u), (~x)) && + !(trinomial_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_49", +@rule ∫(((~!d)*(~x))^(~!m)*(~u)^(~!p),(~x)) => + !contains_var((~d), (~m), (~p), (~x)) && + trinomial((~u), (~x)) && + !(trinomial_without_simplify((~u), (~x))) ? +∫(((~d)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_50", +@rule ∫((~u)^(~!q)*(~v)^(~!p),(~x)) => + !contains_var((~p), (~q), (~x)) && + isbinomial((~u), (~x)) && + trinomial((~v), (~x)) && + !( + binomial_without_simplify((~u), (~x)) && + trinomial_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~q)*expand_to_sum((~v), (~x))^(~p), (~x)) : nothing) + +("1_3_4_51", +@rule ∫((~u)^(~!q)*(~v)^(~!p),(~x)) => + !contains_var((~p), (~q), (~x)) && + isbinomial((~u), (~x)) && + isbinomial((~v), (~x)) && + !( + binomial_without_simplify((~u), (~x)) && + binomial_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~q)*expand_to_sum((~v), (~x))^(~p), (~x)) : nothing) + +("1_3_4_52", +@rule ∫(((~!f)*(~x))^(~!m)*(~z)^(~!q)*(~u)^(~!p),(~x)) => + !contains_var((~f), (~m), (~p), (~q), (~x)) && + isbinomial((~z), (~x)) && + trinomial((~u), (~x)) && + !( + binomial_without_simplify((~z), (~x)) && + trinomial_without_simplify((~u), (~x)) + ) ? +∫(((~f)*(~x))^(~m)*expand_to_sum((~z), (~x))^(~q)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_53", +@rule ∫(((~!f)*(~x))^(~!m)*(~z)^(~!q)*(~u)^(~!p),(~x)) => + !contains_var((~f), (~m), (~p), (~q), (~x)) && + isbinomial((~z), (~x)) && + isbinomial((~u), (~x)) && + !( + binomial_without_simplify((~z), (~x)) && + binomial_without_simplify((~u), (~x)) + ) ? +∫(((~f)*(~x))^(~m)*expand_to_sum((~z), (~x))^(~q)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_54", +@rule ∫((~Pq)*(~u)^(~!p),(~x)) => + !contains_var((~p), (~x)) && + poly((~Pq), (~x)) && + trinomial((~u), (~x)) && + !(trinomial_without_simplify((~u), (~x))) ? +∫((~Pq)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_55", +@rule ∫(((~!d)*(~x))^(~!m)*(~Pq)*(~u)^(~!p),(~x)) => + !contains_var((~d), (~m), (~p), (~x)) && + poly((~Pq), (~x)) && + trinomial((~u), (~x)) && + !(trinomial_without_simplify((~u), (~x))) ? +∫(((~d)*(~x))^(~m)*(~Pq)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_56", +@rule ∫((~u)^(~p),(~x)) => + !contains_var((~p), (~x)) && + generalized_trinomial((~u), (~x)) && + !(generalized_trinomial_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_57", +@rule ∫(((~!d)*(~x))^(~!m)*(~u)^(~!p),(~x)) => + !contains_var((~d), (~m), (~p), (~x)) && + generalized_trinomial((~u), (~x)) && + !(generalized_trinomial_without_simplify((~u), (~x))) ? +∫(((~d)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_58", +@rule ∫((~z)*(~u)^(~!p),(~x)) => + !contains_var((~p), (~x)) && + isbinomial((~z), (~x)) && + generalized_trinomial((~u), (~x)) && + eq(binomial_degree((~z), (~x)) - generalized_trinomial_degree((~u), (~x)), 0) && + !( + binomial_without_simplify((~z), (~x)) && + generalized_trinomial_without_simplify((~u), (~x)) + ) ? +∫(expand_to_sum((~z), (~x))*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + +("1_3_4_59", +@rule ∫(((~!f)*(~x))^(~!m)*(~z)*(~u)^(~!p),(~x)) => + !contains_var((~f), (~m), (~p), (~x)) && + isbinomial((~z), (~x)) && + generalized_trinomial((~u), (~x)) && + eq(binomial_degree((~z), (~x)) - generalized_trinomial_degree((~u), (~x)), 0) && + !( + binomial_without_simplify((~z), (~x)) && + generalized_trinomial_without_simplify((~u), (~x)) + ) ? +∫(((~f)*(~x))^(~m)*expand_to_sum((~z), (~x))*expand_to_sum((~u), (~x))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/2 Exponentials/2.1 (c+d x)^m (a+b (F^(g (e+f x)))^n)^p.jl b/src/methods/rule_based/rules2/2 Exponentials/2.1 (c+d x)^m (a+b (F^(g (e+f x)))^n)^p.jl new file mode 100644 index 0000000..0b3edc0 --- /dev/null +++ b/src/methods/rule_based/rules2/2 Exponentials/2.1 (c+d x)^m (a+b (F^(g (e+f x)))^n)^p.jl @@ -0,0 +1,106 @@ +file_rules = [ +# (* ::Subsection::Closed:: *) +# (* 2.1 (c+d x)^m (a+b (F^(g (e+f x)))^n)^p *) +("2_1_1", +:(∫(((~!c) + (~!d)*(~x))^(~!m)*((~!b)*(~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n),(~x)) ) => :( + !contains_var((~F), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + gt((~m), 0) && + ext_isinteger(2*(~m)) && + !(USE_GAMMA) ? +((~c) + (~d)*(~x))^(~m)*((~b)*(~F)^((~g)*((~e) + (~f)*(~x))))^(~n)⨸((~f)*(~g)*(~n)*log((~F))) - (~d)*(~m)⨸((~f)*(~g)*(~n)*log((~F)))* ∫(((~c) + (~d)*(~x))^((~m) - 1)*((~b)*(~F)^((~g)*((~e) + (~f)*(~x))))^(~n), (~x)) : nothing)) + +("2_1_2", +:(∫(((~!c) + (~!d)*(~x))^(~m)*((~!b)*(~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n),(~x)) ) => :( + !contains_var((~F), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~m)) && + !(USE_GAMMA) ? +((~c) + (~d)*(~x))^((~m) + 1)*((~b)*(~F)^((~g)*((~e) + (~f)*(~x))))^(~n)⨸((~d)*((~m) + 1)) - (~f)*(~g)*(~n)*log((~F))⨸((~d)*((~m) + 1))* ∫(((~c) + (~d)*(~x))^((~m) + 1)*((~b)*(~F)^((~g)*((~e) + (~f)*(~x))))^(~n), (~x)) : nothing)) + +("2_1_3", +:(∫((~F)^((~!g)*((~!e) + (~!f)*(~x)))/((~!c) + (~!d)*(~x)),(~x)) ) => :( + !contains_var((~F), (~c), (~d), (~e), (~f), (~g), (~x)) && + !(USE_GAMMA) ? +(~F)^((~g)*((~e) - (~c)*(~f)⨸(~d)))⨸(~d)*SymbolicUtils.expinti((~f)*(~g)*((~c) + (~d)*(~x))*log((~F))⨸(~d)) : nothing)) + +("2_1_4", +:(∫(((~!c) + (~!d)*(~x))^(~!m)*(~F)^((~!g)*((~!e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~F), (~c), (~d), (~e), (~f), (~g), (~x)) && + ext_isinteger((~m)) ? +(-(~d))^(~m)*(~F)^((~g)*((~e) - (~c)*(~f)⨸(~d)))⨸((~f)^((~m) + 1)*(~g)^((~m) + 1)*log((~F))^((~m) + 1))* SymbolicUtils.gamma((~m) + 1, -(~f)*(~g)*log((~F))⨸(~d)*((~c) + (~d)*(~x))) : nothing)) + +("2_1_5", +:(∫((~F)^((~!g)*((~!e) + (~!f)*(~x)))/sqrt((~!c) + (~!d)*(~x)),(~x)) ) => :( + !contains_var((~F), (~c), (~d), (~e), (~f), (~g), (~x)) && + !(USE_GAMMA) ? +2⨸(~d)*int_and_subst((~F)^((~g)*((~e) - (~c)*(~f)⨸(~d)) + (~f)*(~g)*(~x)^2⨸(~d)), (~x), (~x), sqrt((~c) + (~d)*(~x)), "2_1_5") : nothing)) + +("2_1_6", +:(∫(((~!c) + (~!d)*(~x))^(~m)*(~F)^((~!g)*((~!e) + (~!f)*(~x))),(~x)) ) => :( + !contains_var((~F), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !(ext_isinteger((~m))) ? +-(~F)^((~g)*((~e) - (~c)*(~f)⨸(~d)))*((~c) + (~d)*(~x))^ fracpart( (~m))⨸((~d)*(-(~f)*(~g)*log((~F))⨸(~d))^(intpart((~m)) + 1)*(-(~f)*(~g)* log((~F))*((~c) + (~d)*(~x))⨸(~d))^fracpart((~m)))* SymbolicUtils.gamma((~m) + 1, (-(~f)*(~g)*log((~F))⨸(~d))*((~c) + (~d)*(~x))) : nothing)) + +("2_1_7", +:(∫(((~!c) + (~!d)*(~x))^(~!m)*((~!b)*(~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~n),(~x)) ) => :( + !contains_var((~F), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) ? +((~b)*(~F)^((~g)*((~e) + (~f)*(~x))))^(~n)⨸(~F)^((~g)*(~n)*((~e) + (~f)*(~x)))* ∫(((~c) + (~d)*(~x))^(~m)*(~F)^((~g)*(~n)*((~e) + (~f)*(~x))), (~x)) : nothing)) + +("2_1_8", +:(∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n))^(~!p),(~x)) ) => :( + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~c) + (~d)*(~x))^(~m), ((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^(~p), (~x)), (~x)) : nothing)) + +("2_1_9", +:(∫(((~!c) + (~!d)*(~x))^(~!m)/((~a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n)),(~x)) ) => :( + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + igt((~m), 0) ? +((~c) + (~d)*(~x))^((~m) + 1)⨸((~a)*(~d)*((~m) + 1)) - (~b)⨸(~a)*∫(((~c) + (~d)*(~x))^ (~m)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n)⨸((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n)), (~x)) : nothing)) + +# (* Int[(c_.+d_.*x_)^m_./(a_+b_.*(F_^(g_.*(e_.+f_.*x_)))^n_.),x_Symbol] := -(c+d*x)^m/(a*f*g*n*Log[F])*Log[1+a/(b*(F^(g*(e+f*x)))^n)] + d*m/(a*f*g*n*Log[F])*Int[(c+d*x)^(m-1)*Log[1+a/(b*(F^(g*(e+f*x)))^n) ],x] /; FreeQ[{F,a,b,c,d,e,f,g,n},x] && IGtQ[m,0] *) +("2_1_10", +:(∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n))^(~p),(~x)) ) => :( + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + ilt((~p), 0) && + igt((~m), 0) ? +1⨸(~a)*∫(((~c) + (~d)*(~x))^(~m)*((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^((~p) + 1), (~x)) - (~b)⨸(~a)* ∫(((~c) + (~d)*(~x))^(~m)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n)*((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^(~p), (~x)) : nothing)) + +# TODO find definition of Dist and NormalizePowerOfLinear functinos.... where are they!!!!!?????? +# ("2_1_11", +# @rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n))^(~p),(~x)) => +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && +# igt((~m), 0) && +# lt((~p), -1) ? +# Dist[((~c) + (~d)*(~x))^(~m), IntHide[((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^(~p), (~x)], (~x)] - (~d)*(~m)*∫(((~c) + (~d)*(~x))^((~m) - 1)*IntHide[((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^(~p), (~x)), (~x)] : nothing) + +# ("2_1_12", +# @rule ∫((~u)^(~!m)*((~!a) + (~!b)*((~F)^((~!g)*(~v)))^(~!n))^(~!p),(~x)) => +# !contains_var((~F), (~a), (~b), (~g), (~n), (~p), (~x)) && +# linear((~v), (~x)) && +# PowerOflinear((~u), (~x)) && +# !( +# linear_without_simplify((~v), (~x)) && +# PowerOflinear_without_simplify((~u), (~x)) +# ) && +# ext_isinteger((~m)) ? +# ∫(NormalizePowerOfLinear[(~u), (~x))^ (~m)*((~a) + (~b)*((~F)^((~g)*expand_to_sum((~v), (~x)]))^(~n))^(~p), (~x)) : nothing) +# +# ("2_1_13", +# @rule ∫((~u)^(~!m)*((~!a) + (~!b)*((~F)^((~!g)*(~v)))^(~!n))^(~!p),(~x)) => +# !contains_var((~F), (~a), (~b), (~g), (~m), (~n), (~p), (~x)) && +# linear((~v), (~x)) && +# PowerOflinear((~u), (~x)) && +# !( +# linear_without_simplify((~v), (~x)) && +# PowerOflinear_without_simplify((~u), (~x)) +# ) && +# !(ext_isinteger((~m))) ? +# Module[{(~uu) = NormalizePowerOfLinear[(~u), (~x)], (~z)}, (~z) = (~If)[PowerQ[(~uu)] && FreeQ[(~uu)[[2]], (~x)], (~uu)[[1]]^((~m)*(~uu)[[2]]), (~uu)^(~m)]; (~uu)^(~m)⨸(~z)*∫((~z)*((~a) + (~b)*((~F)^((~g)*expand_to_sum((~v), (~x))))^(~n))^(~p), (~x))] : nothing) +# +# ("2_1_14", +# @rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~c) + (~d)*(~x))^(~m)*((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^(~p), (~x)] : nothing) + +] diff --git a/src/methods/rule_based/rules2/2 Exponentials/2.2 (c+d x)^m (F^(g (e+f x)))^n (a+b (F^(g (e+f x)))^n)^p.jl b/src/methods/rule_based/rules2/2 Exponentials/2.2 (c+d x)^m (F^(g (e+f x)))^n (a+b (F^(g (e+f x)))^n)^p.jl new file mode 100644 index 0000000..3bb6413 --- /dev/null +++ b/src/methods/rule_based/rules2/2 Exponentials/2.2 (c+d x)^m (F^(g (e+f x)))^n (a+b (F^(g (e+f x)))^n)^p.jl @@ -0,0 +1,28 @@ +file_rules = [ +# (* ::Subsection::Closed:: *) +# (* 2.2 (c+d x)^m (F^(g (e+f x)))^n (a+b (F^(g (e+f x)))^n)^p *) +("2_2_1", +@rule ∫(((~!c) + (~!d)*(~x))^ (~!m)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^ (~!n)/((~a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + igt((~m), 0) ? +((~c) + (~d)*(~x))^(~m)⨸((~b)*(~f)*(~g)*(~n)*log((~F)))*log(1 + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n)⨸(~a)) - (~d)*(~m)⨸((~b)*(~f)*(~g)*(~n)*log((~F)))* ∫(((~c) + (~d)*(~x))^((~m) - 1)*log(1 + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n)⨸(~a)), (~x)) : nothing) + +("2_2_2", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^ (~!n)*((~!a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n))^(~!p),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~p), -1) ? +((~c) + (~d)*(~x))^ (~m)*((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^((~p) + 1)⨸((~b)*(~f)*(~g)*(~n)*((~p) + 1)* log((~F))) - (~d)*(~m)⨸((~b)*(~f)*(~g)*(~n)*((~p) + 1)*log((~F)))* ∫(((~c) + (~d)*(~x))^((~m) - 1)*((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^((~p) + 1), (~x)) : nothing) + +# ("2_2_3", +# @rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^ (~!n)*((~!a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n))^(~!p),(~x)) => +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~c) + (~d)*(~x))^(~m)*((~F)^((~g)*((~e) + (~f)*(~x))))^ (~n)*((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^(~p), (~x)] : nothing) + +("2_2_4", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~!k)*(~G)^((~!j)*((~!h) + (~!i)*(~x))))^ (~!q)*((~!a) + (~!b)*((~F)^((~!g)*((~!e) + (~!f)*(~x))))^(~!n))^(~!p),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~k), (~m), (~n), (~p), (~q), (~x)) && + eq((~f)*(~g)*(~n)*log((~F)) - (~i)*(~j)*(~q)*log((~G)), 0) && + !eq(((~k)*(~G)^((~j)*((~h) + (~i)*(~x))))^(~q) - ((~F)^((~g)*((~e) + (~f)*(~x))))^(~n), 0) ? +((~k)*(~G)^((~j)*((~h) + (~i)*(~x))))^(~q)⨸((~F)^((~g)*((~e) + (~f)*(~x))))^(~n)* ∫(((~c) + (~d)*(~x))^(~m)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n)*((~a) + (~b)*((~F)^((~g)*((~e) + (~f)*(~x))))^(~n))^(~p), (~x)) : nothing) + +] diff --git a/src/methods/rule_based/rules2/2 Exponentials/2.3 Miscellaneous exponentials.jl b/src/methods/rule_based/rules2/2 Exponentials/2.3 Miscellaneous exponentials.jl new file mode 100644 index 0000000..74d4120 --- /dev/null +++ b/src/methods/rule_based/rules2/2 Exponentials/2.3 Miscellaneous exponentials.jl @@ -0,0 +1,772 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 2.3 Miscellaneous exponentials *) +("2_3_1", +@rule ∫(((~F)^((~!c)*((~!a) + (~!b)*(~x))))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~n), (~x)) ? +((~F)^((~c)*((~a) + (~b)*(~x))))^(~n)⨸((~b)*(~c)*(~n)*log((~F))) : nothing) + +("2_3_2", +@rule ∫((~u)*(~F)^((~!c)*(~v)),(~x)) => + !contains_var((~F), (~c), (~x)) && + poly((~u), (~x)) && + linear((~v), (~x)) && + USE_GAMMA ? +∫(ext_expand((~u)*(~F)^((~c)*expand_to_sum((~v), (~x))), (~x)), (~x)) : nothing) + +("2_3_3", +@rule ∫((~u)*(~F)^((~!c)*(~v)),(~x)) => + !contains_var((~F), (~c), (~x)) && + poly((~u), (~x)) && + linear((~v), (~x)) && + !(USE_GAMMA) ? +∫(ext_expand((~F)^((~c)*expand_to_sum((~v), (~x))), (~u), (~x)), (~x)) : nothing) + +("2_3_4", +@rule ∫((~u)^(~!m)*(~F)^((~!c)*(~v))*(~w),(~x)) => + eq(ext_coeff((~u), (~x))*ext_coeff((~w), (~x))*((~m) + 1) - ext_coeff((~v), (~x))*(~c)*(ext_coeff((~u), (~x))*ext_coeff((~w), 1) - ext_coeff((~u), 1)*ext_coeff((~w), (~x)))*log((~F)), 0) && + !contains_var((~F), (~c), (~m), (~x)) && + linear((~u), (~v), (~w), (~x)) ? +ext_coeff((~w), (~x))*(~u)^((~m) + 1)*(~F)^((~c)*(~v))⨸(ext_coeff((~v), (~x))*(~c)*ext_coeff((~u), (~x))*log((~F))) : nothing) + +# ("2_3_5", +# @rule ∫((~w)*(~u)^(~!m)*(~F)^((~!c)*(~v)),(~x)) => +# !contains_var((~F), (~c), (~x)) && +# poly((~w), (~x)) && +# linear((~v), (~x)) && +# PowerOflinear((~u), (~x)) && +# ext_isinteger((~m)) && +# USE_GAMMA ? +# ∫(ext_expand( (~w)*NormalizePowerOfLinear[(~u), (~x)]^(~m)*(~F)^((~c)*expand_to_sum((~v), (~x))), (~x)), (~x)) : nothing) +# +# ("2_3_6", +# @rule ∫((~w)*(~u)^(~!m)*(~F)^((~!c)*(~v)),(~x)) => +# !contains_var((~F), (~c), (~x)) && +# poly((~w), (~x)) && +# linear((~v), (~x)) && +# PowerOflinear((~u), (~x)) && +# ext_isinteger((~m)) && +# !(USE_GAMMA) ? +# ∫(ext_expand((~F)^((~c)*expand_to_sum((~v), (~x))), (~w)*NormalizePowerOfLinear[(~u), (~x)]^(~m), (~x)), (~x)) : nothing) + +# ("2_3_7", +# @rule ∫((~w)*(~u)^(~!m)*(~F)^((~!c)*(~v)),(~x)) => +# !contains_var((~F), (~c), (~m), (~x)) && +# poly((~w), (~x)) && +# linear((~v), (~x)) && +# PowerOflinear((~u), (~x)) && +# !(ext_isinteger((~m))) ? +# Module[{(~uu) = NormalizePowerOfLinear[(~u), (~x)], (~z)}, (~z) = (~If)[PowerQ[(~uu)] && FreeQ[(~uu)[[2]], (~x)], (~uu)[[1]]^((~m)*(~uu)[[2]]), (~uu)^(~m)]; (~uu)^(~m)⨸(~z)*∫(ext_expand((~w)*(~z)*(~F)^((~c)*expand_to_sum((~v), (~x))), (~x)), (~x))] : nothing) + +("2_3_8", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))* log((~!d)*(~x))^(~!n)*((~e) + (~!h)*((~!f) + (~!g)*(~x))*log((~!d)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~x)) && + eq((~e) - (~f)*(~h)*((~n) + 1), 0) && + eq((~g)*(~h)*((~n) + 1) - (~b)*(~c)*(~e)*log((~F)), 0) && + !eq((~n), -1) ? +(~e)*(~x)*(~F)^((~c)*((~a) + (~b)*(~x)))*log((~d)*(~x))^((~n) + 1)⨸((~n) + 1) : nothing) + +("2_3_9", +@rule ∫((~x)^(~!m)*(~F)^((~!c)*((~!a) + (~!b)*(~x)))* log((~!d)*(~x))^(~!n)*((~e) + (~!h)*((~!f) + (~!g)*(~x))*log((~!d)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e)*((~m) + 1) - (~f)*(~h)*((~n) + 1), 0) && + eq((~g)*(~h)*((~n) + 1) - (~b)*(~c)*(~e)*log((~F)), 0) && + !eq((~n), -1) ? +(~e)*(~x)^((~m) + 1)*(~F)^((~c)*((~a) + (~b)*(~x)))*log((~d)*(~x))^((~n) + 1)⨸((~n) + 1) : nothing) + +("2_3_10", +@rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) ? +(~F)^((~a) + (~b)*((~c) + (~d)*(~x)))⨸((~b)*(~d)*log((~F))) : nothing) + +("2_3_11", +@rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) && + pos((~b)) ? +(~F)^(~a)*sqrt(π)* SymbolicUtils.erfi(((~c) + (~d)*(~x))*rt((~b)*log((~F)), 2))⨸(2*(~d)*rt((~b)*log((~F)), 2)) : nothing) + +("2_3_12", +@rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) && + neg((~b)) ? +(~F)^(~a)*sqrt(π)* SymbolicUtils.erf(((~c) + (~d)*(~x))*rt(-(~b)*log((~F)), 2))⨸(2*(~d)*rt(-(~b)*log((~F)), 2)) : nothing) + +("2_3_13", +@rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) && + ext_isinteger(2/(~n)) && + ilt((~n), 0) ? +((~c) + (~d)*(~x))*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸(~d) - (~b)*(~n)*log((~F))*∫(((~c) + (~d)*(~x))^(~n)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~x)) : nothing) + +("2_3_14", +@rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) && + ext_isinteger(2/(~n)) && + !(ext_isinteger((~n))) ? +ext_den((~n))⨸(~d)* int_and_subst((~x)^(ext_den((~n)) - 1)*(~F)^((~a) + (~b)*(~x)^(ext_den((~n))*(~n))), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸ext_den((~n))), "2_3_14") : nothing) + +("2_3_15", +@rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~n), (~x)) && + !(ext_isinteger(2/(~n))) ? +-(~F)^(~a)*((~c) + (~d)*(~x))* SymbolicUtils.gamma(1⨸(~n), -(~b)*((~c) + (~d)*(~x))^(~n)*log((~F)))⨸((~d)* (~n)*(-(~b)*((~c) + (~d)*(~x))^(~n)*log((~F)))^(1⨸(~n))) : nothing) + +("2_3_16", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~m), (~n) - 1) && + eq((~d)*(~e) - (~c)*(~f), 0) ? +((~e) + (~f)*(~x))^(~n)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸((~b)*(~f)*(~n)*((~c) + (~d)*(~x))^(~n)*log((~F))) : nothing) + +("2_3_17", +@rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n))/((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~d)*(~e) - (~c)*(~f), 0) ? +(~F)^(~a)*SymbolicUtils.expinti((~b)*((~c) + (~d)*(~x))^(~n)*log((~F)))⨸((~f)*(~n)) : nothing) + +("2_3_18", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + eq((~n), 2*((~m) + 1)) ? +1⨸((~d)*((~m) + 1))*int_and_subst((~F)^((~a) + (~b)*(~x)^2), (~x), (~x), ((~c) + (~d)*(~x))^((~m) + 1), "2_3_18") : nothing) + +("2_3_19", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) && + ext_isinteger(2*((~m) + 1)/(~n)) && + lt(0, ((~m) + 1)/(~n), 5) && + ext_isinteger((~n)) && + ( + lt(0, (~n), (~m) + 1) || + lt((~m), (~n), 0) + ) ? +((~c) + (~d)*(~x))^((~m) - (~n) + 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸((~b)*(~d)*(~n)*log((~F))) - ((~m) - (~n) + 1)⨸((~b)*(~n)*log((~F)))* ∫(((~c) + (~d)*(~x))^((~m) - (~n))*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~x)) : nothing) + +("2_3_20", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger(2*simplify(((~m) + 1)/(~n))) && + lt(0, simplify(((~m) + 1)/(~n)), 5) && + !(isrational((~m))) && + sumsimpler((~m), -(~n)) ? +((~c) + (~d)*(~x))^((~m) - (~n) + 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸((~b)*(~d)*(~n)*log((~F))) - ((~m) - (~n) + 1)⨸((~b)*(~n)*log((~F)))* ∫(((~c) + (~d)*(~x))^simplify((~m) - (~n))*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~x)) : nothing) + +("2_3_21", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) && + ext_isinteger(2*((~m) + 1)/(~n)) && + lt(-4, ((~m) + 1)/(~n), 5) && + ext_isinteger( (~n)) && + ( + gt((~n), 0) && + lt((~m), -1) || + gt(-(~n), 0) && + le(-(~n), (~m) + 1) + ) ? +((~c) + (~d)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸((~d)*((~m) + 1)) - (~b)*(~n)*log((~F))⨸((~m) + 1)* ∫(((~c) + (~d)*(~x))^((~m) + (~n))*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~x)) : nothing) + +("2_3_22", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger(2*simplify(((~m) + 1)/(~n))) && + lt(-4, simplify(((~m) + 1)/(~n)), 5) && + !(isrational((~m))) && + sumsimpler((~m), (~n)) ? +((~c) + (~d)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸((~d)*((~m) + 1)) - (~b)*(~n)*log((~F))⨸((~m) + 1)* ∫(((~c) + (~d)*(~x))^simplify((~m) + (~n))*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~x)) : nothing) + +("2_3_23", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger(2*((~m) + 1)/(~n)) && + lt(0, ((~m) + 1)/(~n), 5) && + !(ext_isinteger((~n))) ? +ext_den((~n))⨸(~d)* int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*(~F)^((~a) + (~b)*(~x)^(ext_den((~n))*(~n))), (~x), (~x), ((~c) + (~d)*(~x))^(1⨸ext_den((~n))), "2_3_23") : nothing) + +("2_3_24", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~d)*(~e) - (~c)*(~f), 0) && + ext_isinteger(2*simplify(((~m) + 1)/(~n))) && + !(ext_isinteger((~m))) && + !eq((~f), (~d)) && + !eq((~c)*(~e), 0) ? +((~e) + (~f)*(~x))^(~m)⨸((~c) + (~d)*(~x))^(~m)*∫(((~c) + (~d)*(~x))^(~m)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~x)) : nothing) + +# ("2_3_25", +# @rule ∫(((~!e) + (~!f)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => +# igt(simplify(((~m) + 1)/(~n)), 0) && +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && +# eq((~d)*(~e) - (~c)*(~f), 0) && +# !(USE_GAMMA) ? +# -(~F)^(~a)*((~f)⨸(~d))^(~m)⨸((~d)*(~n)*(-(~b)*log((~F)))^simplify(((~m) + 1)⨸(~n)))* simplify(FunctionExpand[SymbolicUtils.gamma(simplify(((~m) + 1)⨸(~n)), -(~b)*((~c) + (~d)*(~x))^(~n)*log((~F)))]) : nothing) + +("2_3_26", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~d)*(~e) - (~c)*(~f), 0) ? +-(~F)^(~a)*((~e) + (~f)*(~x))^((~m) + 1)⨸((~f)*(~n)*(-(~b)*((~c) + (~d)*(~x))^(~n)*log((~F)))^(((~m) + 1)⨸(~n)))* SymbolicUtils.gamma(((~m) + 1)⨸(~n), -(~b)*((~c) + (~d)*(~x))^(~n)*log((~F))) : nothing) + +#(* above integral : -F^a*(e+f*x)^(m+1)/(f*n)*ExpIntegralE[1-(m+1)/n,-b*(c+d*x)^n*Log[F] ] *) +("2_3_27", +@rule ∫(((~!e) + (~!f)*(~x))^(~m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) && + isfraction((~m)) && + gt((~m), 1) ? +(~f)*((~e) + (~f)*(~x))^((~m) - 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^2)⨸(2*(~b)*(~d)^2*log((~F))) + ((~d)*(~e) - (~c)*(~f))⨸(~d)*∫(((~e) + (~f)*(~x))^((~m) - 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^2), (~x)) - ((~m) - 1)*(~f)^2⨸(2*(~b)*(~d)^2*log((~F)))* ∫(((~e) + (~f)*(~x))^((~m) - 2)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^2), (~x)) : nothing) + +("2_3_28", +@rule ∫(((~!e) + (~!f)*(~x))^(~m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) && + lt((~m), -1) ? +(~f)*((~e) + (~f)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^2)⨸(((~m) + 1)*(~f)^2) + 2*(~b)*(~d)*((~d)*(~e) - (~c)*(~f))*log((~F))⨸((~f)^2*((~m) + 1))* ∫(((~e) + (~f)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^2), (~x)) - 2*(~b)*(~d)^2*log((~F))⨸((~f)^2*((~m) + 1))* ∫(((~e) + (~f)*(~x))^((~m) + 2)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^2), (~x)) : nothing) + +("2_3_29", +@rule ∫(((~!e) + (~!f)*(~x))^(~m)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) && + igt((~n), 2) && + lt((~m), -1) ? +((~e) + (~f)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸((~f)*((~m) + 1)) - (~b)*(~d)*(~n)*log((~F))⨸((~f)*((~m) + 1))* ∫(((~e) + (~f)*(~x))^((~m) + 1)*((~c) + (~d)*(~x))^((~n) - 1)*(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~x)) : nothing) + +("2_3_30", +@rule ∫((~F)^((~!a) + (~b)/((~!c) + (~!d)*(~x)))/((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) ? +(~d)⨸(~f)*∫((~F)^((~a) + (~b)⨸((~c) + (~d)*(~x)))⨸((~c) + (~d)*(~x)), (~x)) - ((~d)*(~e) - (~c)*(~f))⨸(~f)*∫((~F)^((~a) + (~b)⨸((~c) + (~d)*(~x)))⨸(((~c) + (~d)*(~x))*((~e) + (~f)*(~x))), (~x)) : nothing) + +("2_3_31", +@rule ∫(((~!e) + (~!f)*(~x))^(~m)*(~F)^((~!a) + (~b)/((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) && + ilt((~m), -1) ? +((~e) + (~f)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)⨸((~c) + (~d)*(~x)))⨸((~f)*((~m) + 1)) + (~b)*(~d)*log((~F))⨸((~f)*((~m) + 1))* ∫(((~e) + (~f)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)⨸((~c) + (~d)*(~x)))⨸((~c) + (~d)*(~x))^2, (~x)) : nothing) + +# ("2_3_32", +# @rule ∫((~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n))/((~!e) + (~!f)*(~x)),(~x)) => +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && +# !eq((~d)*(~e) - (~c)*(~f), 0) ? +# Unintegrable[(~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n))⨸((~e) + (~f)*(~x)), (~x)] : nothing) + +("2_3_33", +@rule ∫((~u)^(~!m)*(~F)^(~v),(~x)) => + !contains_var((~F), (~m), (~x)) && + linear((~u), (~x)) && + isbinomial((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + binomial_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~m)*(~F)^expand_to_sum((~v), (~x)), (~x)) : nothing) + +("2_3_34", +@rule ∫((~u)*(~F)^((~!a) + (~!b)*((~!c) + (~!d)*(~x))^(~n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~n), (~x)) && + poly((~u), (~x)) ? +∫(expand_linear_product((~F)^((~a) + (~b)*((~c) + (~d)*(~x))^(~n)), (~u), (~c), (~d), (~x)), (~x)) : nothing) + +# ("2_3_35", +# @rule ∫((~!u)*(~F)^((~!a) + (~!b)*(~v)),(~x)) => +# !contains_var((~F), (~a), (~b), (~x)) && +# poly((~u), (~x)) && +# PowerOflinear((~v), (~x)) && +# !(PowerOflinear_without_simplify((~v), (~x))) ? +# ∫((~u)*(~F)^((~a) + (~b)*NormalizePowerOfLinear[(~v), (~x)]), (~x)) : nothing) + +#(* Int[u_.*F_^(a_.+b_.*v_^n_),x_Symbol] := Int[u*F^(a+b*ExpandToSum[v,x]^n),x] /; FreeQ[{F,a,b,n},x] && PolynomialQ[u,x] && LinearQ[v,x] && Not[LinearMatchQ[v,x]] *) +#(* Int[u_.*F_^u_,x_Symbol] := Int[u*F^ExpandToSum[u,x],x] /; FreeQ[F,x] && PolynomialQ[u,x] && BinomialQ[u,x] && Not[BinomialMatchQ[u,x]] *) +("2_3_36", +@rule ∫((~F)^((~!a) + (~b)/((~!c) + (~!d)*(~x)))/(((~!e) + (~!f)*(~x))*((~!g) + (~!h)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~d)*(~e) - (~c)*(~f), 0) ? +-(~d)⨸((~f)*((~d)*(~g) - (~c)*(~h)))* int_and_subst((~F)^((~a) - (~b)*(~h)⨸((~d)*(~g) - (~c)*(~h)) + (~d)*(~b)*(~x)⨸((~d)*(~g) - (~c)*(~h)))⨸(~x), (~x), (~x), ((~g) + (~h)*(~x))⨸((~c) + (~d)*(~x)), "2_3_36") : nothing) + +("2_3_37", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)*(~F)^((~!e) + (~!f)*((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) ? +(~F)^((~e) + (~f)*(~b)⨸(~d))*∫(((~g) + (~h)*(~x))^(~m), (~x)) : nothing) + +("2_3_38", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)*(~F)^((~!e) + (~!f)*((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)*(~g) - (~c)*(~h), 0) ? +∫(((~g) + (~h)*(~x))^(~m)*(~F)^(((~d)*(~e) + (~b)*(~f))⨸(~d) - (~f)*((~b)*(~c) - (~a)*(~d))⨸((~d)*((~c) + (~d)*(~x)))), (~x)) : nothing) + +("2_3_39", +@rule ∫((~F)^((~!e) + (~!f)*((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))/((~!g) + (~!h)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~d)*(~g) - (~c)*(~h), 0) ? +(~d)⨸(~h)*∫((~F)^((~e) + (~f)*((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))⨸((~c) + (~d)*(~x)), (~x)) - ((~d)*(~g) - (~c)*(~h))⨸(~h)* ∫((~F)^((~e) + (~f)*((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))⨸(((~c) + (~d)*(~x))*((~g) + (~h)*(~x))), (~x)) : nothing) + +("2_3_40", +@rule ∫(((~!g) + (~!h)*(~x))^(~m)*(~F)^((~!e) + (~!f)*((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~d)*(~g) - (~c)*(~h), 0) && + ilt((~m), -1) ? +((~g) + (~h)*(~x))^((~m) + 1)*(~F)^((~e) + (~f)*((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))⨸((~h)*((~m) + 1)) - (~f)*((~b)*(~c) - (~a)*(~d))*log((~F))⨸((~h)*((~m) + 1))* ∫(((~g) + (~h)*(~x))^((~m) + 1)*(~F)^((~e) + (~f)*((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))⨸((~c) + (~d)*(~x))^2, (~x)) : nothing) + +("2_3_41", +@rule ∫((~F)^((~!e) + (~!f)*((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))/(((~!g) + (~!h)*(~x))*((~!i) + (~!j)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + eq((~d)*(~g) - (~c)*(~h), 0) ? +-(~d)⨸((~h)*((~d)*(~i) - (~c)*(~j)))* int_and_subst( (~F)^((~e) + (~f)*((~b)*(~i) - (~a)*(~j))⨸((~d)*(~i) - (~c)*(~j)) - ((~b)*(~c) - (~a)*(~d))*(~f)*(~x)⨸((~d)*(~i) - (~c)*(~j)))⨸ (~x), (~x), (~x), ((~i) + (~j)*(~x))⨸((~c) + (~d)*(~x)), "2_3_41") : nothing) + +("2_3_42", +@rule ∫((~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~x)) ? +(~F)^((~a) - (~b)^2⨸(4*(~c)))*∫((~F)^(((~b) + 2*(~c)*(~x))^2⨸(4*(~c))), (~x)) : nothing) + +("2_3_43", +@rule ∫((~F)^(~v),(~x)) => + !contains_var((~F), (~x)) && + quadratic((~v), (~x)) && + !(quadratic_without_simplify((~v), (~x))) ? +∫((~F)^expand_to_sum((~v), (~x)), (~x)) : nothing) + +("2_3_44", +@rule ∫(((~!d) + (~!e)*(~x))*(~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~b)*(~e) - 2*(~c)*(~d), 0) ? +(~e)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)*log((~F))) : nothing) + +("2_3_45", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*(~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~b)*(~e) - 2*(~c)*(~d), 0) && + gt((~m), 1) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)*log((~F))) - ((~m) - 1)*(~e)^2⨸(2*(~c)*log((~F)))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("2_3_46", +@rule ∫((~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~b)*(~e) - 2*(~c)*(~d), 0) ? +1⨸(2*(~e))*(~F)^((~a) - (~b)^2⨸(4*(~c)))* SymbolicUtils.expinti(((~b) + 2*(~c)*(~x))^2*log((~F))⨸(4*(~c))) : nothing) + +("2_3_47", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*(~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~b)*(~e) - 2*(~c)*(~d), 0) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) - 2*(~c)*log((~F))⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("2_3_48", +@rule ∫(((~!d) + (~!e)*(~x))*(~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~e) - 2*(~c)*(~d), 0) ? +(~e)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)*log((~F))) - ((~b)*(~e) - 2*(~c)*(~d))⨸(2*(~c))*∫((~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("2_3_49", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*(~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~e) - 2*(~c)*(~d), 0) && + gt((~m), 1) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)*log((~F))) - ((~b)*(~e) - 2*(~c)*(~d))⨸(2*(~c))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) - ((~m) - 1)*(~e)^2⨸(2*(~c)*log((~F)))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("2_3_50", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*(~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~e) - 2*(~c)*(~d), 0) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) - ((~b)*(~e) - 2*(~c)*(~d))*log((~F))⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) - 2*(~c)*log((~F))⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +# ("2_3_51", +# @rule ∫(((~!d) + (~!e)*(~x))^(~!m)*(~F)^((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~m), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x))^(~m)*(~F)^((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)] : nothing) + +("2_3_52", +@rule ∫((~u)^(~!m)*(~F)^(~v),(~x)) => + !contains_var((~F), (~m), (~x)) && + linear((~u), (~x)) && + quadratic((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + quadratic_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~m)*(~F)^expand_to_sum((~v), (~x)), (~x)) : nothing) + +("2_3_53", +@rule ∫((~x)^(~!m)*(~F)^((~!e)*((~!c) + (~!d)*(~x)))*((~!a) + (~!b)*(~F)^(~v))^(~p),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~v), 2*(~e)*((~c) + (~d)*(~x))) && + gt((~m), 0) && + ilt((~p), 0) ? +dist((~x)^(~m), ∫((~F)^((~e)*((~c) + (~d)*(~x)))*((~a) + (~b)*(~F)^(~v))^(~p), (~x)), (~x)) - (~m)*∫((~x)^((~m) - 1)*∫((~F)^((~e)*((~c) + (~d)*(~x)))*((~a) + (~b)*(~F)^(~v))^(~p), (~x)), (~x)) : nothing) + +("2_3_54", +@rule ∫(((~F)^((~!e)*((~!c) + (~!d)*(~x))))^ (~!n)*((~a) + (~!b)*((~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!n))^(~!p),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) ? +1⨸((~d)*(~e)*(~n)*log((~F)))* int_and_subst(((~a) + (~b)*(~x))^(~p), (~x), (~x), ((~F)^((~e)*((~c) + (~d)*(~x))))^(~n), "2_3_54") : nothing) + +("2_3_55", +@rule ∫(((~G)^((~!h)*((~!f) + (~!g)*(~x))))^ (~!m)*((~a) + (~!b)*((~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!n))^(~!p),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~x)) && + eq((~d)*(~e)*(~n)*log((~F)), (~g)*(~h)*(~m)*log((~G))) ? +((~G)^((~h)*((~f) + (~g)*(~x))))^(~m)⨸((~F)^((~e)*((~c) + (~d)*(~x))))^(~n)* ∫(((~F)^((~e)*((~c) + (~d)*(~x))))^(~n)*((~a) + (~b)*((~F)^((~e)*((~c) + (~d)*(~x))))^(~n))^(~p), (~x)) : nothing) + +("2_3_56", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!p),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~x)) && + le(simplify((~g)*(~h)*log((~G))/((~d)*(~e)*log((~F)))), -1) || + ge(simplify((~g)*(~h)*log((~G))/((~d)*(~e)*log((~F)))), 1) ? +ext_den(simplify((~g)*(~h)*log((~G))⨸((~d)*(~e)*log((~F)))))*(~G)^((~f)*(~h) - (~c)*(~g)*(~h)⨸(~d))⨸((~d)*(~e)*log((~F)))* int_and_subst((~x)^(ext_num(simplify((~g)*(~h)*log((~G))⨸((~d)*(~e)*log((~F))))) - 1)*((~a) + (~b)*(~x)^ext_den(simplify((~g)*(~h)*log((~G))⨸((~d)*(~e)*log((~F))))))^(~p), (~x), (~x), (~F)^((~e)*((~c) + (~d)*(~x))⨸ext_den(simplify((~g)*(~h)*log((~G))⨸((~d)*(~e)*log((~F)))))), "2_3_56") : nothing) + +("2_3_57", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!p),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~x)) && + lt(simplify((~d)*(~e)*log((~F))/((~g)*(~h)*log((~G)))), -1) || + gt(simplify((~d)*(~e)*log((~F))/((~g)*(~h)*log((~G)))), 1) ? +ext_den(simplify((~d)*(~e)*log((~F))⨸((~g)*(~h)*log((~G)))))⨸((~g)*(~h)*log((~G)))* int_and_subst( (~x)^(ext_den(simplify((~d)*(~e)*log((~F))⨸((~g)*(~h)*log((~G))))) - 1)*((~a) + (~b)*(~F)^((~c)*(~e) - (~d)*(~e)*(~f)⨸(~g))*(~x)^ext_num(simplify((~d)*(~e)*log((~F))⨸((~g)*(~h)*log((~G))))))^(~p), (~x), (~x), (~G)^((~h)*((~f) + (~g)*(~x))⨸ext_den(simplify((~d)*(~e)*log((~F))⨸((~g)*(~h)*log((~G)))))), "2_3_57") : nothing) + +("2_3_58", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!p),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + igt((~p), 0) ? +∫(ext_expand((~G)^((~h)*((~f) + (~g)*(~x)))*((~a) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^(~p), (~x)), (~x)) : nothing) + +("2_3_59", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~p),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~x)) && + ( + ilt((~p), 0) || + gt((~a), 0) + ) ? +(~a)^(~p)*(~G)^((~h)*((~f) + (~g)*(~x)))⨸((~g)*(~h)*log((~G)))* hypergeometric2f1(-(~p), (~g)*(~h)*log((~G))⨸((~d)*(~e)*log((~F))), (~g)*(~h)*log((~G))⨸((~d)*(~e)*log((~F))) + 1, simplify(-(~b)⨸(~a)*(~F)^((~e)*((~c) + (~d)*(~x))))) : nothing) + +("2_3_60", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~p),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~x)) && + !( + ilt((~p), 0) || + gt((~a), 0) + ) ? +((~a) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^(~p)⨸(1 + ((~b)⨸(~a))*(~F)^((~e)*((~c) + (~d)*(~x))))^(~p)* ∫((~G)^((~h)*((~f) + (~g)*(~x)))*(1 + (~b)⨸(~a)*(~F)^((~e)*((~c) + (~d)*(~x))))^(~p), (~x)) : nothing) + +("2_3_61", +@rule ∫((~G)^((~!h)*(~u))*((~a) + (~!b)*(~F)^((~!e)*(~v)))^(~p),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~e), (~h), (~p), (~x)) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫((~G)^((~h)*expand_to_sum((~u), (~x)))*((~a) + (~b)*(~F)^((~e)*expand_to_sum((~v), (~x))))^(~p), (~x)) : nothing) + +#(* Int[(c_.+d_.*x_)^m_.*F_^(g_.*(e_.+f_.*x_))/(a_+b_.*F_^(h_.*(e_.+f_. *x_))),x_Symbol] := 1/b*Int[(c+d*x)^m*F^((g-h)*(e+f*x)),x] - a/b*Int[(c+d*x)^m*F^((g-h)*(e+f*x))/(a+b*F^(h*(e+f*x))),x] /; FreeQ[{F,a,b,c,d,e,f,g,h,m},x] && LeQ[0,g/h-1,g/h] *) +#(* Int[(c_.+d_.*x_)^m_.*F_^(g_.*(e_.+f_.*x_))/(a_+b_.*F_^(h_.*(e_.+f_. *x_))),x_Symbol] := 1/a*Int[(c+d*x)^m*F^(g*(e+f*x)),x] - b/a*Int[(c+d*x)^m*F^((g+h)*(e+f*x))/(a+b*F^(h*(e+f*x))),x] /; FreeQ[{F,a,b,c,d,e,f,g,h,m},x] && LeQ[g/h,g/h+1,0] *) +("2_3_62", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*((~!a) + (~!b)*(~F)^(~u))^(~!p)*((~!c) + (~!d)*(~F)^(~v))^(~!q),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~p), (~q)) && + linear((~u), (~v), (~x)) && + isrational(simplify((~u)/(~v))) && + issum(ext_expand(((~e) + (~f)*(~x))^(~m), ((~a) + (~b)*(~F)^(~u))^(~p)*((~c) + (~d)*(~F)^(~v))^(~q), (~x))) ? +∫(ext_expand(((~e) + (~f)*(~x))^(~m), ((~a) + (~b)*(~F)^(~u))^(~p)*((~c) + (~d)*(~F)^(~v))^(~q), (~x)), (~x)) : nothing) + +("2_3_63", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))* (~H)^((~!t)*((~!r) + (~!s)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!p),(~x)) => + !contains_var((~F), (~G), (~H), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~r), (~s), (~t), (~p), (~x)) && + isrational(simplify(((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))/((~d)*(~e)*log((~F))))) ? +ext_den(simplify(((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)*log((~F)))))*(~G)^((~f)*(~h) - (~c)*(~g)*(~h)⨸(~d))*(~H)^((~r)*(~t) - (~c)*(~s)*(~t)⨸(~d))⨸((~d)*(~e)*log((~F)))* int_and_subst((~x)^(ext_num(simplify(((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)*log((~F))))) - 1)*((~a) + (~b)*(~x)^ext_den(simplify(((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)*log((~F))))))^(~p), (~x), (~x), (~F)^((~e)*((~c) + (~d)*(~x))⨸ext_den(simplify(((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)*log((~F)))))), "2_3_63") : nothing) + +("2_3_64", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))* (~H)^((~!t)*((~!r) + (~!s)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!p),(~x)) => + !contains_var((~F), (~G), (~H), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~r), (~s), (~t), (~x)) && + eq((~d)*(~e)*(~p)*log((~F)) + (~g)*(~h)*log((~G)), 0) && + ext_isinteger((~p)) ? +(~G)^(((~f) - (~c)*(~g)⨸(~d))*(~h))* ∫((~H)^((~t)*((~r) + (~s)*(~x)))*((~b) + (~a)*(~F)^(-(~e)*((~c) + (~d)*(~x))))^(~p), (~x)) : nothing) + +("2_3_65", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))* (~H)^((~!t)*((~!r) + (~!s)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!p),(~x)) => + !contains_var((~F), (~G), (~H), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~r), (~s), (~t), (~x)) && + igt((~p), 0) ? +∫(ext_expand( (~G)^((~h)*((~f) + (~g)*(~x)))*(~H)^((~t)*((~r) + (~s)*(~x)))*((~a) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^(~p), (~x)), (~x)) : nothing) + +("2_3_66", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))* (~H)^((~!t)*((~!r) + (~!s)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~p),(~x)) => + !contains_var((~F), (~G), (~H), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~r), (~s), (~t), (~x)) && + ilt((~p), 0) ? +(~a)^(~p)*(~G)^((~h)*((~f) + (~g)*(~x)))*(~H)^((~t)*((~r) + (~s)*(~x)))⨸((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))* hypergeometric2f1(-(~p), ((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)* log((~F))), ((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)*log((~F))) + 1, simplify(-(~b)⨸(~a)*(~F)^((~e)*((~c) + (~d)*(~x))))) : nothing) + +("2_3_67", +@rule ∫((~G)^((~!h)*((~!f) + (~!g)*(~x)))* (~H)^((~!t)*((~!r) + (~!s)*(~x)))*((~a) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~p),(~x)) => + !contains_var((~F), (~G), (~H), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~r), (~s), (~t), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~G)^((~h)*((~f) + (~g)*(~x)))* (~H)^((~t)*((~r) + (~s)*(~x)))*((~a) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^ (~p)⨸(((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))*(((~a) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))⨸(~a))^(~p))* hypergeometric2f1(-(~p), ((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)* log((~F))), ((~g)*(~h)*log((~G)) + (~s)*(~t)*log((~H)))⨸((~d)*(~e)*log((~F))) + 1, simplify(-(~b)⨸(~a)*(~F)^((~e)*((~c) + (~d)*(~x))))) : nothing) + +("2_3_68", +@rule ∫((~G)^((~!h)*(~u))*(~H)^((~!t)*(~w))*((~a) + (~!b)*(~F)^((~!e)*(~v)))^(~p),(~x)) => + !contains_var((~F), (~G), (~H), (~a), (~b), (~e), (~h), (~t), (~p), (~x)) && + linear((~u), (~v), (~w), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~x))) ? +∫((~G)^((~h)*expand_to_sum((~u), (~x)))* (~H)^((~t)*expand_to_sum((~w), (~x)))*((~a) + (~b)*(~F)^((~e)*expand_to_sum((~v), (~x))))^(~p), (~x)) : nothing) + +("2_3_69", +@rule ∫((~F)^((~!e)*((~!c) + (~!d)*(~x)))*((~!a)*(~x)^(~!n) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!p),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + !eq((~p), -1) ? +((~a)*(~x)^(~n) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^((~p) + 1)⨸((~b)*(~d)*(~e)*((~p) + 1)*log((~F))) - (~a)*(~n)⨸((~b)*(~d)*(~e)*log((~F)))* ∫((~x)^((~n) - 1)*((~a)*(~x)^(~n) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^(~p), (~x)) : nothing) + +("2_3_70", +@rule ∫((~x)^(~!m)* (~F)^((~!e)*((~!c) + (~!d)*(~x)))*((~!a)*(~x)^(~!n) + (~!b)*(~F)^((~!e)*((~!c) + (~!d)*(~x))))^ (~!p),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~p), -1) ? +(~x)^(~m)*((~a)*(~x)^(~n) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^((~p) + 1)⨸((~b)*(~d)*(~e)*((~p) + 1)*log((~F))) - (~a)*(~n)⨸((~b)*(~d)*(~e)*log((~F)))* ∫((~x)^((~m) + (~n) - 1)*((~a)*(~x)^(~n) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^(~p), (~x)) - (~m)⨸((~b)*(~d)*(~e)*((~p) + 1)*log((~F)))* ∫((~x)^((~m) - 1)*((~a)*(~x)^(~n) + (~b)*(~F)^((~e)*((~c) + (~d)*(~x))))^((~p) + 1), (~x)) : nothing) + +("2_3_71", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)/((~!a) + (~!b)*(~F)^(~u) + (~!c)*(~F)^(~v)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~f), (~g), (~x)) && + eq((~v), 2*(~u)) && + linear((~u), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~m), 0) ? +2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~f) + (~g)*(~x))^(~m)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~F)^(~u)), (~x)) - 2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~f) + (~g)*(~x))^(~m)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~F)^(~u)), (~x)) : nothing) + +("2_3_72", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*(~F)^(~u)/((~!a) + (~!b)*(~F)^(~u) + (~!c)*(~F)^(~v)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~f), (~g), (~x)) && + eq((~v), 2*(~u)) && + linear((~u), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~m), 0) ? +2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~f) + (~g)*(~x))^(~m)*(~F)^(~u)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~F)^(~u)), (~x)) - 2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(((~f) + (~g)*(~x))^(~m)*(~F)^(~u)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~F)^(~u)), (~x)) : nothing) + +("2_3_73", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~h) + (~!i)*(~F)^(~u))/((~!a) + (~!b)*(~F)^(~u) + (~!c)*(~F)^(~v)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~f), (~g), (~h), (~i), (~x)) && + eq((~v), 2*(~u)) && + linear((~u), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + igt((~m), 0) ? +(simplify((2*(~c)*(~h) - (~b)*(~i))⨸rt((~b)^2 - 4*(~a)*(~c), 2)) + (~i))* ∫(((~f) + (~g)*(~x))^(~m)⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~F)^(~u)), (~x)) - (simplify((2*(~c)*(~h) - (~b)*(~i))⨸rt((~b)^2 - 4*(~a)*(~c), 2)) - (~i))* ∫(((~f) + (~g)*(~x))^(~m)⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*(~F)^(~u)), (~x)) : nothing) + +("2_3_74", +@rule ∫((~x)^(~!m)/((~!a)*(~F)^((~!c) + (~!d)*(~x)) + (~!b)*(~F)^(~v)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~x)) && + eq((~v), -((~c) + (~d)*(~x))) && + gt((~m), 0) ? +(~x)^(~m)*∫(1⨸((~a)*(~F)^((~c) + (~d)*(~x)) + (~b)*(~F)^(~v)), (~x)) - (~m)*∫((~x)^((~m) - 1)*∫(1⨸((~a)*(~F)^((~c) + (~d)*(~x)) + (~b)*(~F)^(~v)), (~x)), (~x)) : nothing) + +("2_3_75", +@rule ∫((~u)/((~a) + (~!b)*(~F)^(~v) + (~!c)*(~F)^(~w)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~x)) && + eq((~w), -(~v)) && + linear((~v), (~x)) && + ifelse(isrational(ext_coeff((~v), (~x), 1)), gt(ext_coeff((~v), (~x), 1), 0), lt(SymbolicUtils.node_count((~v)), SymbolicUtils.node_count((~w)))) ? +∫((~u)*(~F)^(~v)⨸((~c) + (~a)*(~F)^(~v) + (~b)*(~F)^(2*(~v))), (~x)) : nothing) + +("2_3_76", +@rule ∫((~F)^((~!g)*((~!d) + (~!e)*(~x))^(~!n))/((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~g), (~n), (~x)) ? +∫(ext_expand((~F)^((~g)*((~d) + (~e)*(~x))^(~n)), 1⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("2_3_77", +@rule ∫((~F)^((~!g)*((~!d) + (~!e)*(~x))^(~!n))/((~a) + (~!c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~c), (~d), (~e), (~g), (~n), (~x)) ? +∫(ext_expand((~F)^((~g)*((~d) + (~e)*(~x))^(~n)), 1⨸((~a) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("2_3_78", +@rule ∫((~u)^(~!m)*(~F)^((~!g)*((~!d) + (~!e)*(~x))^(~!n))/((~!a) + (~!b)*(~x) + (~c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~g), (~n), (~x)) && + poly((~u), (~x)) && + ext_isinteger((~m)) ? +∫(ext_expand((~F)^((~g)*((~d) + (~e)*(~x))^(~n)), (~u)^(~m)⨸((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("2_3_79", +@rule ∫((~u)^(~!m)*(~F)^((~!g)*((~!d) + (~!e)*(~x))^(~!n))/((~a) + (~c)*(~x)^2),(~x)) => + !contains_var((~F), (~a), (~c), (~d), (~e), (~g), (~n), (~x)) && + poly((~u), (~x)) && + ext_isinteger((~m)) ? +∫(ext_expand((~F)^((~g)*((~d) + (~e)*(~x))^(~n)), (~u)^(~m)⨸((~a) + (~c)*(~x)^2), (~x)), (~x)) : nothing) + +("2_3_80", +@rule ∫((~F)^(((~!a) + (~!b)*(~x)^4)/(~x)^2),(~x)) => + !contains_var((~F), (~a), (~b), (~x)) ? +sqrt(π)*exp(2*sqrt(-(~a)*log((~F)))*sqrt(-(~b)*log((~F))))* SymbolicUtils.erf((sqrt(-(~a)*log((~F))) + sqrt(-(~b)*log((~F)))*(~x)^2)⨸(~x))⨸ (4*sqrt(-(~b)*log((~F)))) - sqrt(π)*exp(-2*sqrt(-(~a)*log((~F)))*sqrt(-(~b)*log((~F))))* SymbolicUtils.erf((sqrt(-(~a)*log((~F))) - sqrt(-(~b)*log((~F)))*(~x)^2)⨸(~x))⨸ (4*sqrt(-(~b)*log((~F)))) : nothing) + +("2_3_81", +@rule ∫((~x)^(~!m)*(E^(~x) + (~x)^(~!m))^(~n),(~x)) => + isrational((~m), (~n)) && + gt((~m), 0) && + lt((~n), 0) && + !eq((~n), -1) ? +-(ℯ^(~x) + (~x)^(~m))^((~n) + 1)⨸((~n) + 1) + ∫((ℯ^(~x) + (~x)^(~m))^((~n) + 1), (~x)) + (~m)*∫((~x)^((~m) - 1)*(ℯ^(~x) + (~x)^(~m))^(~n), (~x)) : nothing) + +("2_3_82", +@rule ∫((~!u)*(~F)^((~!a)*((~!v) + (~!b)*log((~z)))),(~x)) => + !contains_var((~F), (~a), (~b), (~x)) ? +∫((~u)*(~F)^((~a)*(~v))*(~z)^((~a)*(~b)*log((~F))), (~x)) : nothing) + +("2_3_83", +@rule ∫((~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n))^2)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) ? +((~d) + (~e)*(~x))⨸((~e)*(~n)*((~c)*((~d) + (~e)*(~x))^(~n))^(1⨸(~n)))* int_and_subst(ℯ^((~a)*(~f)*log((~F)) + (~x)⨸(~n) + (~b)*(~f)*log((~F))*(~x)^2), (~x), (~x), log((~c)*((~d) + (~e)*(~x))^(~n)), "2_3_83") : nothing) + +("2_3_84", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)* (~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n))^2)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e)*(~g) - (~d)*(~h), 0) ? +((~g) + (~h)*(~x))^((~m) + 1)⨸((~h)*(~n)*((~c)*((~d) + (~e)*(~x))^(~n))^(((~m) + 1)⨸(~n)))* int_and_subst(ℯ^((~a)*(~f)*log((~F)) + (((~m) + 1)*(~x))⨸(~n) + (~b)*(~f)*log((~F))*(~x)^2), (~x), (~x), log((~c)*((~d) + (~e)*(~x))^(~n)), "2_3_84") : nothing) + +("2_3_85", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)* (~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n))^2)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~x)) && + igt((~m), 0) ? +1⨸(~e)^((~m) + 1)* int_and_subst( ext_expand((~F)^((~f)*((~a) + (~b)*log((~c)*(~x)^(~n))^2)), ((~e)*(~g) - (~d)*(~h) + (~h)*(~x))^(~m), (~x)), (~x), (~x), (~d) + (~e)*(~x), "2_3_85") : nothing) + +# ("2_3_86", +# @rule ∫(((~!g) + (~!h)*(~x))^(~!m)* (~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n))^2)),(~x)) => +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) ? +# Unintegrable[((~g) + (~h)*(~x))^(~m)*(~F)^((~f)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))^2)), (~x)] : nothing) + +("2_3_87", +@rule ∫((~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n)))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + ext_isinteger(2*(~a)*(~b)*(~f)*log((~F))) ? +(~c)^(2*(~a)*(~b)*(~f)*log((~F)))* ∫(((~d) + (~e)*(~x))^(2*(~a)*(~b)*(~f)*(~n)*log((~F)))* (~F)^((~a)^2*(~f) + (~b)^2*(~f)*log((~c)*((~d) + (~e)*(~x))^(~n))^2), (~x)) : nothing) + +("2_3_88", +@rule ∫((~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n)))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !(ext_isinteger(2*(~a)*(~b)*(~f)*log((~F)))) ? +((~c)*((~d) + (~e)*(~x))^(~n))^(2*(~a)*(~b)*(~f)*log((~F)))⨸((~d) + (~e)*(~x))^(2*(~a)*(~b)*(~f)*(~n)*log((~F)))* ∫(((~d) + (~e)*(~x))^(2*(~a)*(~b)*(~f)*(~n)*log((~F)))* (~F)^((~a)^2*(~f) + (~b)^2*(~f)*log((~c)*((~d) + (~e)*(~x))^(~n))^2), (~x)) : nothing) + +("2_3_89", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)* (~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n)))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e)*(~g) - (~d)*(~h), 0) && + ext_isinteger(2*(~a)*(~b)*(~f)*log((~F))) && + ( + ext_isinteger((~m)) || + eq((~h), (~e)) + ) ? +(~h)^(~m)*(~c)^(2*(~a)*(~b)*(~f)*log((~F)))⨸(~e)^(~m)* ∫(((~d) + (~e)*(~x))^((~m) + 2*(~a)*(~b)*(~f)*(~n)*log((~F)))* (~F)^((~a)^2*(~f) + (~b)^2*(~f)*log((~c)*((~d) + (~e)*(~x))^(~n))^2), (~x)) : nothing) + +("2_3_90", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)* (~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n)))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e)*(~g) - (~d)*(~h), 0) ? +((~g) + (~h)*(~x))^ (~m)*((~c)*((~d) + (~e)*(~x))^(~n))^(2*(~a)*(~b)*(~f)*log((~F)))⨸((~d) + (~e)*(~x))^((~m) + 2*(~a)*(~b)*(~f)*(~n)*log((~F)))* ∫(((~d) + (~e)*(~x))^((~m) + 2*(~a)*(~b)*(~f)*(~n)*log((~F)))* (~F)^((~a)^2*(~f) + (~b)^2*(~f)*log((~c)*((~d) + (~e)*(~x))^(~n))^2), (~x)) : nothing) + +("2_3_91", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)* (~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n)))^2),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~x)) && + igt((~m), 0) ? +1⨸(~e)^((~m) + 1)* int_and_subst( ext_expand((~F)^((~f)*((~a) + (~b)*log((~c)*(~x)^(~n)))^2), ((~e)*(~g) - (~d)*(~h) + (~h)*(~x))^(~m), (~x)), (~x), (~x), (~d) + (~e)*(~x), "2_3_91") : nothing) + +# ("2_3_92", +# @rule ∫(((~!g) + (~!h)*(~x))^(~!m)* (~F)^((~!f)*((~!a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n)))^2),(~x)) => +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) ? +# Unintegrable[((~g) + (~h)*(~x))^(~m)*(~F)^((~f)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^2), (~x)] : nothing) + +("2_3_93", +@rule ∫(log((~a) + (~!b)*((~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + gt((~a), 0) ? +1⨸((~d)*(~e)*(~n)*log((~F)))* int_and_subst(log((~a) + (~b)*(~x))⨸(~x), (~x), (~x), ((~F)^((~e)*((~c) + (~d)*(~x))))^(~n), "2_3_93") : nothing) + +("2_3_94", +@rule ∫(log((~a) + (~!b)*((~F)^((~!e)*((~!c) + (~!d)*(~x))))^(~!n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + !(gt((~a), 0)) ? +(~x)*log((~a) + (~b)*((~F)^((~e)*((~c) + (~d)*(~x))))^(~n)) - (~b)*(~d)*(~e)*(~n)*log((~F))* ∫((~x)*((~F)^((~e)*((~c) + (~d)*(~x))))^(~n)⨸((~a) + (~b)*((~F)^((~e)*((~c) + (~d)*(~x))))^(~n)), (~x)) : nothing) + +#(* Int[u_.*(a_.*F_^v_)^n_,x_Symbol] := a^n*Int[u*F^(n*v),x] /; FreeQ[{F,a},x] && IntegerQ[n] *) +("2_3_95", +@rule ∫((~!u)*((~!a)*(~F)^(~v))^(~n),(~x)) => + !contains_var((~F), (~a), (~n), (~x)) && + !(ext_isinteger((~n))) ? +((~a)*(~F)^(~v))^(~n)⨸(~F)^((~n)*(~v))*∫((~u)*(~F)^((~n)*(~v)), (~x)) : nothing) + +# ("2_3_96", +# @rule ∫((~u),(~x)) => +# FunctionOfExponential[(~u), (~x)]⨸Symbolics.derivative(FunctionOfExponential[(~u), (~x)], (~x))* int_and_subst(FunctionOfExponentialFunction[(~u), (~x)]⨸(~x), (~x), (~x), FunctionOfExponential[(~u), (~x)], "2_3_96")]⨸; FreeQ[{(~a), (~b), (~c)}, (~x)] && InverseFunctionQ[(~F)[(~x)]]]] && FunctionOfExponentialQ[(~u), (~x)] && Not[ MatchQ[(~u), w_*(a_.*v_^n_)^m_ ⨸; FreeQ[{(~a), (~m), (~n)}, (~x)] && IntegerQ[(~m)*(~n)]]] && Not[ MatchQ[(~u), ℯ^(c_.*(a_. + b_.*(~x)))*F_[v_) + +("2_3_97", +@rule ∫((~!u)*((~!a)*(~F)^(~v) + (~!b)*(~F)^(~w))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~n), (~x)) && + ilt((~n), 0) && + linear((~v), (~w), (~x)) ? +∫((~u)*(~F)^((~n)*(~v))*((~a) + (~b)*(~F)^expand_to_sum((~w) - (~v), (~x)))^(~n), (~x)) : nothing) + +("2_3_98", +@rule ∫((~!u)*((~!a)*(~F)^(~v) + (~!b)*(~G)^(~w))^(~n),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~n), (~x)) && + ilt((~n), 0) && + linear((~v), (~w), (~x)) ? +∫((~u)*(~F)^((~n)*(~v))*((~a) + (~b)*ℯ^expand_to_sum(log((~G))*(~w) - log((~F))*(~v), (~x)))^(~n), (~x)) : nothing) + +("2_3_99", +@rule ∫((~!u)*((~!a)*(~F)^(~v) + (~!b)*(~F)^(~w))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~n), (~x)) && + !(ext_isinteger((~n))) && + linear((~v), (~w), (~x)) ? +((~a)*(~F)^(~v) + (~b)*(~F)^(~w))^(~n)⨸((~F)^((~n)*(~v))*((~a) + (~b)*(~F)^expand_to_sum((~w) - (~v), (~x)))^(~n))* ∫((~u)*(~F)^((~n)*(~v))*((~a) + (~b)*(~F)^expand_to_sum((~w) - (~v), (~x)))^(~n), (~x)) : nothing) + +("2_3_100", +@rule ∫((~!u)*((~!a)*(~F)^(~v) + (~!b)*(~G)^(~w))^(~n),(~x)) => + !contains_var((~F), (~G), (~a), (~b), (~n), (~x)) && + !(ext_isinteger((~n))) && + linear((~v), (~w), (~x)) ? +((~a)*(~F)^(~v) + (~b)*(~G)^(~w))^ (~n)⨸((~F)^((~n)*(~v))*((~a) + (~b)*ℯ^expand_to_sum(log((~G))*(~w) - log((~F))*(~v), (~x)))^(~n))* ∫((~u)*(~F)^((~n)*(~v))*((~a) + (~b)*ℯ^expand_to_sum(log((~G))*(~w) - log((~F))*(~v), (~x)))^(~n), (~x)) : nothing) + +# ("2_3_101", +# @rule ∫((~!u)*(~F)^(~v)*(~G)^(~w),(~x)) => +# !contains_var((~F), (~G), (~x)) && +# isbinomial((~v)*log((~F)) + (~w)*log((~G)), (~x)) || +# poly((~v)*log((~F)) + (~w)*log((~G)), (~x)) && +# le(Exponent[(~v)*log((~F)) + (~w)*log((~G)), (~x)], 2) ? +# ∫((~u)*NormalizeIntegrand[ℯ^(~v)*log((~F)) + (~w)*log((~G)), (~x)], (~x)) : nothing) + +("2_3_102", +@rule ∫((~F)^(~u)*((~v) + (~w))*(~!y),(~x)) => + !contains_var((~F), (~x)) && + eq(Symbolics.derivative((~v)*(~y)/(log((~F))*Symbolics.derivative((~u), (~x))), (~x)), (~w)*(~y)) ? +(~F)^(~u)*(~v)*(~y)⨸(log((~F))*Symbolics.derivative((~u), (~x))) : nothing) + +# ("2_3_103", +# @rule ∫((~F)^(~u)*(~v)^(~!n)*(~w),(~x)) => +# !contains_var((~F), (~n), (~x)) && +# poly((~u), (~x)) && +# poly((~v), (~x)) && +# poly((~w), (~x)) && +# eq(Exponent[(~w), (~x)], Exponent[log((~F))*(~v)*Symbolics.derivative((~u), (~x)) + ((~n) + 1)*Symbolics.derivative((~v), (~x)), (~x)]) && +# eq((~w)*ext_coeff(log((~F))*(~v)*Symbolics.derivative((~u), (~x)) + ((~n) + 1)*Symbolics.derivative((~v), (~x)), (~x), Exponent[log((~F))*(~v)*Symbolics.derivative((~u), (~x)) + ((~n) + 1)*Symbolics.derivative((~v), (~x)), (~x)]), log((~F))*(~v)*Symbolics.derivative((~u), (~x)) + ((~n) + 1)*Symbolics.derivative((~v), (~x))*ext_coeff((~w), (~x), Exponent[(~w), (~x)])) ? +# ext_coeff((~w), (~x), Exponent[(~w), (~x)])⨸ ext_coeff(log((~F))*(~v)*Symbolics.derivative((~u), (~x)) + ((~n) + 1)*Symbolics.derivative((~v), (~x)), (~x), Exponent[log((~F))*(~v)*Symbolics.derivative((~u), (~x)) + ((~n) + 1)*Symbolics.derivative((~v), (~x)), (~x)])*(~F)^(~u)*(~v)^((~n) + 1) : nothing) + +("2_3_104", +@rule ∫(((~!a) + (~!b)*(~F)^((~!c)*sqrt((~!d) + (~!e)*(~x))/sqrt((~!f) + (~!g)*(~x))))^ (~!n)/((~!A) + (~!B)*(~x) + (~!C)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~C), (~F), (~x)) && + eq((~C)*(~d)*(~f) - (~A)*(~e)*(~g), 0) && + eq((~B)*(~e)*(~g) - (~C)*((~e)*(~f) + (~d)*(~g)), 0) && + igt((~n), 0) ? +2*(~e)*(~g)⨸((~C)*((~e)*(~f) - (~d)*(~g)))* int_and_subst(((~a) + (~b)*(~F)^((~c)*(~x)))^(~n)⨸(~x), (~x), (~x), sqrt((~d) + (~e)*(~x))⨸sqrt((~f) + (~g)*(~x)), "2_3_104") : nothing) + +("2_3_105", +@rule ∫(((~!a) + (~!b)*(~F)^((~!c)*sqrt((~!d) + (~!e)*(~x))/sqrt((~!f) + (~!g)*(~x))))^ (~!n)/((~A) + (~!C)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~C), (~F), (~x)) && + eq((~C)*(~d)*(~f) - (~A)*(~e)*(~g), 0) && + eq((~e)*(~f) + (~d)*(~g), 0) && + igt((~n), 0) ? +2*(~e)*(~g)⨸((~C)*((~e)*(~f) - (~d)*(~g)))* int_and_subst(((~a) + (~b)*(~F)^((~c)*(~x)))^(~n)⨸(~x), (~x), (~x), sqrt((~d) + (~e)*(~x))⨸sqrt((~f) + (~g)*(~x)), "2_3_105") : nothing) + +# ("2_3_106", +# @rule ∫(((~!a) + (~!b)*(~F)^((~!c)*sqrt((~!d) + (~!e)*(~x))/sqrt((~!f) + (~!g)*(~x))))^ (~n)/((~!A) + (~!B)*(~x) + (~!C)*(~x)^2),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~C), (~F), (~n), (~x)) && +# eq((~C)*(~d)*(~f) - (~A)*(~e)*(~g), 0) && +# eq((~B)*(~e)*(~g) - (~C)*((~e)*(~f) + (~d)*(~g)), 0) && +# !(igt((~n), 0)) ? +# Unintegrable[((~a) + (~b)*(~F)^((~c)*sqrt((~d) + (~e)*(~x))⨸sqrt((~f) + (~g)*(~x))))^ (~n)⨸((~A) + (~B)*(~x) + (~C)*(~x)^2), (~x)] : nothing) + +# ("2_3_107", +# @rule ∫(((~!a) + (~!b)*(~F)^((~!c)*sqrt((~!d) + (~!e)*(~x))/sqrt((~!f) + (~!g)*(~x))))^ (~n)/((~A) + (~!C)*(~x)^2),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~C), (~F), (~n), (~x)) && +# eq((~C)*(~d)*(~f) - (~A)*(~e)*(~g), 0) && +# eq((~e)*(~f) + (~d)*(~g), 0) && +# !(igt((~n), 0)) ? +# Unintegrable[((~a) + (~b)*(~F)^((~c)*sqrt((~d) + (~e)*(~x))⨸sqrt((~f) + (~g)*(~x))))^ (~n)⨸((~A) + (~C)*(~x)^2), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.1 (a+b log(c x^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.1 (a+b log(c x^n))^p.jl new file mode 100644 index 0000000..e0bbf1c --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.1 (a+b log(c x^n))^p.jl @@ -0,0 +1,40 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.1.1 (a+b log(c x^n))^p *) +("3_1_1_1", +@rule ∫(log((~!c)*(~x)^(~!n)),(~x)) => + !contains_var((~c), (~n), (~x)) ? +(~x)*log((~c)*(~x)^(~n)) - (~n)*(~x) : nothing) + +("3_1_1_2", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + gt((~p), 0) && + ext_isinteger(2*(~p)) ? +(~x)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p) - (~b)*(~n)*(~p)*∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1), (~x)) : nothing) + +("3_1_1_3", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + lt((~p), -1) && + ext_isinteger(2*(~p)) ? +(~x)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - 1⨸((~b)*(~n)*((~p) + 1))*∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1), (~x)) : nothing) + +("3_1_1_4", +@rule ∫(1/log((~!c)*(~x)),(~x)) => + !contains_var((~c), (~x)) ? +SymbolicUtils.expinti(log((~c)*(~x)))⨸(~c) : nothing) + +("3_1_1_5", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + ext_isinteger(1/(~n)) ? +1⨸((~n)*(~c)^(1⨸(~n)))*int_and_subst(ℯ^((~x)⨸(~n))*((~a) + (~b)*(~x))^(~p), (~x), (~x), log((~c)*(~x)^(~n)), "3_1_1_5") : nothing) + +("3_1_1_6", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) ? +(~x)⨸((~n)*((~c)*(~x)^(~n))^(1⨸(~n)))* int_and_subst(ℯ^((~x)⨸(~n))*((~a) + (~b)*(~x))^(~p), (~x), (~x), log((~c)*(~x)^(~n)), "3_1_1_6") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.2 (d x)^m (a+b log(c x^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.2 (d x)^m (a+b log(c x^n))^p.jl new file mode 100644 index 0000000..1781e57 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.2 (d x)^m (a+b log(c x^n))^p.jl @@ -0,0 +1,74 @@ +file_rules = [ +# (* ::Subsection::Closed:: *) +# (* 3.1.2 (d x)^m (a+b log(c x^n))^p *) +("3_1_2_1", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) ? +((~a) + (~b)*log((~c)*(~x)^(~n)))^2⨸(2*(~b)*(~n)) : nothing) + +("3_1_2_2", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) ? +1⨸((~b)*(~n))*int_and_subst((~x)^(~p), (~x), (~x), (~a) + (~b)*log((~c)*(~x)^(~n)), "3_1_2_2") : nothing) + +("3_1_2_3", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~m), -1) && + eq((~a)*((~m) + 1) - (~b)*(~n), 0) ? +(~b)*((~d)*(~x))^((~m) + 1)*log((~c)*(~x)^(~n))⨸((~d)*((~m) + 1)) : nothing) + +("3_1_2_4", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸((~d)*((~m) + 1)) - (~b)*(~n)*((~d)*(~x))^((~m) + 1)⨸((~d)*((~m) + 1)^2) : nothing) + +("3_1_2_5", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~m), -1) && + gt((~p), 0) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~d)*((~m) + 1)) - (~b)*(~n)*(~p)⨸((~m) + 1)*∫(((~d)*(~x))^(~m)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1), (~x)) : nothing) + +("3_1_2_6", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + !eq((~m), -1) && + lt((~p), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1)⨸((~b)*(~d)*(~n)*((~p) + 1)) - ((~m) + 1)⨸((~b)*(~n)*((~p) + 1))*∫(((~d)*(~x))^(~m)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1), (~x)) : nothing) + +("3_1_2_7", +@rule ∫((~x)^(~!m)/log((~!c)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~m), (~n), (~x)) && + eq((~m), (~n) - 1) ? +1⨸(~n)*int_and_subst(1⨸log((~c)*(~x)), (~x), (~x), (~x)^(~n), "3_1_2_7") : nothing) + +("3_1_2_8", +@rule ∫(((~d)*(~x))^(~!m)/log((~!c)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~m), (~n), (~x)) && + eq((~m), (~n) - 1) ? +((~d)*(~x))^(~m)⨸(~x)^(~m)*∫((~x)^(~m)⨸log((~c)*(~x)^(~n)), (~x)) : nothing) + +("3_1_2_9", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + ext_isinteger((~m)) ? +1⨸(~c)^((~m) + 1)*int_and_subst(ℯ^(((~m) + 1)*(~x))*((~a) + (~b)*(~x))^(~p), (~x), (~x), log((~c)*(~x)), "3_1_2_9") : nothing) + +("3_1_2_10", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) ? +((~d)*(~x))^((~m) + 1)⨸((~d)*(~n)*((~c)*(~x)^(~n))^(((~m) + 1)⨸(~n)))* int_and_subst(ℯ^(((~m) + 1)⨸(~n)*(~x))*((~a) + (~b)*(~x))^(~p), (~x), (~x), log((~c)*(~x)^(~n)), "3_1_2_10") : nothing) + +("3_1_2_11", +@rule ∫(((~!d)*(~x)^(~q))^(~m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~q), (~x)) ? +((~d)*(~x)^(~q))^(~m)⨸(~x)^((~m)*(~q))*∫((~x)^((~m)*(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_2_12", +@rule ∫(((~!d1)*(~x)^(~q1))^(~m1)*((~!d2)*(~x)^(~q2))^(~m2)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~d2), (~m1), (~m2), (~n), (~p), (~q1), (~q2), (~x)) ? +((~d1)*(~x)^(~q1))^(~m1)*((~d2)*(~x)^(~q2))^(~m2)⨸(~x)^((~m1)*(~q1) + (~m2)*(~q2))* ∫((~x)^((~m1)*(~q1) + (~m2)*(~q2))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.3 (d+e x^r)^q (a+b log(c x^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.3 (d+e x^r)^q (a+b log(c x^n))^p.jl new file mode 100644 index 0000000..460f972 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.3 (d+e x^r)^q (a+b log(c x^n))^p.jl @@ -0,0 +1,154 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.1.3 (d+e x^r)^q (a+b log(c x^n))^p *) +("3_1_3_1", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~q), 0) ? +∫(((~d) + (~e)*(~x)^(~r))^(~q), (~x))*((~a) + (~b)*log((~c)*(~x)^(~n))) - (~b)*(~n)*∫(simplify(∫(((~d) + (~e)*(~x)^(~r))^(~q), (~x))⨸(~x), (~x)), (~x)) : nothing) + +("3_1_3_2", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~q), 0) ? +dist(((~a) + (~b)*log((~c)*(~x)^(~n))), ∫(((~d) + (~e)*(~x)^(~r))^(~q), (~x))) - (~b)*(~n)*∫(simplify(∫(((~d) + (~e)*(~x)^(~r))^(~q), (~x))⨸(~x), (~x)), (~x)) : nothing) + +("3_1_3_3", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~q), (~r), (~x)) && + eq((~r)*((~q) + 1) + 1, 0) ? +(~x)*((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸(~d) - (~b)*(~n)⨸(~d)*∫(((~d) + (~e)*(~x)^(~r))^((~q) + 1), (~x)) : nothing) + +#(* Int[(a_.+b_.*Log[c_.*x_^n_.])^p_./(d_+e_.*x_^r_.),x_Symbol] := 1/e*Int[(a+b*Log[c*x^n])^p/x^r,x] - d/e*Int[(a+b*Log[c*x^n])^p/(x^r*(d+e*x^r)),x] /; FreeQ[{a,b,c,d,e,n,r},x] && IGtQ[p,0] && IGtQ[r,0] *) +("3_1_3_4", +@rule ∫(log((~!c)*(~x))/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~x)) && + eq((~e) + (~c)*(~d), 0) ? +-1⨸(~e)*PolyLog.reli(2, 1 - (~c)*(~x)) : nothing) + +("3_1_3_5", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)))/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt(-(~c)*(~d)/(~e), 0) ? +((~a) + (~b)*log(-(~c)*(~d)⨸(~e)))*log((~d) + (~e)*(~x))⨸(~e) + (~b)*∫(log(-(~e)*(~x)⨸(~d))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_1_3_6", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 0) ? +log(1 + (~e)*(~x)⨸(~d))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~e) - (~b)*(~n)*(~p)⨸(~e)*∫(log(1 + (~e)*(~x)⨸(~d))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_3_7", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~d) + (~!e)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + gt((~p), 0) ? +(~x)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~d)*((~d) + (~e)*(~x))) - (~b)*(~n)*(~p)⨸(~d)*∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_1_3_8", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~q), (~x)) && + gt((~p), 0) && + !eq((~q), -1) && + ( + eq((~p), 1) || + ext_isinteger(2*(~p), 2*(~q)) && + !(igt((~q), 0)) || + eq((~p), 2) && + !eq((~q), 1) + ) ? +((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~e)*((~q) + 1)) - (~b)*(~n)*(~p)⨸((~e)*((~q) + 1))* ∫((((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1))⨸(~x), (~x)) : nothing) + +("3_1_3_9", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + lt((~p), -1) && + gt((~q), 0) ? +(~x)*((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) + (~d)*(~q)⨸((~b)*(~n)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^((~q) - 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1), (~x)) - ((~q) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫(((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1), (~x)) : nothing) + +("3_1_3_10", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + gt((~q), 0) ? +(~x)*((~d) + (~e)*(~x)^2)^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸(2*(~q) + 1) - (~b)*(~n)⨸(2*(~q) + 1)*∫(((~d) + (~e)*(~x)^2)^(~q), (~x)) + 2*(~d)*(~q)⨸(2*(~q) + 1)*∫(((~d) + (~e)*(~x)^2)^((~q) - 1)*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_3_11", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/((~d) + (~!e)*(~x)^2)^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) ? +(~x)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸((~d)*sqrt((~d) + (~e)*(~x)^2)) - (~b)*(~n)⨸(~d)*∫(1⨸sqrt((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("3_1_3_12", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + lt((~q), -1) ? +-(~x)*((~d) + (~e)*(~x)^2)^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸(2*(~d)*((~q) + 1)) + (~b)*(~n)⨸(2*(~d)*((~q) + 1))*∫(((~d) + (~e)*(~x)^2)^((~q) + 1), (~x)) + (2*(~q) + 3)⨸(2*(~d)*((~q) + 1))* ∫(((~d) + (~e)*(~x)^2)^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_3_13", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) ? +∫(1⨸((~d) + (~e)*(~x)^2), (~x))*((~a) + (~b)*log((~c)*(~x)^(~n))) - (~b)*(~n)*∫(∫(1⨸((~d) + (~e)*(~x)^2), (~x))⨸(~x), (~x)) : nothing) + +("3_1_3_14", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + gt((~d), 0) && + pos((~e)) ? +asinh(rt((~e), 2)*(~x)⨸sqrt((~d)))*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸rt((~e), 2) - (~b)*(~n)⨸rt((~e), 2)*∫(asinh(rt((~e), 2)*(~x)⨸sqrt((~d)))⨸(~x), (~x)) : nothing) + +("3_1_3_15", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + gt((~d), 0) && + neg((~e)) ? +asin(rt(-(~e), 2)*(~x)⨸sqrt((~d)))*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸rt(-(~e), 2) - (~b)*(~n)⨸rt(-(~e), 2)*∫(asin(rt(-(~e), 2)*(~x)⨸sqrt((~d)))⨸(~x), (~x)) : nothing) + +("3_1_3_16", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + !(gt((~d), 0)) ? +sqrt(1 + (~e)⨸(~d)*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2)* ∫(((~a) + (~b)*log((~c)*(~x)^(~n)))⨸sqrt(1 + (~e)⨸(~d)*(~x)^2), (~x)) : nothing) + +("3_1_3_17", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/(sqrt((~d1) + (~!e1)*(~x))* sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + eq((~d2)*(~e1) + (~d1)*(~e2), 0) ? +sqrt(1 + (~e1)*(~e2)⨸((~d1)*(~d2))*(~x)^2)⨸(sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x)))* ∫(((~a) + (~b)*log((~c)*(~x)^(~n)))⨸sqrt(1 + (~e1)*(~e2)⨸((~d1)*(~d2))*(~x)^2), (~x)) : nothing) + +("3_1_3_18", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~q), (~r), (~x)) && + ext_isinteger(2*(~q)) && + ext_isinteger((~r)) && + eq((~r), 1) && + ext_isinteger((~q) - 1/2) || + eq((~r), 2) && + eq((~q), -1) || + !contains_inverse_function((~u), (~x)) ? +dist(((~a) + (~b)*log((~c)*(~x)^(~n))), ∫(((~d) + (~e)*(~x)^(~r))^(~q), (~x)), (~x)) - (~b)*(~n)*∫(simplify(∫(((~d) + (~e)*(~x)^(~r))^(~q), (~x))⨸(~x), (~x)), (~x)) : nothing) + +("3_1_3_19", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger((~q)) && + ( + gt((~q), 0) || + igt((~p), 0) && + ext_isinteger((~r)) + ) && + issum(ext_expand(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p),(~x))) ? +∫(ext_expand(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), ((~d) + (~e)*(~x)^(~r))^(~q), (~x)), (~x)) : nothing) + +# ("3_1_3_20", +# @rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x)^(~r))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) +# +# +("3_1_3_21", +@rule ∫((~u)^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~q), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.4 (f x)^m (d+e x^r)^q (a+b log(c x^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.4 (f x)^m (d+e x^r)^q (a+b log(c x^n))^p.jl new file mode 100644 index 0000000..682fa57 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.4 (f x)^m (d+e x^r)^q (a+b log(c x^n))^p.jl @@ -0,0 +1,237 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.1.4 (f x)^m (d+e x^r)^q (a+b log(c x^n))^p *) +("3_1_4_1", +@rule ∫((~x)^(~!m)*((~d) + (~e)/(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~m), (~q)) && + ext_isinteger((~q)) ? +∫(((~e) + (~d)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_4_2", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~q), 0) && + igt((~m), 0) ? +∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x))*((~a) + (~b)*log((~c)*(~x)^(~n))) - (~b)*(~n)*∫(ext_simplify(∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x))⨸(~x), (~x)), (~x)) : nothing) + +("3_1_4_3", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~q), 0) && + ext_isinteger((~m)) && + !( + eq((~q), 1) && + eq((~m), -1) + ) ? +dist(((~a) + (~b)*log((~c)*(~x)^(~n))), ∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x))) - (~b)*(~n)*∫(ext_simplify(∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x))⨸(~x), (~x)), (~x)) : nothing) + +("3_1_4_4", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m) + (~r)*((~q) + 1) + 1, 0) && + !eq((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸((~d)* (~f)*((~m) + 1)) - (~b)*(~n)⨸((~d)*((~m) + 1))*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^(~r))^((~q) + 1), (~x)) : nothing) + +("3_1_4_5", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + ( + ext_isinteger((~m)) || + gt((~f), 0) + ) && + eq((~r), (~n)) ? +(~f)^(~m)⨸(~n)*int_and_subst(((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "3_1_4_5") : nothing) + +("3_1_4_6", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~d) + (~!e)*(~x)^(~r)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + ( + ext_isinteger((~m)) || + gt((~f), 0) + ) && + !eq((~r), (~n)) ? +(~f)^(~m)*log(1 + (~e)*(~x)^(~r)⨸(~d))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~e)*(~r)) - (~b)*(~f)^(~m)*(~n)*(~p)⨸((~e)*(~r))* ∫(log(1 + (~e)*(~x)^(~r)⨸(~d))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_4_7", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + ( + ext_isinteger((~m)) || + gt((~f), 0) + ) && + !eq((~r), (~n)) && + !eq((~q), -1) ? +(~f)^(~m)*((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~e)*(~r)*((~q) + 1)) - (~b)*(~f)^(~m)*(~n)*(~p)⨸((~e)*(~r)*((~q) + 1))* ∫(((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_4_8", +@rule ∫(((~f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + !( + (ext_isinteger((~m)) || + gt((~f), 0)) + ) ? +((~f)*(~x))^(~m)⨸(~x)^(~m)*∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +#(* Int[x_^m_.*(a_.+b_.*Log[c_.*x_^n_.])^p_./(d_+e_.*x_^r_.),x_Symbol] := 1/e*Int[x^(m-r)*(a+b*Log[c*x^n])^p,x] - d/e*Int[(x^(m-r)*(a+b*Log[c*x^n])^p)/(d+e*x^r),x] /; FreeQ[{a,b,c,d,e,m,n,r},x] && IGtQ[p,0] && IGtQ[r,0] && IGeQ[m-r,0] *) +("3_1_4_9", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~n)))/((~x)*((~d) + (~!e)*(~x)^(~!r))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + ext_isinteger((~r)/(~n)) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*log((~c)*(~x)))⨸((~x)*((~d) + (~e)*(~x)^((~r)⨸(~n)))), (~x), (~x), (~x)^(~n), "3_1_4_9") : nothing) + +#(* Int[(a_.+b_.*Log[c_.*x_^n_.])^p_./(x_*(d_+e_.*x_)),x_Symbol] := 1/d*Int[(a+b*Log[c*x^n])^p/x,x] - e/d*Int[(a+b*Log[c*x^n])^p/(d+e*x),x] /; FreeQ[{a,b,c,d,e,n},x] && IGtQ[p,0] *) +#(* Int[(a_.+b_.*Log[c_.*x_^n_.])^p_./(x_*(d_+e_.*x_^r_.)),x_Symbol] := (r*Log[x]-Log[1+(e*x^r)/d])*(a+b*Log[c*x^n])^p/(d*r) - b*n*p/d*Int[Log[x]*(a+b*Log[c*x^n])^(p-1)/x,x] + b*n*p/(d*r)*Int[Log[1+(e*x^r)/d]*(a+b*Log[c*x^n])^(p-1)/x,x] /; FreeQ[{a,b,c,d,e,n,r},x] && IGtQ[p,0] *) +("3_1_4_10", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~x)*((~d) + (~!e)*(~x)^(~!r))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~p), 0) ? +-log(1 + (~d)⨸((~e)*(~x)^(~r)))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~d)*(~r)) + (~b)*(~n)*(~p)⨸((~d)*(~r))* ∫(log(1 + (~d)⨸((~e)*(~x)^(~r)))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_4_11", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~d) + (~!e)*(~x)^(~!r)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~r), (~x)) && + igt((~p), 0) && + igt((~r), 0) && + ilt((~m), -1) ? +1⨸(~d)*∫((~x)^(~m)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) - (~e)⨸(~d)*∫(((~x)^((~m) + (~r))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p))⨸((~d) + (~e)*(~x)^(~r)), (~x)) : nothing) + +("3_1_4_12", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~x)) && + eq((~m) + (~q) + 2, 0) && + igt((~p), 0) && + lt((~q), -1) ? +-((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^ (~p)⨸((~d)*(~f)*((~q) + 1)) + (~b)*(~n)*(~p)⨸((~d)*((~q) + 1))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1), (~x)) : nothing) + +("3_1_4_13", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + ilt((~m) + (~q) + 2, 0) && + igt((~m), 0) ? +dist(((~a) + (~b)*log((~c)*(~x)^(~n))), ∫((~x)^(~m)*((~d) + (~e)*(~x))^(~q), (~x)), (~x)) - (~b)*(~n)*∫(ext_simplify(∫((~x)^(~m)*((~d) + (~e)*(~x))^(~q), (~x))⨸(~x), (~x)), (~x)) : nothing) + +("3_1_4_14", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + ilt((~m) + (~q) + 2, 0) && + igt((~p), 0) && + lt((~q), -1) && + gt((~m), 0) ? +-((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^ (~p)⨸((~d)*(~f)*((~q) + 1)) + ((~m) + (~q) + 2)⨸((~d)*((~q) + 1))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) + (~b)*(~n)*(~p)⨸((~d)*((~q) + 1))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1), (~x)) : nothing) + +("3_1_4_15", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + ilt((~q), -1) && + gt((~m), 0) ? +((~f)*(~x))^(~m)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸((~e)*((~q) + 1)) - (~f)⨸((~e)*((~q) + 1))* ∫(((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x))^((~q) + 1)*((~a)*(~m) + (~b)*(~n) + (~b)*(~m)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_4_16", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + ilt((~q), -1) && + ilt((~m), 0) ? +-((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸(2*(~d)* (~f)*((~q) + 1)) + 1⨸(2*(~d)*((~q) + 1))* ∫(((~f)*(~x))^ (~m)*((~d) + (~e)*(~x)^2)^((~q) + 1)*((~a)*((~m) + 2*(~q) + 3) + (~b)*(~n) + (~b)*((~m) + 2*(~q) + 3)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_4_17", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~q) - 1/2) && + !( + lt((~m) + 2*(~q), -2) || + gt((~d), 0) + ) ? +(~d)^intpart((~q))*((~d) + (~e)*(~x)^2)^fracpart((~q))⨸(1 + (~e)⨸(~d)*(~x)^2)^fracpart((~q))* ∫((~x)^(~m)*(1 + (~e)⨸(~d)*(~x)^2)^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_4_18", +@rule ∫((~x)^(~!m)*((~d1) + (~!e1)*(~x))^(~q)*((~d2) + (~!e2)*(~x))^ (~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + eq((~d2)*(~e1) + (~d1)*(~e2), 0) && + ext_isinteger((~m)) && + ext_isinteger((~q) - 1/2) ? +((~d1) + (~e1)*(~x))^(~q)*((~d2) + (~e2)*(~x))^(~q)⨸(1 + (~e1)*(~e2)⨸((~d1)*(~d2))*(~x)^2)^(~q)* ∫((~x)^(~m)*(1 + (~e1)*(~e2)⨸((~d1)*(~d2))*(~x)^2)^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_4_19", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 0) && + gt((~q), 0) && + ext_isinteger(2*(~q)) ? +(~d)*∫(((~d) + (~e)*(~x))^((~q) - 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x)) + (~e)*∫(((~d) + (~e)*(~x))^((~q) - 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_4_20", +@rule ∫(((~d) + (~!e)*(~x))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 0) && + lt((~q), -1) && + ext_isinteger(2*(~q)) ? +1⨸(~d)*∫(((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x)) - (~e)⨸(~d)*∫(((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_4_21", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + ext_isinteger((~q) - 1/2) ? +∫(((~d) + (~e)*(~x)^(~r))^(~q)⨸(~x), (~x))*((~a) + (~b)*log((~c)*(~x)^(~n))) - (~b)*(~n)*∫(dist(1⨸(~x), ∫(((~d) + (~e)*(~x)^(~r))^(~q)⨸(~x), (~x)), (~x)), (~x)) : nothing) + +("3_1_4_22", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~p), 0) && + ilt((~q), -1) ? +1⨸(~d)*∫(((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x)) - (~e)⨸(~d)*∫((~x)^((~r) - 1)*((~d) + (~e)*(~x)^(~r))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +# Nested conditions found, not translating rule: +#Int[(f_.*x_)^m_.*(d_ + e_.*x_^r_.)^q_.*(a_. + b_.*Log[c_.*x_^n_.]), x_Symbol] := With[{u = IntHide[(f*x)^m*(d + e*x^r)^q, x]}, Dist[(a + b*Log[c*x^n]), u, x] - b*n*Int[SimplifyIntegrand[u/x, x], x] /; (EqQ[r, 1] || EqQ[r, 2]) && IntegerQ[m] && IntegerQ[q - 1/2] || InverseFunctionFreeQ[u, x]] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && IntegerQ[2*q] && (IntegerQ[m] && IntegerQ[r] || IGtQ[q, 0]) + +# Nested conditions found, not translating rule: +#Int[(f_.*x_)^m_.*(d_ + e_.*x_^r_.)^q_.*(a_. + b_.*Log[c_.*x_^n_.]), x_Symbol] := With[{u = ExpandIntegrand[(a + b*Log[c*x^n]), (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || IntegerQ[m] && IntegerQ[r]) + +("3_1_4_25", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger((~q)) && + ext_isinteger((~r)/(~n)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + ( + gt(((~m) + 1)/(~n), 0) || + igt((~p), 0) + ) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~d) + (~e)*(~x)^((~r)⨸(~n)))^ (~q)*((~a) + (~b)*log((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "3_1_4_25") : nothing) + +# Nested conditions found, not translating rule: +#Int[(f_.*x_)^m_.*(d_ + e_.*x_^r_.)^q_.*(a_. + b_.*Log[c_.*x_^n_.])^ p_., x_Symbol] := With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[ q] && (GtQ[q, 0] || IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r]) + +# ("3_1_4_27", +# @rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^(~r))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) +# +# +("3_1_4_28", +@rule ∫(((~!f)*(~x))^(~!m)*(~u)^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~m), (~n), (~p), (~q), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~f)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_4_29", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~q), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~m) + (~q) + 2, 0) && + igt((~p), 0) && + lt((~q), -1) ? +((~f) + (~g)*(~x))^((~m) + 1)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^ (~p)⨸(((~q) + 1)*((~e)*(~f) - (~d)*(~g))) - (~b)*(~n)*(~p)⨸(((~q) + 1)*((~e)*(~f) - (~d)*(~g)))* ∫(((~f) + (~g)*(~x))^((~m) + 1)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.5 u (a+b log(c x^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.5 u (a+b log(c x^n))^p.jl new file mode 100644 index 0000000..77a399e --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.1/3.1.5 u (a+b log(c x^n))^p.jl @@ -0,0 +1,555 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.1.5 u (a+b log(c x^n))^p *) +("3_1_5_1", +@rule ∫(((~!A) + (~!B)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n)))/ sqrt((~a) + (~!b)*log((~!c)*((~!d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~x)) ? +(~B)*((~d) + (~e)*(~x))*sqrt((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸((~b)*(~e)) + (2*(~A)*(~b) - (~B)*(2*(~a) + (~b)*(~n)))⨸(2*(~b))* ∫(1⨸sqrt((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))), (~x)) : nothing) + +("3_1_5_2", +@rule ∫((~x)^(~!m)*((~d) + (~e)/(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~m), (~q)) && + ext_isinteger((~q)) ? +∫(((~e) + (~d)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_3", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*log((~!c)*(~x)^(~!n)),(~x)) => + !contains_var((~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~q), 0) && + ext_isinteger((~m)) && + !( + eq((~q), 1) && + eq((~m), -1) + ) ? +let + u = ∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x)) + + dist(log((~c)*(~x)^(~n)), u, (~x)) - (~n)*∫(ext_simplify(u⨸(~x), (~x)), (~x)) +end : nothing) + +("3_1_5_4", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~q), 0) && + ext_isinteger((~m)) && + !( + eq((~q), 1) && + eq((~m), -1) + ) ? +let + u = ∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x)) + + u*((~a) + (~b)*log((~c)*(~x)^(~n))) - (~b)*(~n)*∫(ext_simplify(u⨸(~x), (~x)), (~x)) +end : nothing) + +("3_1_5_5", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m) + (~r)*((~q) + 1) + 1, 0) && + !eq((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸((~d)* (~f)*((~m) + 1)) - (~b)*(~n)⨸((~d)*((~m) + 1))*∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^(~r))^((~q) + 1), (~x)) : nothing) + +("3_1_5_6", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + ( + ext_isinteger((~m)) || + gt((~f), 0) + ) && + eq((~r), (~n)) ? +(~f)^(~m)⨸(~n)*int_and_subst(((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "3_1_5_6") : nothing) + +("3_1_5_7", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~d) + (~!e)*(~x)^(~r)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + ( + ext_isinteger((~m)) || + gt((~f), 0) + ) && + !eq((~r), (~n)) ? +(~f)^(~m)*log(1 + (~e)*(~x)^(~r)⨸(~d))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~e)*(~r)) - (~b)*(~f)^(~m)*(~n)*(~p)⨸((~e)*(~r))* ∫(log(1 + (~e)*(~x)^(~r)⨸(~d))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_5_8", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + ( + ext_isinteger((~m)) || + gt((~f), 0) + ) && + !eq((~r), (~n)) && + !eq((~q), -1) ? +(~f)^(~m)*((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~e)*(~r)*((~q) + 1)) - (~b)*(~f)^(~m)*(~n)*(~p)⨸((~e)*(~r)*((~q) + 1))* ∫(((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_5_9", +@rule ∫(((~f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + eq((~m), (~r) - 1) && + igt((~p), 0) && + !( + (ext_isinteger((~m)) || + gt((~f), 0)) + ) ? +((~f)*(~x))^(~m)⨸(~x)^(~m)*∫((~x)^(~m)*((~d) + (~e)*(~x)^(~r))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_10", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + ilt((~q), -1) && + gt((~m), 0) ? +((~f)*(~x))^(~m)*((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸((~e)*((~q) + 1)) - (~f)⨸((~e)*((~q) + 1))* ∫(((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x))^((~q) + 1)*((~a)*(~m) + (~b)*(~n) + (~b)*(~m)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_5_11", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + ilt((~q), -1) && + ilt((~m), 0) ? +-((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸(2*(~d)* (~f)*((~q) + 1)) + 1⨸(2*(~d)*((~q) + 1))* ∫(((~f)*(~x))^ (~m)*((~d) + (~e)*(~x)^2)^((~q) + 1)*((~a)*((~m) + 2*(~q) + 3) + (~b)*(~n) + (~b)*((~m) + 2*(~q) + 3)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_5_12", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~q) - 1/2) && + !( + lt((~m) + 2*(~q), -2) || + gt((~d), 0) + ) ? +(~d)^intpart((~q))*((~d) + (~e)*(~x)^2)^fracpart((~q))⨸(1 + (~e)⨸(~d)*(~x)^2)^fracpart((~q))* ∫((~x)^(~m)*(1 + (~e)⨸(~d)*(~x)^2)^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_5_13", +@rule ∫((~x)^(~!m)*((~d1) + (~!e1)*(~x))^(~q)*((~d2) + (~!e2)*(~x))^ (~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + eq((~d2)*(~e1) + (~d1)*(~e2), 0) && + ext_isinteger((~m)) && + ext_isinteger((~q) - 1/2) ? +((~d1) + (~e1)*(~x))^(~q)*((~d2) + (~e2)*(~x))^(~q)⨸(1 + (~e1)*(~e2)⨸((~d1)*(~d2))*(~x)^2)^(~q)* ∫((~x)^(~m)*(1 + (~e1)*(~e2)⨸((~d1)*(~d2))*(~x)^2)^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +("3_1_5_14", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~n)))/((~x)*((~d) + (~!e)*(~x)^(~!r))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + ext_isinteger((~r)/(~n)) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*log((~c)*(~x)))⨸((~x)*((~d) + (~e)*(~x)^((~r)⨸(~n)))), (~x), (~x), (~x)^(~n), "3_1_5_14") : nothing) + +("3_1_5_15", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~x)*((~d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 0) ? +1⨸(~d)*∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x)) - (~e)⨸(~d)*∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +#(* Int[(a_.+b_.*Log[c_.*x_^n_.])^p_./(x_*(d_+e_.*x_^r_.)),x_Symbol] := (r*Log[x]-Log[1+(e*x^r)/d])*(a+b*Log[c*x^n])^p/(d*r) - b*n*p/d*Int[Log[x]*(a+b*Log[c*x^n])^(p-1)/x,x] + b*n*p/(d*r)*Int[Log[1+(e*x^r)/d]*(a+b*Log[c*x^n])^(p-1)/x,x] /; FreeQ[{a,b,c,d,e,n,r},x] && IGtQ[p,0] *) +("3_1_5_16", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/((~x)*((~d) + (~!e)*(~x)^(~!r))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~p), 0) ? +-log(1 + (~d)⨸((~e)*(~x)^(~r)))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸((~d)*(~r)) + (~b)*(~n)*(~p)⨸((~d)*(~r))* ∫(log(1 + (~d)⨸((~e)*(~x)^(~r)))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_5_17", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 0) && + gt((~q), 0) && + ext_isinteger(2*(~q)) ? +(~d)*∫(((~d) + (~e)*(~x))^((~q) - 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x)) + (~e)*∫(((~d) + (~e)*(~x))^((~q) - 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_18", +@rule ∫(((~d) + (~!e)*(~x))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 0) && + lt((~q), -1) && + ext_isinteger(2*(~q)) ? +1⨸(~d)*∫(((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x)) - (~e)⨸(~d)*∫(((~d) + (~e)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_19", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + ext_isinteger((~q) - 1/2) ? +let + u = ∫(((~d) + (~e)*(~x)^(~r))^(~q)⨸(~x), (~x)) + + u*((~a) + (~b)*log((~c)*(~x)^(~n))) - (~b)*(~n)*∫(dist(1⨸(~x), u, (~x)), (~x)) +end : nothing) + +("3_1_5_20", +@rule ∫(((~d) + (~!e)*(~x)^(~!r))^(~q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~r), (~x)) && + igt((~p), 0) && + ilt((~q), -1) ? +1⨸(~d)*∫(((~d) + (~e)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x)) - (~e)⨸(~d)*∫((~x)^((~r) - 1)*((~d) + (~e)*(~x)^(~r))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_21", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + ext_isinteger(2*(~q)) && + ( + ext_isinteger((~m)) && + ext_isinteger((~r)) || + igt((~q), 0) + ) ? +let + u = ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x)) + +(eq((~r), 1) || + eq((~r), 2)) && +ext_isinteger((~m)) && +ext_isinteger((~q) - 1/2) || +!contains_inverse_function(u, (~x)) ? + dist(((~a) + (~b)*log((~c)*(~x)^(~n))), u, (~x)) - (~b)*(~n)*∫(ext_simplify(u⨸(~x), (~x)), (~x)) : nothing +end : nothing) + +("3_1_5_22", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~r), (~x)) && + ext_isinteger((~q)) && + ( + gt((~q), 0) || + ext_isinteger((~m)) && + ext_isinteger((~r)) + ) ? +let + u = ext_expand(((~a) + (~b)*log((~c)*(~x)^(~n))), ((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x)) + + issum(u) ? + ∫(u, (~x)) : nothing +end : nothing) + +("3_1_5_23", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger((~q)) && + ext_isinteger((~r)/(~n)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + ( + gt(((~m) + 1)/(~n), 0) || + igt((~p), 0) + ) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~d) + (~e)*(~x)^((~r)⨸(~n)))^ (~q)*((~a) + (~b)*log((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "3_1_5_23") : nothing) + +("3_1_5_24", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger( (~q)) && + ( + gt((~q), 0) || + igt((~p), 0) && + ext_isinteger((~m)) && + ext_isinteger((~r)) + ) ? +let + u = ext_expand(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), ((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^(~r))^(~q), (~x)) + + issum(u) ? + ∫(u, (~x)) : nothing +end : nothing) + +# ("3_1_5_25", +# @rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^(~!r))^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^(~r))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +("3_1_5_26", +@rule ∫(((~!f)*(~x))^(~!m)*(~u)^(~!q)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~m), (~n), (~p), (~q), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~f)*(~x))^(~m)*expand_to_sum((~u), (~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_27", +@rule ∫((~P)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) && + poly((~P), (~x)) ? +∫(ext_expand((~P)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)), (~x)) : nothing) + +("3_1_5_28", +@rule ∫((~RF)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + rational_function((~RF), (~x)) && + igt((~p), 0) ? +let + u = ext_expand(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~RF), (~x)) + + issum(u) ? + ∫(u, (~x)) : nothing +end : nothing) + +("3_1_5_29", +@rule ∫((~RF)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + rational_function((~RF), (~x)) && + igt((~p), 0) ? +let + u = ext_expand((~RF)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) + + issum(u) ? + ∫(u, (~x)) : nothing +end : nothing) + +# ("3_1_5_30", +# @rule ∫((~AF)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) && +# algebraic_function((~AF), (~x), True) ? +# Unintegrable[(~AF)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +("3_1_5_31", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)*((~d) + (~!e)*log((~!c)*(~x)^(~!n)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + ext_isinteger((~p)) && + ext_isinteger((~q)) ? +∫(ext_expand(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)*((~d) + (~e)*log((~c)*(~x)^(~n)))^(~q), (~x)), (~x)) : nothing) + +("3_1_5_32", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)*((~!d) + (~!e)*log((~!f)*(~x)^(~!r))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~r), (~x)) ? +let + u = ∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) + + dist((~d) + (~e)*log((~f)*(~x)^(~r)), u, (~x)) - (~e)*(~r)*∫(ext_simplify(u⨸(~x), (~x)), (~x)) +end : nothing) + +("3_1_5_33", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)*((~!d) + (~!e)*log((~!f)*(~x)^(~!r)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~r), (~x)) && + igt((~p), 0) && + igt((~q), 0) ? +(~x)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)*((~d) + (~e)*log((~f)*(~x)^(~r)))^(~q) - (~e)*(~q)*(~r)*∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)*((~d) + (~e)*log((~f)*(~x)^(~r)))^((~q) - 1), (~x)) - (~b)*(~n)*(~p)*∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)*((~d) + (~e)*log((~f)*(~x)^(~r)))^(~q), (~x)) : nothing) + +# ("3_1_5_34", +# @rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)*((~!d) + (~!e)*log((~!f)*(~x)^(~!r)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)*((~d) + (~e)*log((~f)*(~x)^(~r)))^(~q), (~x)] : nothing) + +("3_1_5_35", +@rule ∫(((~!a) + (~!b)*log((~v)))^(~!p)*((~!c) + (~!d)*log((~v)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~p), (~q), (~x)) && + linear((~v), (~x)) && + !eq(ext_coeff((~v), (~x), 0), 0) ? +1⨸ext_coeff((~v), (~x), 1)* int_and_subst(((~a) + (~b)*log((~x)))^(~p)*((~c) + (~d)*log((~x)))^(~q), (~x), (~x), (~v), "3_1_5_35") : nothing) + +("3_1_5_36", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)*((~!d) + (~!e)*log((~!c)*(~x)^(~!n)))^(~!q)/ (~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~q), (~x)) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*(~x))^(~p)*((~d) + (~e)*(~x))^(~q), (~x), (~x), log((~c)*(~x)^(~n)), "3_1_5_36") : nothing) + +("3_1_5_37", +@rule ∫(((~!g)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p)*((~!d) + (~!e)*log((~!f)*(~x)^(~!r))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~r), (~x)) && + !( + eq((~p), 1) && + eq((~a), 0) && + !eq((~d), 0) + ) ? +let + u = ∫(((~g)*(~x))^(~m)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) + + dist(((~d) + (~e)*log((~f)*(~x)^(~r))), u, (~x)) - (~e)*(~r)*∫(ext_simplify(u⨸(~x), (~x)), (~x)) +end : nothing) + +("3_1_5_38", +@rule ∫(((~!g)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p)*((~!d) + (~!e)*log((~!f)*(~x)^(~!r)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~r), (~x)) && + igt((~p), 0) && + igt((~q), 0) && + !eq((~m), -1) ? +((~g)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^ (~p)*((~d) + (~e)*log((~f)*(~x)^(~r)))^(~q)⨸((~g)*((~m) + 1)) - (~e)*(~q)*(~r)⨸((~m) + 1)* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)*((~d) + (~e)*log((~f)*(~x)^(~r)))^((~q) - 1), (~x)) - (~b)*(~n)*(~p)⨸((~m) + 1)* ∫(((~g)*(~x))^(~m)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)*((~d) + (~e)*log((~f)*(~x)^(~r)))^(~q), (~x)) : nothing) + +# ("3_1_5_39", +# @rule ∫(((~!g)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^ (~!p)*((~!d) + (~!e)*log((~!f)*(~x)^(~!r)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~g)*(~x))^(~m)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)*((~d) + (~e)*log((~f)*(~x)^(~r)))^(~q), (~x)] : nothing) + +("3_1_5_40", +@rule ∫((~u)^(~!m)*((~!a) + (~!b)*log((~v)))^(~!p)*((~!c) + (~!d)*log((~v)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~p), (~q), (~x)) && + linear((~u), (~v), (~x)) ? +let + e = ext_coeff((~u), (~x), 0) + f = ext_coeff((~u), (~x), 1) + g = ext_coeff((~v), (~x), 0) + h = ext_coeff((~v), (~x), 1) + + eq(f*g - e*h, 0) && + !eq(g, 0) ? + 1⨸h* int_and_subst((f*(~x)⨸h)^(~m)*((~a) + (~b)*log((~x)))^(~p)*((~c) + (~d)*log((~x)))^(~q), (~x), (~x), (~v), "3_1_5_40") : nothing +end : nothing) + +("3_1_5_41", +@rule ∫(log((~!d)*((~e) + (~!f)*(~x)^(~!m))^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~r), (~m), (~n), (~x)) && + igt((~p), 0) && + isrational( (~m)) && + ( + eq((~p), 1) || + isfraction((~m)) && + ext_isinteger(1/(~m)) || + eq((~r), 1) && + eq((~m), 1) && + eq((~d)*(~e), 1) + ) ? +let + u = ∫(log((~d)*((~e) + (~f)*(~x)^(~m))^(~r)), (~x)) + + dist(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), u, (~x)) - (~b)*(~n)*(~p)*∫(dist(((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), u, (~x)), (~x)) +end : nothing) + +("3_1_5_42", +@rule ∫(log((~!d)*((~e) + (~!f)*(~x)^(~!m))^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~r), (~m), (~n), (~x)) && + igt((~p), 0) && + ext_isinteger((~m)) ? +let + u = ∫(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) + + dist(log((~d)*((~e) + (~f)*(~x)^(~m))^(~r)), u, (~x)) - (~f)*(~m)*(~r)*∫(dist((~x)^((~m) - 1)⨸((~e) + (~f)*(~x)^(~m)), u, (~x)), (~x)) +end : nothing) + +# ("3_1_5_43", +# @rule ∫(log((~!d)*((~e) + (~!f)*(~x)^(~!m))^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~r), (~m), (~n), (~p), (~x)) ? +# Unintegrable[log((~d)*((~e) + (~f)*(~x)^(~m))^(~r))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +("3_1_5_44", +@rule ∫(log((~!d)*(~u)^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~r), (~n), (~p), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(log((~d)*expand_to_sum((~u), (~x))^(~r))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_45", +@rule ∫(log((~!d)*((~e) + (~!f)*(~x)^(~!m)))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~p), 0) && + eq((~d)*(~e), 1) ? +-PolyLog.reli(2, -(~d)*(~f)*(~x)^(~m))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~m) + (~b)*(~n)*(~p)⨸(~m)* ∫(PolyLog.reli(2, -(~d)*(~f)*(~x)^(~m))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_5_46", +@rule ∫(log((~!d)*((~e) + (~!f)*(~x)^(~!m))^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~r), (~m), (~n), (~x)) && + igt((~p), 0) && + !eq((~d)*(~e), 1) ? +log((~d)*((~e) + (~f)*(~x)^(~m))^(~r))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - (~f)*(~m)*(~r)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^((~m) - 1)*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1)⨸((~e) + (~f)*(~x)^(~m)), (~x)) : nothing) + +("3_1_5_47", +@rule ∫(((~!g)*(~x))^(~!q)* log((~!d)*((~e) + (~!f)*(~x)^(~!m))^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~r), (~m), (~n), (~q), (~x)) && + ( + ext_isinteger(((~q) + 1)/(~m)) || + isrational((~m)) && + isrational((~q)) + ) && + !eq((~q), -1) ? +let + u = ∫(((~g)*(~x))^(~q)*log((~d)*((~e) + (~f)*(~x)^(~m))^(~r)), (~x)) + + dist(((~a) + (~b)*log((~c)*(~x)^(~n))), u, (~x)) - (~b)*(~n)*∫(dist(1⨸(~x), u, (~x)), (~x)) +end : nothing) + +("3_1_5_48", +@rule ∫(((~!g)*(~x))^(~!q)* log((~!d)*((~e) + (~!f)*(~x)^(~!m)))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~q), (~x)) && + igt((~p), 0) && + isrational((~m)) && + isrational((~q)) && + !eq((~q), -1) && + ( + eq((~p), 1) || + isfraction((~m)) && + ext_isinteger(((~q) + 1)/(~m)) || + igt((~q), 0) && + ext_isinteger(((~q) + 1)/(~m)) && + eq((~d)*(~e), 1) + ) ? +let + u = ∫(((~g)*(~x))^(~q)*log((~d)*((~e) + (~f)*(~x)^(~m))), (~x)) + + dist(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), u, (~x)) - (~b)*(~n)*(~p)*∫(dist(((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), u, (~x)), (~x)) +end : nothing) + +("3_1_5_49", +@rule ∫(((~!g)*(~x))^(~!q)* log((~!d)*((~e) + (~!f)*(~x)^(~!m))^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~r), (~m), (~n), (~q), (~x)) && + igt((~p), 0) && + isrational((~m)) && + isrational((~q)) ? +let + u = ∫(((~g)*(~x))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) + + dist(log((~d)*((~e) + (~f)*(~x)^(~m))^(~r)), u, (~x)) - (~f)*(~m)*(~r)*∫(dist((~x)^((~m) - 1)⨸((~e) + (~f)*(~x)^(~m)), u, (~x)), (~x)) +end : nothing) + +# ("3_1_5_50", +# @rule ∫(((~!g)*(~x))^(~!q)* log((~!d)*((~e) + (~!f)*(~x)^(~!m))^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~r), (~m), (~n), (~p), (~q), (~x)) ? +# Unintegrable[((~g)*(~x))^(~q)*log((~d)*((~e) + (~f)*(~x)^(~m))^(~r))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +("3_1_5_51", +@rule ∫(((~!g)*(~x))^(~!q)*log((~!d)*(~u)^(~!r))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~r), (~n), (~p), (~q), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~g)*(~x))^(~q)*log((~d)*expand_to_sum((~u), (~x))^(~r))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("3_1_5_52", +@rule ∫(PolyLog.reli((~k), (~!e)*(~x)^(~!q))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~n), (~q), (~x)) && + igt((~k), 0) ? +-(~b)*(~n)*(~x)*PolyLog.reli((~k), (~e)*(~x)^(~q)) + (~x)*PolyLog.reli((~k), (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n))) + (~b)*(~n)*(~q)*∫(PolyLog.reli((~k) - 1, (~e)*(~x)^(~q)), (~x)) - (~q)*∫(PolyLog.reli((~k) - 1, (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +# ("3_1_5_53", +# @rule ∫(PolyLog.reli((~k), (~!e)*(~x)^(~!q))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~e), (~n), (~p), (~q), (~x)) ? +# Unintegrable[PolyLog.reli((~k), (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +("3_1_5_54", +@rule ∫(PolyLog.reli((~k), (~!e)*(~x)^(~!q))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~k), (~n), (~q), (~x)) && + gt((~p), 0) ? +PolyLog.reli((~k) + 1, (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~q) - (~b)*(~n)*(~p)⨸(~q)*∫(PolyLog.reli((~k) + 1, (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) - 1)⨸(~x), (~x)) : nothing) + +("3_1_5_55", +@rule ∫(PolyLog.reli((~k), (~!e)*(~x)^(~!q))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~k), (~n), (~q), (~x)) && + lt((~p), -1) ? +PolyLog.reli((~k), (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - (~q)⨸((~b)*(~n)*((~p) + 1))* ∫(PolyLog.reli((~k) - 1, (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))^((~p) + 1)⨸(~x), (~x)) : nothing) + +("3_1_5_56", +@rule ∫(((~!d)*(~x))^(~!m)*PolyLog.reli((~k), (~!e)*(~x)^(~!q))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~q), (~x)) && + igt((~k), 0) ? +-(~b)*(~n)*((~d)*(~x))^((~m) + 1)*PolyLog.reli((~k), (~e)*(~x)^(~q))⨸((~d)*((~m) + 1)^2) + ((~d)*(~x))^((~m) + 1)* PolyLog.reli((~k), (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))⨸((~d)*((~m) + 1)) + (~b)*(~n)*(~q)⨸((~m) + 1)^2*∫(((~d)*(~x))^(~m)*PolyLog.reli((~k) - 1, (~e)*(~x)^(~q)), (~x)) - (~q)⨸((~m) + 1)* ∫(((~d)*(~x))^(~m)*PolyLog.reli((~k) - 1, (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n))), (~x)) : nothing) + +# ("3_1_5_57", +# @rule ∫(((~!d)*(~x))^(~!m)* PolyLog.reli((~k), (~!e)*(~x)^(~!q))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*PolyLog.reli((~k), (~e)*(~x)^(~q))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +("3_1_5_58", +@rule ∫((~!Px)*(~F)((~!d)*((~!e) + (~!f)*(~x)))^(~!m)*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + poly((~Px), (~x)) && + igt((~m), 0) && + in( (~F), [asin, acos, asinh, acosh]) ? +let + u = ∫((~Px)*(~F)((~d)*((~e) + (~f)*(~x)))^(~m), (~x)) + + dist(((~a) + (~b)*log((~c)*(~x)^(~n))), u, (~x)) - (~b)*(~n)*∫(dist(1⨸(~x), u, (~x)), (~x)) +end : nothing) + +("3_1_5_59", +@rule ∫((~!Px)*(~F)((~!d)*((~!e) + (~!f)*(~x)))*((~!a) + (~!b)*log((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + poly((~Px), (~x)) && + in( (~F), [atan, acot, atanh, acoth]) ? +let + u = ∫((~Px)*(~F)((~d)*((~e) + (~f)*(~x))), (~x)) + + dist(((~a) + (~b)*log((~c)*(~x)^(~n))), u, (~x)) - (~b)*(~n)*∫(dist(1⨸(~x), u, (~x)), (~x)) +end : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.1 (f+g x)^m (A+B log(e ((a+b x) over (c+d x))^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.1 (f+g x)^m (A+B log(e ((a+b x) over (c+d x))^n))^p.jl new file mode 100644 index 0000000..2b98ab1 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.1 (f+g x)^m (A+B log(e ((a+b x) over (c+d x))^n))^p.jl @@ -0,0 +1,209 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.2.1 (f+g x)^m (A+B log(e ((a+b x) over (c+d x))^n))^p *) +("3_2_1_1", +@rule ∫(((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~p), 0) ? +((~a) + (~b)*(~x))*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))^(~p)⨸(~b) - (~B)*(~n)*(~p)*((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))^((~p) - 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_1_2", +@rule ∫(((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~p), 0) ? +((~a) + (~b)*(~x))*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))^(~p)⨸(~b) - (~B)*(~n)*(~p)*((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))^((~p) - 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +#(* Int[(A_.+B_.*Log[e_.*((a_.+b_.*x_)^n1_.*(c_.+d_.*x_)^n2_)^n_.])^p_. ,x_Symbol] := (a+b*x)*(A+B*Log[e*((a+b*x)^n1/(c+d*x)^n1)^n])^p/b - B*n*p*(b*c-a*d)/b*Int[(A+B*Log[e*((a+b*x)^n1/(c+d*x)^n1)^n])^(p-1)/( c+d*x),x] /; FreeQ[{a,b,c,d,e,A,B,n},x] && EqQ[n1+n2,0] && GtQ[n1,0] && (EqQ[n1,1] || EqQ[n,1]) && NeQ[b*c-a*d,0] && IGtQ[p,0] *) +# ("3_2_1_3", +# @rule ∫(((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~p), (~x)) ? +# Unintegrable[((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))^(~p), (~x)] : nothing) + +# ("3_2_1_4", +# @rule ∫(((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~p), (~x)) && +# eq((~n) + (~mn), 0) ? +# Unintegrable[((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("3_2_1_5", +@rule ∫(((~!A) + (~!B)*log((~!e)*((~u)/(~v))^(~!n)))^(~!p),(~x)) => + !contains_var((~e), (~A), (~B), (~n), (~p), (~x)) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫(((~A) + (~B)*log((~e)*(expand_to_sum((~u), (~x))⨸expand_to_sum((~v), (~x)))^(~n)))^(~p), (~x)) : nothing) + +("3_2_1_6", +@rule ∫(((~!A) + (~!B)*log((~!e)*(~u)^(~!n)*(~v)^(~mn)))^(~!p),(~x)) => + !contains_var((~e), (~A), (~B), (~n), (~p), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫(((~A) + (~B)*log((~e)*expand_to_sum((~u), (~x))^(~n)⨸expand_to_sum((~v), (~x))^(~n)))^(~p), (~x)) : nothing) + +("3_2_1_7", +@rule ∫(((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) ? +-log(-((~b)*(~c) - (~a)*(~d))⨸((~d)*((~a) + (~b)*(~x))))*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))⨸(~g) + (~B)*(~n)*((~b)*(~c) - (~a)*(~d))⨸(~g)* ∫(log(-((~b)*(~c) - (~a)*(~d))⨸((~d)*((~a) + (~b)*(~x))))⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing) + +("3_2_1_8", +@rule ∫(((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) ? +-log(-((~b)*(~c) - (~a)*(~d))⨸((~d)*((~a) + (~b)*(~x))))*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))⨸(~g) + (~B)*(~n)*((~b)*(~c) - (~a)*(~d))⨸(~g)* ∫(log(-((~b)*(~c) - (~a)*(~d))⨸((~d)*((~a) + (~b)*(~x))))⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing) + +("3_2_1_9", +@rule ∫(((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)*(~f) - (~c)*(~g), 0) ? +-log(((~b)*(~c) - (~a)*(~d))⨸((~b)*((~c) + (~d)*(~x))))*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))⨸(~g) + (~B)*(~n)*((~b)*(~c) - (~a)*(~d))⨸(~g)* ∫(log(((~b)*(~c) - (~a)*(~d))⨸((~b)*((~c) + (~d)*(~x))))⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing) + +("3_2_1_10", +@rule ∫(((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)*(~f) - (~c)*(~g), 0) ? +-log(((~b)*(~c) - (~a)*(~d))⨸((~b)*((~c) + (~d)*(~x))))*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))⨸(~g) + (~B)*(~n)*((~b)*(~c) - (~a)*(~d))⨸(~g)* ∫(log(((~b)*(~c) - (~a)*(~d))⨸((~b)*((~c) + (~d)*(~x))))⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing) + +("3_2_1_11", +@rule ∫(((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +log((~f) + (~g)*(~x))*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))⨸(~g) - (~b)*(~B)*(~n)⨸(~g)*∫(log((~f) + (~g)*(~x))⨸((~a) + (~b)*(~x)), (~x)) + (~B)*(~d)*(~n)⨸(~g)*∫(log((~f) + (~g)*(~x))⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_1_12", +@rule ∫(((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +log((~f) + (~g)*(~x))*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))⨸(~g) - (~b)*(~B)*(~n)⨸(~g)*∫(log((~f) + (~g)*(~x))⨸((~a) + (~b)*(~x)), (~x)) + (~B)*(~d)*(~n)⨸(~g)*∫(log((~f) + (~g)*(~x))⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_1_13", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~m), -1) && + !eq((~m), -2) ? +((~f) + (~g)*(~x))^((~m) + 1)*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))⨸((~g)*((~m) + 1)) - (~B)*(~n)*((~b)*(~c) - (~a)*(~d))⨸((~g)*((~m) + 1))* ∫(((~f) + (~g)*(~x))^((~m) + 1)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing) + +("3_2_1_14", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~m), (~n), (~x)) && + eq((~n) + (~mn), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~m), -1) && + !( + eq((~m), -2) && + ext_isinteger((~n)) + ) ? +((~f) + (~g)*(~x))^((~m) + 1)*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))⨸((~g)*((~m) + 1)) - (~B)*(~n)*((~b)*(~c) - (~a)*(~d))⨸((~g)*((~m) + 1))* ∫(((~f) + (~g)*(~x))^((~m) + 1)⨸(((~a) + (~b)*(~x))*((~c) + (~d)*(~x))), (~x)) : nothing) + +("3_2_1_15", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~p)) && + eq((~b)*(~f) - (~a)*(~g), 0) && + ( + gt((~p), 0) || + lt((~m), -1) + ) ? +((~b)*(~c) - (~a)*(~d))^((~m) + 1)*((~g)⨸(~b))^(~m)* int_and_subst((~x)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_1_15") : nothing) + +("3_2_1_16", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~p)) && + eq((~b)*(~f) - (~a)*(~g), 0) && + ( + gt((~p), 0) || + lt((~m), -1) + ) ? +((~b)*(~c) - (~a)*(~d))^((~m) + 1)*((~g)⨸(~b))^(~m)* int_and_subst((~x)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_1_16") : nothing) + +("3_2_1_17", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~p)) && + eq((~d)*(~f) - (~c)*(~g), 0) && + ( + gt((~p), 0) || + lt((~m), -1) + ) ? +((~b)*(~c) - (~a)*(~d))^((~m) + 1)*((~g)⨸(~d))^(~m)* int_and_subst(((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_1_17") : nothing) + +("3_2_1_18", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~p)) && + eq((~d)*(~f) - (~c)*(~g), 0) && + ( + gt((~p), 0) || + lt((~m), -1) + ) ? +((~b)*(~c) - (~a)*(~d))^((~m) + 1)*((~g)⨸(~d))^(~m)* int_and_subst(((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_1_18") : nothing) + +("3_2_1_19", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m)) && + igt((~p), 0) ? +((~b)*(~c) - (~a)*(~d))* int_and_subst(((~b)*(~f) - (~a)*(~g) - ((~d)*(~f) - (~c)*(~g))*(~x))^ (~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_1_19") : nothing) + +("3_2_1_20", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m)) && + igt((~p), 0) ? +((~b)*(~c) - (~a)*(~d))* int_and_subst(((~b)*(~f) - (~a)*(~g) - ((~d)*(~f) - (~c)*(~g))*(~x))^ (~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_1_20") : nothing) + +# ("3_2_1_21", +# @rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~f) + (~g)*(~x))^(~m)*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))^(~p), (~x)] : nothing) + +# ("3_2_1_22", +# @rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~m), (~n), (~p), (~x)) && +# eq((~n) + (~mn), 0) && +# ext_isinteger((~n)) ? +# Unintegrable[((~f) + (~g)*(~x))^(~m)*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("3_2_1_23", +@rule ∫((~w)^(~!m)*((~!A) + (~!B)*log((~!e)*((~u)/(~v))^(~!n)))^(~!p),(~x)) => + !contains_var((~e), (~A), (~B), (~m), (~n), (~p), (~x)) && + linear((~u), (~v), (~w), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~x))) ? +∫(expand_to_sum((~w), (~x))^ (~m)*((~A) + (~B)*log((~e)*(expand_to_sum((~u), (~x))⨸expand_to_sum((~v), (~x)))^(~n)))^(~p), (~x)) : nothing) + +("3_2_1_24", +@rule ∫((~w)^(~!m)*((~!A) + (~!B)*log((~!e)*(~u)^(~!n)*(~v)^(~mn)))^(~!p),(~x)) => + !contains_var((~e), (~A), (~B), (~m), (~n), (~p), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + linear((~u), (~v), (~w), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~x))) ? +∫(expand_to_sum((~w), (~x))^ (~m)*((~A) + (~B)*log((~e)*expand_to_sum((~u), (~x))^(~n)⨸expand_to_sum((~v), (~x))^(~n)))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.2 (f+g x)^m (h+i x)^q (A+B log(e ((a+b x) over (c+d x))^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.2 (f+g x)^m (h+i x)^q (A+B log(e ((a+b x) over (c+d x))^n))^p.jl new file mode 100644 index 0000000..a489ee0 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.2 (f+g x)^m (h+i x)^q (A+B log(e ((a+b x) over (c+d x))^n))^p.jl @@ -0,0 +1,179 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.2.2 (f+g x)^m (h+i x)^q (A+B log(e ((a+b x) over (c+d x))^n))^p *) +("3_2_2_1", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!h) + (~!i)*(~x))*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) && + igt((~m), -2) ? +((~f) + (~g)*(~x))^((~m) + 1)*((~h) + (~i)*(~x))*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))⨸((~g)*((~m) + 2)) + (~i)*((~b)*(~c) - (~a)*(~d))⨸((~b)*(~d)*((~m) + 2))* ∫(((~f) + (~g)*(~x))^(~m)*((~A) - (~B)*(~n) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n))), (~x)) : nothing) + +("3_2_2_2", +@rule ∫(((~!f) + (~!g)*(~x))^ (~!m)*((~!h) + (~!i)*(~x))*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~m), (~n), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) && + igt((~m), -2) ? +((~f) + (~g)*(~x))^((~m) + 1)*((~h) + (~i)*(~x))*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))⨸((~g)*((~m) + 2)) + (~i)*((~b)*(~c) - (~a)*(~d))⨸((~b)*(~d)*((~m) + 2))* ∫(((~f) + (~g)*(~x))^(~m)*((~A) - (~B)*(~n) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n))), (~x)) : nothing) + +("3_2_2_3", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) && + ext_isinteger((~m), (~q)) ? +((~b)*(~c) - (~a)*(~d))^((~m) + (~q) + 1)*((~g)⨸(~b))^(~m)*((~i)⨸(~d))^(~q)* int_and_subst((~x)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + (~q) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_3") : nothing) + +("3_2_2_4", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~n), (~p), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) && + ext_isinteger((~m), (~q)) ? +((~b)*(~c) - (~a)*(~d))^((~m) + (~q) + 1)*((~g)⨸(~b))^(~m)*((~i)⨸(~d))^(~q)* int_and_subst((~x)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + (~q) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_4") : nothing) + +("3_2_2_5", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~m), (~n), (~p), (~q), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) && + eq((~m) + (~q) + 2, 0) ? +(~d)^2*((~g)*((~a) + (~b)*(~x))⨸(~b))^ (~m)⨸((~i)^2*((~b)*(~c) - (~a)*(~d))*((~i)*((~c) + (~d)*(~x))⨸(~d))^(~m)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~m))* int_and_subst((~x)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_5") : nothing) + +("3_2_2_6", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~m), (~n), (~p), (~q), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~f) - (~a)*(~g), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) && + eq((~m) + (~q) + 2, 0) ? +(~d)^2*((~g)*((~a) + (~b)*(~x))⨸(~b))^ (~m)⨸((~i)^2*((~b)*(~c) - (~a)*(~d))*((~i)*((~c) + (~d)*(~x))⨸(~d))^(~m)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~m))* int_and_subst((~x)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_6") : nothing) + +#(* Int[(f_.+g_.*x_)^m_.*(h_.+i_.*x_)^q_.*(A_.+B_.*Log[e_.*(a_.+b_.*x_) ^n_.*(c_.+d_.*x_)^mn_])^p_.,x_Symbol] := b*d*(f+g*x)^(m+1)/(g*i*(b*c-a*d)*(h+i*x)^(m+1)*((a+b*x)/(c+d*x))^(m+ 1))* Subst[Int[x^m*(A+B*Log[e*x^n])^p,x],x,(a+b*x)/(c+d*x)] /; FreeQ[{a,b,c,d,e,f,g,h,i,A,B,m,n,p,q},x] && EqQ[n+mn,0] && NeQ[b*c-a*d,0] && EqQ[b*f-a*g,0] && EqQ[d*h-c*i,0] && EqQ[m+q+2,0] *) +("3_2_2_7", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~q)) && + igt((~p), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) ? +((~b)*(~c) - (~a)*(~d))^((~q) + 1)*((~i)⨸(~d))^(~q)* int_and_subst(((~b)*(~f) - (~a)*(~g) - ((~d)*(~f) - (~c)*(~g))*(~x))^ (~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + (~q) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_7") : nothing) + +("3_2_2_8", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~q)) && + igt((~p), 0) && + eq((~d)*(~h) - (~c)*(~i), 0) ? +((~b)*(~c) - (~a)*(~d))^((~q) + 1)*((~i)⨸(~d))^(~q)* int_and_subst(((~b)*(~f) - (~a)*(~g) - ((~d)*(~f) - (~c)*(~g))*(~x))^ (~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + (~q) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_8") : nothing) + +("3_2_2_9", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~q)) && + igt((~p), 0) ? +((~b)*(~c) - (~a)*(~d))* int_and_subst(((~b)*(~f) - (~a)*(~g) - ((~d)*(~f) - (~c)*(~g))*(~x))^ (~m)*((~b)*(~h) - (~a)*(~i) - ((~d)*(~h) - (~c)*(~i))*(~x))^ (~q)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + (~q) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_9") : nothing) + +("3_2_2_10", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~n), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m), (~q)) && + igt((~p), 0) ? +((~b)*(~c) - (~a)*(~d))* int_and_subst(((~b)*(~f) - (~a)*(~g) - ((~d)*(~f) - (~c)*(~g))*(~x))^ (~m)*((~b)*(~h) - (~a)*(~i) - ((~d)*(~h) - (~c)*(~i))*(~x))^ (~q)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸((~b) - (~d)*(~x))^((~m) + (~q) + 2), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_10") : nothing) + +# ("3_2_2_11", +# @rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~m), (~n), (~p), (~q), (~x)) ? +# Unintegrable[((~f) + (~g)*(~x))^(~m)*((~h) + (~i)*(~x))^ (~q)*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))^(~p), (~x)] : nothing) + +# ("3_2_2_12", +# @rule ∫(((~!f) + (~!g)*(~x))^(~!m)*((~!h) + (~!i)*(~x))^ (~!q)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~A), (~B), (~m), (~n), (~p), (~q), (~x)) && +# eq((~n) + (~mn), 0) && +# ext_isinteger((~n)) ? +# Unintegrable[((~f) + (~g)*(~x))^(~m)*((~h) + (~i)*(~x))^ (~q)*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("3_2_2_13", +@rule ∫((~w)^(~!m)*(~y)^(~!q)*((~!A) + (~!B)*log((~!e)*((~u)/(~v))^(~!n)))^(~!p),(~x)) => + !contains_var((~e), (~A), (~B), (~m), (~n), (~p), (~q), (~x)) && + linear((~u), (~v), (~w), (~y), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~y), (~x))) ? +∫(expand_to_sum((~w), (~x))^(~m)* expand_to_sum((~y), (~x))^ (~q)*((~A) + (~B)*log((~e)*(expand_to_sum((~u), (~x))⨸expand_to_sum((~v), (~x)))^(~n)))^(~p), (~x)) : nothing) + +("3_2_2_14", +@rule ∫((~w)^(~!m)*(~y)^(~!q)*((~!A) + (~!B)*log((~!e)*(~u)^(~!n)*(~v)^(~mn)))^(~!p),(~x)) => + !contains_var((~e), (~A), (~B), (~m), (~n), (~p), (~q), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + linear((~u), (~v), (~w), (~y), (~x)) && + !(linear_without_simplify((~u), (~v), (~w), (~y), (~x))) ? +∫(expand_to_sum((~w), (~x))^(~m)* expand_to_sum((~y), (~x))^ (~q)*((~A) + (~B)*log((~e)*expand_to_sum((~u), (~x))^(~n)⨸expand_to_sum((~v), (~x))^(~n)))^(~p), (~x)) : nothing) + +("3_2_2_15", +@rule ∫((~!w)*((~!A) + (~!B)*log((~!e)*(~u)^(~!n)*(~v)^(~mn)))^(~!p),(~x)) => + !contains_var((~e), (~A), (~B), (~n), (~p), (~x)) && + eq((~n) + (~mn), 0) && + linear((~u), (~v), (~x)) && + !(ext_isinteger((~n))) ? +int_and_subst((~w)*((~A) + (~B)*log((~e)*((~u)⨸(~v))^(~n)))^(~p), (~x), (~e)*((~u)⨸(~v))^(~n), (~e)*(~u)^(~n)⨸(~v)^(~n), "3_2_2_15") : nothing) + +#(* Int[w_.*(A_.+B_.*Log[e_.*(f_.*u_^q_.*v_^mq_)^n_.])^p_.,x_Symbol] := Subst[Int[w*(A+B*Log[e*f^n*(u/v)^(n*q)])^p,x],e*f^n*(u/v)^(n*q),e*( f*(u^q/v^q))^n] /; FreeQ[{e,f,A,B,n,p,q},x] && EqQ[q+mq,0] && LinearQ[{u,v},x] && Not[IntegerQ[n]] *) +("3_2_2_16", +@rule ∫(((~!f) + (~!g)*(~x) + (~!h)*(~x)^2)^ (~!m)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~n), (~p), (~x)) && + eq((~b)*(~d)*(~f) - (~a)*(~c)*(~h), 0) && + eq((~b)*(~d)*(~g) - (~h)*((~b)*(~c) + (~a)*(~d)), 0) && + ext_isinteger((~m)) ? +(~h)^(~m)⨸((~b)^(~m)*(~d)^(~m))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~m)*((~A) + (~B)*log((~e)*(((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)))^(~n)))^ (~p), (~x)) : nothing) + +("3_2_2_17", +@rule ∫(((~!f) + (~!g)*(~x) + (~!h)*(~x)^2)^ (~!m)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~A), (~B), (~n), (~p), (~x)) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + eq((~b)*(~d)*(~f) - (~a)*(~c)*(~h), 0) && + eq((~b)*(~d)*(~g) - (~h)*((~b)*(~c) + (~a)*(~d)), 0) && + ext_isinteger((~m)) ? +(~h)^(~m)⨸((~b)^(~m)*(~d)^(~m))* ∫(((~a) + (~b)*(~x))^(~m)*((~c) + (~d)*(~x))^(~m)*((~A) + (~B)*log((~e)*((~a) + (~b)*(~x))^(~n)⨸((~c) + (~d)*(~x))^(~n)))^ (~p), (~x)) : nothing) + +("3_2_2_18", +@rule ∫((~Px)^(~!m)*((~!A) + (~!B)*log((~!e)*(((~!a) + (~!b)*(~x))/((~!c) + (~!d)*(~x)))^(~!n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~x)) && + poly((~Px), (~x), 2) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m)) && + igt((~p), 0) ? +((~b)*(~c) - (~a)*(~d))* int_and_subst(((~b)^2*ext_coeff((~Px), (~x), 0) - (~a)*(~b)*ext_coeff((~Px), (~x), 1) + (~a)^2*ext_coeff((~Px), (~x), 2) - (2*(~b)*(~d)*ext_coeff((~Px), (~x), 0) - (~b)*(~c)*ext_coeff((~Px), (~x), 1) - (~a)*(~d)*ext_coeff((~Px), (~x), 1) + 2*(~a)*(~c)*ext_coeff((~Px), (~x), 2))* (~x) + ((~d)^2*ext_coeff((~Px), (~x), 0) - (~c)*(~d)*ext_coeff((~Px), (~x), 1) + (~c)^2*ext_coeff((~Px), (~x), 2))*(~x)^2)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸ ((~b) - (~d)*(~x))^(2*((~m) + 1)), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_18") : nothing) + +("3_2_2_19", +@rule ∫((~Px)^ (~!m)*((~!A) + (~!B)*log((~!e)*((~!a) + (~!b)*(~x))^(~!n)*((~!c) + (~!d)*(~x))^(~mn)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~x)) && + poly((~Px), (~x), 2) && + eq((~n) + (~mn), 0) && + igt((~n), 0) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~m)) && + igt((~p), 0) ? +((~b)*(~c) - (~a)*(~d))* int_and_subst(((~b)^2*ext_coeff((~Px), (~x), 0) - (~a)*(~b)*ext_coeff((~Px), (~x), 1) + (~a)^2*ext_coeff((~Px), (~x), 2) - (2*(~b)*(~d)*ext_coeff((~Px), (~x), 0) - (~b)*(~c)*ext_coeff((~Px), (~x), 1) - (~a)*(~d)*ext_coeff((~Px), (~x), 1) + 2*(~a)*(~c)*ext_coeff((~Px), (~x), 2))* (~x) + ((~d)^2*ext_coeff((~Px), (~x), 0) - (~c)*(~d)*ext_coeff((~Px), (~x), 1) + (~c)^2*ext_coeff((~Px), (~x), 2))*(~x)^2)^(~m)*((~A) + (~B)*log((~e)*(~x)^(~n)))^(~p)⨸ ((~b) - (~d)*(~x))^(2*((~m) + 1)), (~x), (~x), ((~a) + (~b)*(~x))⨸((~c) + (~d)*(~x)), "3_2_2_19") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.3 u log(e (f (a+b x)^p (c+d x)^q)^r)^s.jl b/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.3 u log(e (f (a+b x)^p (c+d x)^q)^r)^s.jl new file mode 100644 index 0000000..2185176 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.2/3.2.3 u log(e (f (a+b x)^p (c+d x)^q)^r)^s.jl @@ -0,0 +1,132 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.2.3 u log(e (f (a+b x)^p (c+d x)^q)^r)^s *) +("3_2_3_1", +@rule ∫((~!u)*log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))^(~!s),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~r), (~s), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + ext_isinteger((~p)) ? +∫((~u)*log((~e)*((~b)^(~p)*(~f)⨸(~d)^(~p)*((~c) + (~d)*(~x))^((~p) + (~q)))^(~r))^(~s), (~x)) : nothing) + +("3_2_3_2", +@rule ∫(log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))^(~!s),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~r), (~s), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~p) + (~q), 0) && + igt((~s), 0) && + lt((~s), 4) ? +((~a) + (~b)*(~x))*log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^(~s)⨸(~b) - (~r)*(~s)*((~p) + (~q))* ∫(log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^((~s) - 1), (~x)) + (~q)*(~r)*(~s)*((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^((~s) - 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_3_3", +@rule ∫(log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))/((~!g) + (~!h)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~q), (~r), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +log((~g) + (~h)*(~x))*log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))⨸(~h) - (~b)*(~p)*(~r)⨸(~h)*∫(log((~g) + (~h)*(~x))⨸((~a) + (~b)*(~x)), (~x)) - (~d)*(~q)*(~r)⨸(~h)*∫(log((~g) + (~h)*(~x))⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_3_4", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)* log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~p), (~q), (~r), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~m), -1) ? +((~g) + (~h)*(~x))^((~m) + 1)* log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))⨸((~h)*((~m) + 1)) - (~b)*(~p)*(~r)⨸((~h)*((~m) + 1))*∫(((~g) + (~h)*(~x))^((~m) + 1)⨸((~a) + (~b)*(~x)), (~x)) - (~d)*(~q)*(~r)⨸((~h)*((~m) + 1))*∫(((~g) + (~h)*(~x))^((~m) + 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_3_5", +@rule ∫(log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))^2/((~!g) + (~!h)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~q), (~r), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~b)*(~g) - (~a)*(~h), 0) ? +∫((log(((~a) + (~b)*(~x))^((~p)*(~r))) + log(((~c) + (~d)*(~x))^((~q)*(~r))))^2⨸((~g) + (~h)*(~x)), (~x)) + (log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r)) - log(((~a) + (~b)*(~x))^((~p)*(~r))) - log(((~c) + (~d)*(~x))^((~q)*(~r))))* (2*∫(log(((~c) + (~d)*(~x))^((~q)*(~r)))⨸((~g) + (~h)*(~x)), (~x)) + ∫((log(((~a) + (~b)*(~x))^((~p)*(~r))) - log(((~c) + (~d)*(~x))^((~q)*(~r))) + log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r)))⨸((~g) + (~h)*(~x)), (~x))) : nothing) + +#(* Int[Log[e_.*(f_.*(a_.+b_.*x_)^p_.*(c_.+d_.*x_)^q_.)^r_.]^2/(g_.+h_. *x_),x_Symbol] := Int[(Log[(a+b*x)^(p*r)]+Log[(c+d*x)^(q*r)])^2/(g+h*x),x] + (Log[e*(f*(a+b*x)^p*(c+d*x)^q)^r]-Log[(a+b*x)^(p*r)]-Log[(c+d*x)^(q* r)])* Int[(Log[(a+b*x)^(p*r)]+Log[(c+d*x)^(q*r)]+Log[e*(f*(a+b*x)^p*(c+ d*x)^q)^r])/(g+h*x),x] /; FreeQ[{a,b,c,d,e,f,g,h,p,q,r},x] && NeQ[b*c-a*d,0] && EqQ[b*g-a*h,0] *) +("3_2_3_6", +@rule ∫(log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))^2/((~!g) + (~!h)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~q), (~r), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +log((~g) + (~h)*(~x))*log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^2⨸(~h) - 2*(~b)*(~p)*(~r)⨸(~h)* ∫(log((~g) + (~h)*(~x))*log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))⨸((~a) + (~b)*(~x)), (~x)) - 2*(~d)*(~q)*(~r)⨸(~h)* ∫(log((~g) + (~h)*(~x))*log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_3_7", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)* log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))^(~s),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~p), (~q), (~r), (~s), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~s), 0) && + !eq((~m), -1) ? +((~g) + (~h)*(~x))^((~m) + 1)* log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^(~s)⨸((~h)*((~m) + 1)) - (~b)*(~p)*(~r)*(~s)⨸((~h)*((~m) + 1))* ∫(((~g) + (~h)*(~x))^((~m) + 1)* log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^((~s) - 1)⨸((~a) + (~b)*(~x)), (~x)) - (~d)*(~q)*(~r)*(~s)⨸((~h)*((~m) + 1))* ∫(((~g) + (~h)*(~x))^((~m) + 1)* log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^((~s) - 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_3_8", +@rule ∫(((~!s) + (~!t)*log((~!i)*((~!g) + (~!h)*(~x))^(~!n)))^(~!m)* log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))/((~!j) + (~!k)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~k), (~s), (~t), (~m), (~n), (~p), (~q), (~r), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~h)*(~j) - (~g)*(~k), 0) && + igt((~m), 0) ? +((~s) + (~t)*log((~i)*((~g) + (~h)*(~x))^(~n)))^((~m) + 1)* log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))⨸((~k)*(~n)*(~t)*((~m) + 1)) - (~b)*(~p)*(~r)⨸((~k)*(~n)*(~t)*((~m) + 1))* ∫(((~s) + (~t)*log((~i)*((~g) + (~h)*(~x))^(~n)))^((~m) + 1)⨸((~a) + (~b)*(~x)), (~x)) - (~d)*(~q)*(~r)⨸((~k)*(~n)*(~t)*((~m) + 1))* ∫(((~s) + (~t)*log((~i)*((~g) + (~h)*(~x))^(~n)))^((~m) + 1)⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("3_2_3_9", +@rule ∫(((~!s) + (~!t)*log((~!i)*((~!g) + (~!h)*(~x))^(~!n)))* log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))/((~!j) + (~!k)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~k), (~s), (~t), (~n), (~p), (~q), (~r), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r)) - log(((~a) + (~b)*(~x))^((~p)*(~r))) - log(((~c) + (~d)*(~x))^((~q)*(~r))))* ∫(((~s) + (~t)*log((~i)*((~g) + (~h)*(~x))^(~n)))⨸((~j) + (~k)*(~x)), (~x)) + ∫((log(((~a) + (~b)*(~x))^((~p)*(~r)))*((~s) + (~t)*log((~i)*((~g) + (~h)*(~x))^(~n))))⨸((~j) + (~k)*(~x)), (~x)) + ∫((log(((~c) + (~d)*(~x))^((~q)*(~r)))*((~s) + (~t)*log((~i)*((~g) + (~h)*(~x))^(~n))))⨸((~j) + (~k)*(~x)), (~x)) : nothing) + +# ("3_2_3_10", +# @rule ∫(((~!s) + (~!t)*log((~!i)*((~!g) + (~!h)*(~x))^(~!n)))^(~!m)* log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))^ (~!u)/((~!j) + (~!k)*(~x)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~k), (~s), (~t), (~m), (~n), (~p), (~q), (~r), (~u), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) ? +# Unintegrable[((~s) + (~t)*log((~i)*((~g) + (~h)*(~x))^(~n)))^(~m)* log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^(~u)⨸((~j) + (~k)*(~x)), (~x)] : nothing) + +# Nested conditions found, not translating rule: +#Int[u_*Log[v_]* Log[e_.*(f_.*(a_. + b_.*x_)^p_.*(c_. + d_.*x_)^q_.)^r_.]^s_., x_Symbol] := With[{g = Simplify[(v - 1)*(c + d*x)/(a + b*x)], h = Simplify[u*(a + b*x)*(c + d*x)]}, -h*PolyLog[2, 1 - v]* Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s/(b*c - a*d) + h*p*r*s* Int[PolyLog[2, 1 - v]* Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1)/((a + b*x)*(c + d*x)), x] /; FreeQ[{g, h}, x]] /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && IGtQ[s, 0] && EqQ[p + q, 0] + +# Nested conditions found, not translating rule: +#Int[v_*Log[i_.*(j_.*(g_. + h_.*x_)^t_.)^u_.]* Log[e_.*(f_.*(a_. + b_.*x_)^p_.*(c_. + d_.*x_)^q_.)^r_.]^s_., x_Symbol] := With[{k = Simplify[v*(a + b*x)*(c + d*x)]}, k*Log[i*(j*(g + h*x)^t)^u]* Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s + 1)/(p* r*(s + 1)*(b*c - a*d)) - k*h*t*u/(p*r*(s + 1)*(b*c - a*d))* Int[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s + 1)/(g + h*x), x] /; FreeQ[k, x]] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, p, q, r, s, t, u}, x] && NeQ[b*c - a*d, 0] && EqQ[p + q, 0] && NeQ[s, -1] + +# Nested conditions found, not translating rule: +#Int[u_*PolyLog[n_, v_]* Log[e_.*(f_.*(a_. + b_.*x_)^p_.*(c_. + d_.*x_)^q_.)^r_.]^s_., x_Symbol] := With[{g = Simplify[v*(c + d*x)/(a + b*x)], h = Simplify[u*(a + b*x)*(c + d*x)]}, h*PolyLog[n + 1, v]* Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s/(b*c - a*d) - h*p*r*s* Int[PolyLog[n + 1, v]* Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1)/((a + b*x)*(c + d*x)), x] /; FreeQ[{g, h}, x]] /; FreeQ[{a, b, c, d, e, f, n, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && IGtQ[s, 0] && EqQ[p + q, 0] + +("3_2_3_14", +@rule ∫(((~!a) + (~!b)*log((~!c)*sqrt((~!d) + (~!e)*(~x))/sqrt((~!f) + (~!g)*(~x))))^ (~!n)/((~!A) + (~!B)*(~x) + (~!C)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~B), (~C), (~n), (~x)) && + eq((~C)*(~d)*(~f) - (~A)*(~e)*(~g), 0) && + eq((~B)*(~e)*(~g) - (~C)*((~e)*(~f) + (~d)*(~g)), 0) ? +2*(~e)*(~g)⨸((~C)*((~e)*(~f) - (~d)*(~g)))* int_and_subst(((~a) + (~b)*log((~c)*(~x)))^(~n)⨸(~x), (~x), (~x), sqrt((~d) + (~e)*(~x))⨸sqrt((~f) + (~g)*(~x)), "3_2_3_14") : nothing) + +("3_2_3_15", +@rule ∫(((~!a) + (~!b)*log((~!c)*sqrt((~!d) + (~!e)*(~x))/sqrt((~!f) + (~!g)*(~x))))^ (~!n)/((~!A) + (~!C)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~A), (~C), (~n), (~x)) && + eq((~C)*(~d)*(~f) - (~A)*(~e)*(~g), 0) && + eq((~e)*(~f) + (~d)*(~g), 0) ? +(~g)⨸((~C)*(~f))* int_and_subst(((~a) + (~b)*log((~c)*(~x)))^(~n)⨸(~x), (~x), (~x), sqrt((~d) + (~e)*(~x))⨸sqrt((~f) + (~g)*(~x)), "3_2_3_15") : nothing) + +# Nested conditions found, not translating rule: +#Int[RFx_.*Log[e_.*(f_.*(a_. + b_.*x_)^p_.*(c_. + d_.*x_)^q_.)^r_.], x_Symbol] := p*r*Int[RFx*Log[a + b*x], x] + q*r*Int[RFx*Log[c + d*x], x] - (p*r*Log[a + b*x] + q*r*Log[c + d*x] - Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r])*Int[RFx, x] /; FreeQ[{a, b, c, d, e, f, p, q, r}, x] && RationalFunctionQ[RFx, x] && NeQ[b*c - a*d, 0] && Not[ MatchQ[RFx, u_.*(a + b*x)^m_.*(c + d*x)^n_. /; IntegersQ[m, n]]] + +#(* Int[RFx_*Log[e_.*(f_.*(a_.+b_.*x_)^p_.*(c_.+d_.*x_)^q_.)^r_.],x_ Symbol] := With[{u=IntHide[RFx,x]}, u*Log[e*(f*(a+b*x)^p*(c+d*x)^q)^r] - b*p*r*Int[u/(a+b*x),x] - d*q*r*Int[u/(c+d*x),x] /; NonsumQ[u]] /; FreeQ[{a,b,c,d,e,f,p,q,r},x] && RationalFunctionQ[RFx,x] && NeQ[b*c-a*d,0] *) +# Nested conditions found, not translating rule: +#Int[RFx_*Log[e_.*(f_.*(a_. + b_.*x_)^p_.*(c_. + d_.*x_)^q_.)^r_.]^s_., x_Symbol] := With[{u = ExpandIntegrand[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && RationalFunctionQ[RFx, x] && IGtQ[s, 0] + +# ("3_2_3_18", +# @rule ∫(RFx_*log((~!e)*((~!f)*((~!a) + (~!b)*(~x))^(~!p)*((~!c) + (~!d)*(~x))^(~!q))^(~!r))^(~!s),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~q), (~r), (~s), (~x)) && +# RationalFunctionQ[RFx, (~x)] ? +# Unintegrable[RFx*log((~e)*((~f)*((~a) + (~b)*(~x))^(~p)*((~c) + (~d)*(~x))^(~q))^(~r))^(~s), (~x)] : nothing) + +("3_2_3_19", +@rule ∫((~!u)*log((~!e)*((~!f)*(~v)^(~!p)*(~w)^(~!q))^(~!r))^(~!s),(~x)) => + !contains_var((~e), (~f), (~p), (~q), (~r), (~s), (~x)) && + linear((~v), (~w), (~x)) && + !(linear_without_simplify((~v), (~w), (~x))) && + algebraic_function((~u), (~x)) ? +∫((~u)*log((~e)*((~f)*expand_to_sum((~v), (~x))^(~p)*expand_to_sum((~w), (~x))^(~q))^(~r))^(~s), (~x)) : nothing) + +("3_2_3_20", +@rule ∫((~!u)*log((~!e)*((~!f)*((~g) + (~v)/(~w)))^(~!r))^(~!s),(~x)) => + !contains_var((~e), (~f), (~g), (~r), (~s), (~x)) && + linear((~w), (~x)) && + ( + !contains_var((~v), (~x)) || + linear((~v), (~x)) + ) && + algebraic_function((~u), (~x)) ? +∫((~u)*log((~e)*((~f)*expand_to_sum((~v) + (~g)*(~w), (~x))⨸expand_to_sum((~w), (~x)))^(~r))^(~s), (~x)) : nothing) + +#(* Int[Log[g_.*(h_.*(a_.+b_.*x_)^p_.)^q_.]*Log[i_.*(j_.*(c_.+d_.*x_)^ r_.)^s_.]/(e_+f_.*x_),x_Symbol] := 1/f*Subst[Int[Log[g*(h*Simp[-(b*e-a*f)/f+b*x/f,x]^p)^q]*Log[i*(j* Simp[-(d*e-c*f)/f+d*x/f,x]^r)^s]/x,x],x,e+f*x] /; FreeQ[{a,b,c,d,e,f,g,h,i,j,p,q,r,s},x] *) + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.3 u (a+b log(c (d+e x)^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.3 u (a+b log(c (d+e x)^n))^p.jl new file mode 100644 index 0000000..7fd86b6 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.3 u (a+b log(c (d+e x)^n))^p.jl @@ -0,0 +1,468 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.3 u (a+b log(c (d+e x)^n))^p *) +("3_3_1", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) ? +1⨸(~e)*int_and_subst(((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x), (~x), (~d) + (~e)*(~x), "3_3_1") : nothing) + +("3_3_2", +@rule ∫(((~f) + (~!g)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~x)) && + eq((~e)*(~f) - (~d)*(~g), 0) ? +1⨸(~e)*int_and_subst(((~f)*(~x)⨸(~d))^(~q)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x), (~x), (~d) + (~e)*(~x), "3_3_2") : nothing) + +("3_3_3", +@rule ∫(log((~!c)*((~d) + (~!e)*(~x)^(~!n)))/(~x),(~x)) => + !contains_var((~c), (~d), (~e), (~n), (~x)) && + eq((~c)*(~d), 1) ? +-PolyLog.reli(2, -(~c)*(~e)*(~x)^(~n))⨸(~n) : nothing) + +("3_3_4", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~c)*(~d), 0) ? +((~a) + (~b)*log((~c)*(~d)))*log((~x)) + (~b)*∫(log(1 + (~e)*(~x)⨸(~d))⨸(~x), (~x)) : nothing) + +("3_3_5", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~g) + (~c)*((~e)*(~f) - (~d)*(~g)), 0) ? +1⨸(~g)*int_and_subst(((~a) + (~b)*log(1 + (~c)*(~e)*(~x)⨸(~g)))⨸(~x), (~x), (~x), (~f) + (~g)*(~x), "3_3_5") : nothing) + +("3_3_6", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) ? +log((~e)*((~f) + (~g)*(~x))⨸((~e)*(~f) - (~d)*(~g)))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸(~g) - (~b)*(~e)*(~n)⨸(~g)*∫(log(((~e)*((~f) + (~g)*(~x)))⨸((~e)*(~f) - (~d)*(~g)))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_7", +@rule ∫(((~!f) + (~!g)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~q), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + !eq((~q), -1) ? +((~f) + (~g)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸((~g)*((~q) + 1)) - (~b)*(~e)*(~n)⨸((~g)*((~q) + 1))*∫(((~f) + (~g)*(~x))^((~q) + 1)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_8", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~p)/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + igt((~p), 1) ? +log((~e)*((~f) + (~g)*(~x))⨸((~e)*(~f) - (~d)*(~g)))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)⨸(~g) - (~b)*(~e)*(~n)*(~p)⨸(~g)* ∫(log(((~e)*((~f) + (~g)*(~x)))⨸((~e)*(~f) - (~d)*(~g)))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_9", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~p)/((~!f) + (~!g)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + gt((~p), 0) ? +((~d) + (~e)*(~x))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)⨸(((~e)*(~f) - (~d)*(~g))*((~f) + (~g)*(~x))) - (~b)*(~e)*(~n)*(~p)⨸((~e)*(~f) - (~d)*(~g))* ∫(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) - 1)⨸((~f) + (~g)*(~x)), (~x)) : nothing) + +("3_3_10", +@rule ∫(((~!f) + (~!g)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~q), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + gt((~p), 0) && + !eq((~q), -1) && + ext_isinteger(2*(~p), 2*(~q)) && + ( + !(igt((~q), 0)) || + eq((~p), 2) && + !eq((~q), 1) + ) ? +((~f) + (~g)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)⨸((~g)*((~q) + 1)) - (~b)*(~e)*(~n)*(~p)⨸((~g)*((~q) + 1))* ∫(((~f) + (~g)*(~x))^((~q) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_11", +@rule ∫(((~!f) + (~!g)*(~x))^(~!q)/((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + igt((~q), 0) ? +∫(ext_expand(((~f) + (~g)*(~x))^(~q)⨸((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))), (~x)), (~x)) : nothing) + +("3_3_12", +@rule ∫(((~!f) + (~!g)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + lt((~p), -1) && + gt((~q), 0) ? +((~d) + (~e)*(~x))*((~f) + (~g)*(~x))^ (~q)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) + 1)⨸((~b)*(~e)*(~n)*((~p) + 1)) + (~q)*((~e)*(~f) - (~d)*(~g))⨸((~b)*(~e)*(~n)*((~p) + 1))* ∫(((~f) + (~g)*(~x))^((~q) - 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) + 1), (~x)) - ((~q) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫(((~f) + (~g)*(~x))^(~q)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) + 1), (~x)) : nothing) + +("3_3_13", +@rule ∫(((~!f) + (~!g)*(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~e)*(~f) - (~d)*(~g), 0) && + igt((~q), 0) ? +∫(ext_expand(((~f) + (~g)*(~x))^(~q)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)), (~x)) : nothing) + +("3_3_14", +@rule ∫(log((~c)/((~d) + (~!e)*(~x)))/((~f) + (~!g)*(~x)^2),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~c), 2*(~d)) && + eq((~e)^2*(~f) + (~d)^2*(~g), 0) ? +-(~e)⨸(~g)*int_and_subst(log(2*(~d)*(~x))⨸(1 - 2*(~d)*(~x)), (~x), (~x), 1⨸((~d) + (~e)*(~x)), "3_3_14") : nothing) + +("3_3_15", +@rule ∫(((~!a) + (~!b)*log((~c)/((~d) + (~!e)*(~x))))/((~f) + (~!g)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e)^2*(~f) + (~d)^2*(~g), 0) && + gt((~c)/(2*(~d)), 0) ? +((~a) + (~b)*log((~c)⨸(2*(~d))))*∫(1⨸((~f) + (~g)*(~x)^2), (~x)) + (~b)*∫(log(2*(~d)⨸((~d) + (~e)*(~x)))⨸((~f) + (~g)*(~x)^2), (~x)) : nothing) + +("3_3_16", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))/sqrt((~f) + (~!g)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + gt((~f), 0) ? +let + u = ∫(1⨸sqrt((~f) + (~g)*(~x)^2), (~x)) + + u*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))) - (~b)*(~e)*(~n)*∫(ext_simplify(u⨸((~d) + (~e)*(~x)), (~x)), (~x)) +end : nothing) + +("3_3_17", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))/(sqrt((~f1) + (~!g1)*(~x))* sqrt((~f2) + (~!g2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f1), (~g1), (~f2), (~g2), (~n), (~x)) && + eq((~f2)*(~g1) + (~f1)*(~g2), 0) && + gt((~f1), 0) && + gt((~f2), 0) ? +let + u = ∫(1⨸sqrt((~f1)*(~f2) + (~g1)*(~g2)*(~x)^2), (~x)) + + u*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))) - (~b)*(~e)*(~n)*∫(ext_simplify(u⨸((~d) + (~e)*(~x)), (~x)), (~x)) +end : nothing) + +("3_3_18", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))/sqrt((~f) + (~!g)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + !(gt((~f), 0)) ? +sqrt(1 + (~g)⨸(~f)*(~x)^2)⨸sqrt((~f) + (~g)*(~x)^2)* ∫(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸sqrt(1 + (~g)⨸(~f)*(~x)^2), (~x)) : nothing) + +("3_3_19", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))/(sqrt((~f1) + (~!g1)*(~x))* sqrt((~f2) + (~!g2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f1), (~g1), (~f2), (~g2), (~n), (~x)) && + eq((~f2)*(~g1) + (~f1)*(~g2), 0) ? +sqrt(1 + (~g1)*(~g2)⨸((~f1)*(~f2))*(~x)^2)⨸(sqrt((~f1) + (~g1)*(~x))*sqrt((~f2) + (~g2)*(~x)))* ∫(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸sqrt(1 + (~g1)*(~g2)⨸((~f1)*(~f2))*(~x)^2), (~x)) : nothing) + +("3_3_20", +@rule ∫(((~!f) + (~!g)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~x)) && + isfraction((~r)) && + igt((~p), 0) ? +let + k = ext_den((~r)) + + k*int_and_subst((~x)^(k - 1)*((~f) + (~g)*(~x)^(k*(~r)))^(~q)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^k)^(~n)))^(~p), (~x), (~x), (~x)^(1⨸k), "3_3_20") +end : nothing) + +("3_3_21", +@rule ∫(((~f) + (~!g)*(~x)^(~r))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~r), (~x)) && + igt((~p), 0) && + ext_isinteger((~q)) && + ( + gt((~q), 0) || + ext_isinteger((~r)) && + !eq((~r), 1) + ) ? +∫(ext_expand(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), ((~f) + (~g)*(~x)^(~r))^(~q), (~x)), (~x)) : nothing) + +("3_3_22", +@rule ∫((~x)^(~!m)*log((~!c)*((~d) + (~!e)*(~x)))/((~f) + (~!g)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~c)*(~d), 1) && + ext_isinteger((~m)) ? +∫(ext_expand(log((~c)*((~d) + (~e)*(~x))), (~x)^(~m)⨸((~f) + (~g)*(~x)), (~x)), (~x)) : nothing) + +("3_3_23", +@rule ∫(((~!f) + (~!g)*(~x))^(~!q)*((~!h) + (~!i)*(~x))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~n), (~p), (~q), (~r), (~x)) && + eq((~e)*(~f) - (~d)*(~g), 0) && + ( + igt((~p), 0) || + igt((~r), 0) + ) && + ext_isinteger(2*(~r)) ? +1⨸(~e)*int_and_subst(((~g)*(~x)⨸(~e))^(~q)*(((~e)*(~h) - (~d)*(~i))⨸(~e) + (~i)*(~x)⨸(~e))^(~r)*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x), (~x), (~d) + (~e)*(~x), "3_3_23") : nothing) + +("3_3_24", +@rule ∫((~x)^(~!m)*((~f) + (~g)/(~x))^(~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~x)) && + eq((~m), (~q)) && + ext_isinteger((~q)) ? +∫(((~g) + (~f)*(~x))^(~q)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)) : nothing) + +("3_3_25", +@rule ∫((~x)^(~!m)*((~!f) + (~!g)*(~x)^(~!r))^ (~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~q), (~r), (~x)) && + eq((~m), (~r) - 1) && + !eq((~q), -1) && + igt((~p), 0) ? +((~f) + (~g)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)⨸((~g)*(~r)*((~q) + 1)) - (~b)*(~e)*(~n)*(~p)⨸((~g)*(~r)*((~q) + 1))* ∫(((~f) + (~g)*(~x)^(~r))^((~q) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_26", +@rule ∫((~x)^(~!m)*((~f) + (~!g)*(~x)^(~!r))^ (~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~q), (~r), (~x)) && + ext_isinteger((~m)) && + ext_isinteger((~q)) && + ext_isinteger((~r)) ? +let + u = ∫((~x)^(~m)*((~f) + (~g)*(~x)^(~r))^(~q), (~x)) + + !contains_inverse_function(u, (~x)) ? + dist(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))), u, (~x)) - (~b)*(~e)*(~n)*∫(ext_simplify(u⨸((~d) + (~e)*(~x)), (~x)), (~x)) : nothing +end : nothing) + +("3_3_27", +@rule ∫((~x)^(~!m)*((~!f) + (~!g)*(~x)^(~r))^ (~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~x)) && + isfraction((~r)) && + igt((~p), 0) && + ext_isinteger((~m)) ? +let + k = ext_den((~r)) + + k*int_and_subst((~x)^(k*((~m) + 1) - 1)*((~f) + (~g)*(~x)^(k*(~r)))^ (~q)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^k)^(~n)))^(~p), (~x), (~x), (~x)^(1⨸k), "3_3_27") +end : nothing) + +("3_3_28", +@rule ∫(((~!h)*(~x))^(~!m)*((~f) + (~!g)*(~x)^(~!r))^ (~!q)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger((~m)) && + ext_isinteger((~q)) ? +∫(ext_expand(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^ (~p), ((~h)*(~x))^(~m)*((~f) + (~g)*(~x)^(~r))^(~q), (~x)), (~x)) : nothing) + +("3_3_29", +@rule ∫((~Px)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + poly((~Px), (~x)) ? +∫(ext_expand((~Px)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)), (~x)) : nothing) + +("3_3_30", +@rule ∫((~RF)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + rational_function((~RF), (~x)) && + ext_isinteger((~p)) ? +let + u = ext_expand(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~RF), (~x)) + + issum(u) ? + ∫(u, (~x)) : nothing +end : nothing) + +("3_3_31", +@rule ∫((~RF)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + rational_function((~RF), (~x)) && + ext_isinteger((~p)) ? +let + u = ext_expand((~RF)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)) + + issum(u) ? + ∫(u, (~x)) : nothing +end : nothing) + +# ("3_3_32", +# @rule ∫((~AF)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && +# algebraic_function((~AF), (~x), True) ? +# Unintegrable[(~AF)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("3_3_33", +@rule ∫((~u)^(~!q)*((~!a) + (~!b)*log((~!c)*(~v)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~p), (~q), (~x)) && + isbinomial((~u), (~x)) && + linear((~v), (~x)) && + !( + binomial_without_simplify((~u), (~x)) && + linear_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~q)*((~a) + (~b)*log((~c)*expand_to_sum((~v), (~x))^(~n)))^(~p), (~x)) : nothing) + +("3_3_34", +@rule ∫(log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) ? +-(~x)*((~m) - log((~f)*(~x)^(~m)))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))) + (~b)*(~e)*(~m)*(~n)*∫((~x)⨸((~d) + (~e)*(~x)), (~x)) - (~b)*(~e)*(~n)*∫(((~x)*log((~f)*(~x)^(~m)))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_35", +@rule ∫(log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~p), 1) ? +let + u = ∫(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)) + + dist(log((~f)*(~x)^(~m)), u, (~x)) - (~m)*∫(dist(1⨸(~x), u, (~x)), (~x)) +end : nothing) + +# ("3_3_36", +# @rule ∫(log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[log((~f)*(~x)^(~m))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("3_3_37", +@rule ∫(log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) ? +log((~f)*(~x)^(~m))^2*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸(2*(~m)) - (~b)*(~e)*(~n)⨸(2*(~m))*∫(log((~f)*(~x)^(~m))^2⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_38", +@rule ∫(((~!g)*(~x))^(~!q)* log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~q), (~x)) && + !eq((~q), -1) ? +-1⨸((~g)*((~q) + 1))*((~m)*((~g)*(~x))^((~q) + 1)⨸((~q) + 1) - ((~g)*(~x))^((~q) + 1)* log((~f)*(~x)^(~m)))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))) + (~b)*(~e)*(~m)*(~n)⨸((~g)*((~q) + 1)^2)*∫(((~g)*(~x))^((~q) + 1)⨸((~d) + (~e)*(~x)), (~x)) - (~b)*(~e)*(~n)⨸((~g)*((~q) + 1))*∫(((~g)*(~x))^((~q) + 1)*log((~f)*(~x)^(~m))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_39", +@rule ∫(log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~p), 0) ? +log((~f)*(~x)^(~m))^2*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)⨸(2*(~m)) - (~b)*(~e)*(~n)*(~p)⨸(2*(~m))* ∫(log((~f)*(~x)^(~m))^2*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) - 1)⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_40", +@rule ∫(((~!g)*(~x))^(~!q)* log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~q), (~x)) && + igt((~p), 1) && + igt((~q), 0) ? +let + u = ∫(((~g)*(~x))^(~q)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)) + + dist(log((~f)*(~x)^(~m)), u, (~x)) - (~m)*∫(dist(1⨸(~x), u, (~x)), (~x)) +end : nothing) + +#(* Int[(g_.*x_)^q_.*Log[f_.*x_^m_.]*(a_.+b_.*Log[c_.*(d_+e_.*x_)^n_.]) ^p_,x_Symbol] := With[{u=IntHide[(a+b*Log[c*(d+e*x)^n])^p,x]}, Dist[(g*x)^q*Log[f*x^m],u,x] - g*m*Int[Dist[(g*x)^(q-1),u,x],x] - g*q*Int[Dist[(g*x)^(q-1)*Log[f*x^m],u,x],x]] /; FreeQ[{a,b,c,d,e,f,g,m,n,q},x] && IGtQ[p,1] *) +# ("3_3_41", +# @rule ∫(((~!g)*(~x))^(~!q)* log((~!f)*(~x)^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~x)) ? +# Unintegrable[((~g)*(~x))^(~q)*log((~f)*(~x)^(~m))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("3_3_42", +@rule ∫(log((~!f)*((~!g) + (~!h)*(~x))^(~!m))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~x)) && + eq((~e)*(~f) - (~d)*(~g), 0) ? +1⨸(~e)*int_and_subst(log((~f)*((~g)*(~x)⨸(~d))^(~m))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p), (~x), (~x), (~d) + (~e)*(~x), "3_3_42") : nothing) + +("3_3_43", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))*((~!f) + (~!g)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) ? +(~x)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))*((~f) + (~g)*log((~c)*((~d) + (~e)*(~x))^(~n))) - (~e)*(~n)* ∫(((~x)*((~b)*(~f) + (~a)*(~g) + 2*(~b)*(~g)*log((~c)*((~d) + (~e)*(~x))^(~n))))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_44", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^ (~!p)*((~!f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~m), (~n), (~x)) && + igt((~p), 0) ? +(~x)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m))) - (~g)*(~j)*(~m)*∫((~x)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)⨸((~i) + (~j)*(~x)), (~x)) - (~b)*(~e)*(~n)*(~p)* ∫((~x)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) - 1)*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m)))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +# ("3_3_45", +# @rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^ (~!p)*((~!f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^ (~p)*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m)))^(~q), (~x)] : nothing) + +("3_3_46", +@rule ∫(((~!k) + (~!l)*(~x))^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^ (~!p)*((~!f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~k), (~l), (~n), (~p), (~r), (~x)) && + eq((~e)*(~k) - (~d)*(~l), 0) ? +1⨸(~e)*int_and_subst(((~k)*(~x)⨸(~d))^(~r)*((~a) + (~b)*log((~c)*(~x)^(~n)))^ (~p)*((~f) + (~g)*log((~h)*(((~e)*(~i) - (~d)*(~j))⨸(~e) + (~j)*(~x)⨸(~e))^(~m))), (~x), (~x), (~d) + (~e)*(~x), "3_3_46") : nothing) + +("3_3_47", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))*((~!f) + (~!g)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) ? +log((~x))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))*((~f) + (~g)*log((~c)*((~d) + (~e)*(~x))^(~n))) - (~e)*(~n)* ∫((log((~x))*((~b)*(~f) + (~a)*(~g) + 2*(~b)*(~g)*log((~c)*((~d) + (~e)*(~x))^(~n))))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_48", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))*((~!f) + (~!g)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~m), (~x)) && + !eq((~m), -1) ? +(~x)^((~m) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))*((~f) + (~g)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸((~m) + 1) - (~e)*(~n)⨸((~m) + 1)* ∫(((~x)^((~m) + 1)*((~b)*(~f) + (~a)*(~g) + 2*(~b)*(~g)*log((~c)*((~d) + (~e)*(~x))^(~n))))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_49", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))*((~!f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~m), (~n), (~x)) && + eq((~e)*(~i) - (~d)*(~j), 0) ? +log((~x))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m))) - (~e)*(~g)*(~m)*∫(log((~x))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸((~d) + (~e)*(~x)), (~x)) - (~b)*(~j)*(~n)*∫(log((~x))*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m)))⨸((~i) + (~j)*(~x)), (~x)) : nothing) + +("3_3_50", +@rule ∫(log((~a) + (~!b)*(~x))*log((~c) + (~!d)*(~x))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +log(-(~b)*(~x)⨸(~a))*log((~a) + (~b)*(~x))*log((~c) + (~d)*(~x)) - 1⨸2*(log(-(~b)*(~x)⨸(~a)) - log(-(~d)*(~x)⨸(~c)))*(log((~a) + (~b)*(~x)) + log((~a)*((~c) + (~d)*(~x))⨸((~c)*((~a) + (~b)*(~x)))))^2 + 1⨸2*(log(-(~b)*(~x)⨸(~a)) - log(-((~b)*(~c) - (~a)*(~d))*(~x)⨸((~a)*((~c) + (~d)*(~x)))) + log(((~b)*(~c) - (~a)*(~d))⨸((~b)*((~c) + (~d)*(~x)))))* log((~a)*((~c) + (~d)*(~x))⨸((~c)*((~a) + (~b)*(~x))))^2 + (log((~c) + (~d)*(~x)) - log((~a)*((~c) + (~d)*(~x))⨸((~c)*((~a) + (~b)*(~x)))))* PolyLog.reli(2, 1 + (~b)*(~x)⨸(~a)) + (log((~a) + (~b)*(~x)) + log((~a)*((~c) + (~d)*(~x))⨸((~c)*((~a) + (~b)*(~x)))))* PolyLog.reli(2, 1 + (~d)*(~x)⨸(~c)) - log((~a)*((~c) + (~d)*(~x))⨸((~c)*((~a) + (~b)*(~x))))* PolyLog.reli(2, (~d)*((~a) + (~b)*(~x))⨸((~b)*((~c) + (~d)*(~x)))) + log((~a)*((~c) + (~d)*(~x))⨸((~c)*((~a) + (~b)*(~x))))* PolyLog.reli(2, (~c)*((~a) + (~b)*(~x))⨸((~a)*((~c) + (~d)*(~x)))) - PolyLog.reli(3, 1 + (~b)*(~x)⨸(~a)) - PolyLog.reli(3, 1 + (~d)*(~x)⨸(~c)) - PolyLog.reli(3, (~d)*((~a) + (~b)*(~x))⨸((~b)*((~c) + (~d)*(~x)))) + PolyLog.reli(3, (~c)*((~a) + (~b)*(~x))⨸((~a)*((~c) + (~d)*(~x)))) : nothing) + +("3_3_51", +@rule ∫(log((~v))*log((~w))/(~x),(~x)) => + linear((~v), (~w), (~x)) && + !(linear_without_simplify((~v), (~w), (~x))) ? +∫(log(expand_to_sum((~v), (~x)))*log(expand_to_sum((~w), (~x)))⨸(~x), (~x)) : nothing) + +("3_3_52", +@rule ∫(log((~!c)*((~d) + (~!e)*(~x))^(~!n))*log((~!h)*((~!i) + (~!j)*(~x))^(~!m))/(~x),(~x)) => + !contains_var((~c), (~d), (~e), (~h), (~i), (~j), (~m), (~n), (~x)) && + !eq((~e)*(~i) - (~d)*(~j), 0) && + !eq((~i) + (~j)*(~x), (~h)*((~i) + (~j)*(~x))^(~m)) ? +(~m)*∫(log((~i) + (~j)*(~x))*log((~c)*((~d) + (~e)*(~x))^(~n))⨸(~x), (~x)) - ((~m)*log((~i) + (~j)*(~x)) - log((~h)*((~i) + (~j)*(~x))^(~m)))* ∫(log((~c)*((~d) + (~e)*(~x))^(~n))⨸(~x), (~x)) : nothing) + +("3_3_53", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))*((~f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~m), (~n), (~x)) && + !eq((~e)*(~i) - (~d)*(~j), 0) ? +(~f)*∫(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸(~x), (~x)) + (~g)*∫(log((~h)*((~i) + (~j)*(~x))^(~m))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))⨸(~x), (~x)) : nothing) + +("3_3_54", +@rule ∫((~x)^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^ (~!p)*((~!f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~m), (~n), (~x)) && + igt((~p), 0) && + ext_isinteger((~r)) && + ( + eq((~p), 1) || + gt((~r), 0) + ) && + !eq((~r), -1) ? +(~x)^((~r) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^ (~p)*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m)))⨸((~r) + 1) - (~g)*(~j)*(~m)⨸((~r) + 1)* ∫((~x)^((~r) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^(~p)⨸((~i) + (~j)*(~x)), (~x)) - (~b)*(~e)*(~n)*(~p)⨸((~r) + 1)* ∫((~x)^((~r) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^((~p) - 1)*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m)))⨸((~d) + (~e)*(~x)), (~x)) : nothing) + +("3_3_55", +@rule ∫(((~k) + (~!l)*(~x))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))*((~!f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~k), (~l), (~m), (~n), (~x)) && + ext_isinteger((~r)) ? +1⨸(~l)*int_and_subst((~x)^(~r)*((~a) + (~b)*log((~c)*(-((~e)*(~k) - (~d)*(~l))⨸(~l) + (~e)*(~x)⨸(~l))^(~n)))*((~f) + (~g)*log((~h)*(-((~j)*(~k) - (~i)*(~l))⨸(~l) + (~j)*(~x)⨸(~l))^(~m))), (~x), (~x), (~k) + (~l)*(~x), "3_3_55") : nothing) + +# ("3_3_56", +# @rule ∫(((~!k) + (~!l)*(~x))^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^ (~!p)*((~!f) + (~!g)*log((~!h)*((~!i) + (~!j)*(~x))^(~!m)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~j), (~k), (~l), (~m), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~k) + (~l)*(~x))^(~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n)))^ (~p)*((~f) + (~g)*log((~h)*((~i) + (~j)*(~x))^(~m)))^(~q), (~x)] : nothing) + +("3_3_57", +@rule ∫(PolyLog.reli((~k), (~h) + (~!i)*(~x))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n)))^ (~!p)/((~f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~k), (~n), (~x)) && + eq((~e)*(~f) - (~d)*(~g), 0) && + eq((~g)*(~h) - (~f)*(~i), 0) && + igt((~p), 0) ? +1⨸(~g)*int_and_subst(PolyLog.reli((~k), (~h)*(~x)⨸(~d))*((~a) + (~b)*log((~c)*(~x)^(~n)))^(~p)⨸(~x), (~x), (~x), (~d) + (~e)*(~x), "3_3_57") : nothing) + +("3_3_58", +@rule ∫((~!Px)* (~F)((~!f)*((~!g) + (~!h)*(~x)))*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x))^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~n), (~x)) && + poly((~Px), (~x)) && + in( (~F), [asin, acos, atan, acot, asinh, acosh, atanh, acoth]) ? +let + u = ∫((~Px)*(~F)((~f)*((~g) + (~h)*(~x))), (~x)) + + dist(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~n))), u, (~x)) - (~b)*(~e)*(~n)*∫(ext_simplify(u⨸((~d) + (~e)*(~x)), (~x)), (~x)) +end : nothing) + +# Error in translation of the line: +# Int[u_.*(a_. + b_.*Log[c_.*v_^n_.])^p_., x_Symbol] := Int[u*(a + b*Log[c*ExpandToSum[v, x]^n])^p, x] /; FreeQ[{a, b, c, n, p}, x] && LinearQ[v, x] && Not[LinearMatchQ[v, x]] && Not[EqQ[n, 1] && MatchQ[c*v, e_.*(f_ + g_.*x) /; FreeQ[{e, f, g}, x]]] + +# ("3_3_60", +# @rule ∫((~!u)*((~!a) + (~!b)*log((~!c)*((~!d)*((~!e) + (~!f)*(~x))^(~!m))^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && +# !(ext_isinteger((~n))) && +# !( +# eq((~d), 1) && +# eq((~m), 1) +# ) && +# contains_int(IntHide[(~u)*((~a) + (~b)*log((~c)*(~d)^(~n)*((~e) + (~f)*(~x))^((~m)*(~n))))^(~p), (~x)]) ? +# int_and_subst((~u)*((~a) + (~b)*log((~c)*(~d)^(~n)*((~e) + (~f)*(~x))^((~m)*(~n))))^(~p), (~x), (~c)*(~d)^(~n)*((~e) + (~f)*(~x))^((~m)*(~n)), (~c)*((~d)*((~e) + (~f)*(~x))^(~m))^(~n), "3_3_60") : nothing) + +# ("3_3_61", +# @rule ∫((~AF)*((~!a) + (~!b)*log((~!c)*((~!d)*((~!e) + (~!f)*(~x))^(~!m))^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && +# algebraic_function((~AF), (~x), True) ? +# Unintegrable[(~AF)*((~a) + (~b)*log((~c)*((~d)*((~e) + (~f)*(~x))^(~m))^(~n)))^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.4 u (a+b log(c (d+e x^m)^n))^p.jl b/src/methods/rule_based/rules2/3 Logarithms/3.4 u (a+b log(c (d+e x^m)^n))^p.jl new file mode 100644 index 0000000..5b5d720 --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.4 u (a+b log(c (d+e x^m)^n))^p.jl @@ -0,0 +1,307 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.4 u (a+b log(c (d+e x^m)^n))^p *) +# ("3_4_1", +# @rule ∫((~Pq)^(~!m)*log((~u)),(~x)) => +# ext_isinteger((~m)) && +# poly((~Pq), (~x)) && +# rational_function((~u), (~x)) && +# le(RationalFunctionExponents[(~u), (~x))[[2]], exponent_of((~Pq), (~x))] && +# !contains_var(Fullsimplify((~Pq)^(~m)*(1 - (~u))/(~D)[(~u), (~x))), (~x)] ? +# FullSimplify[(~Pq)^(~m)*(1 - (~u))⨸Symbolics.derivative((~u), (~x))]*PolyLog.reli(2, 1 - (~u)) : nothing) + +("3_4_2", +@rule ∫(log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)),(~x)) => + !contains_var((~c), (~d), (~e), (~n), (~p), (~x)) ? +(~x)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)) - (~e)*(~n)*(~p)*∫((~x)^(~n)⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +("3_4_3", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~e)/(~x))^(~!p)))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + igt((~q), 0) ? +((~e) + (~d)*(~x))*((~a) + (~b)*log((~c)*((~d) + (~e)⨸(~x))^(~p)))^(~q)⨸(~d) + (~b)*(~e)*(~p)*(~q)⨸(~d)*∫(((~a) + (~b)*log((~c)*((~d) + (~e)⨸(~x))^(~p)))^((~q) - 1)⨸(~x), (~x)) : nothing) + +("3_4_4", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + igt((~q), 0) && + ( + eq((~q), 1) || + ext_isinteger((~n)) + ) ? +(~x)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q) - (~b)*(~e)*(~n)*(~p)*(~q)* ∫((~x)^(~n)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^((~q) - 1)⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +#(* Int[(a_.+b_.*Log[c_.*(d_+e_.*x_^n_)^p_.])^q_,x_Symbol] := With[{k=Denominator[n]}, k*Subst[Int[x^(k-1)*(a+b*Log[c*(d+e*x^(k*n))^p])^q,x],x,x^(1/k)]] /; FreeQ[{a,b,c,d,e,p,q},x] && LtQ[-1,n,1] && (GtQ[n,0] || IGtQ[q,0]) *) +("3_4_5", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~q), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(ext_den((~n))*(~n)))^(~p)))^(~q), (~x), (~x), (~x)^(1⨸ext_den((~n))), "3_4_5") : nothing) + +# ("3_4_6", +# @rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~q), (~x)) ? +# Unintegrable[((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)] : nothing) + +("3_4_7", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~v)^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~q), (~x)) && + isbinomial((~v), (~x)) && + !(binomial_without_simplify((~v), (~x))) ? +∫(((~a) + (~b)*log((~c)*expand_to_sum((~v), (~x))^(~p)))^(~q), (~x)) : nothing) + +("3_4_8", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~x)) && + ext_isinteger( simplify(((~m) + 1)/(~n))) && + ( + gt(((~m) + 1)/(~n), 0) || + igt((~q), 0) + ) && + !( + eq((~q), 1) && + ilt((~n), 0) && + igt((~m), 0) + ) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~p)))^(~q), (~x), (~x), (~x)^(~n), "3_4_8") : nothing) + +("3_4_9", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !eq((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))⨸((~f)*((~m) + 1)) - (~b)*(~e)*(~n)*(~p)⨸((~f)*((~m) + 1))*∫((~x)^((~n) - 1)*((~f)*(~x))^((~m) + 1)⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +("3_4_10", +@rule ∫(((~f)*(~x))^(~m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + ( + gt(((~m) + 1)/(~n), 0) || + igt((~q), 0) + ) ? +((~f)*(~x))^(~m)⨸(~x)^(~m)*∫((~x)^(~m)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)) : nothing) + +("3_4_11", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + igt((~q), 1) && + ext_isinteger((~n)) && + !eq((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q)⨸((~f)*((~m) + 1)) - (~b)*(~e)*(~n)*(~p)*(~q)⨸((~f)^(~n)*((~m) + 1))* ∫(((~f)*(~x))^((~m) + (~n))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^((~q) - 1)⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +("3_4_12", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~q), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(ext_den((~n))*(~n)))^(~p)))^(~q), (~x), (~x), (~x)^(1⨸ext_den((~n))), "3_4_12") : nothing) + +("3_4_13", +@rule ∫(((~f)*(~x))^(~m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~q), (~x)) && + isfraction((~n)) ? +((~f)*(~x))^(~m)⨸(~x)^(~m)*∫((~x)^(~m)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)) : nothing) + +# ("3_4_14", +# @rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)] : nothing) + +("3_4_15", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~v)^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~m), (~p), (~q), (~x)) && + isbinomial((~v), (~x)) && + !(binomial_without_simplify((~v), (~x))) ? +∫(((~f)*(~x))^(~m)*((~a) + (~b)*log((~c)*expand_to_sum((~v), (~x))^(~p)))^(~q), (~x)) : nothing) + +("3_4_16", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))/((~!f) + (~!g)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + isrational((~n)) ? +log((~f) + (~g)*(~x))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))⨸(~g) - (~b)*(~e)*(~n)*(~p)⨸(~g)*∫((~x)^((~n) - 1)*log((~f) + (~g)*(~x))⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +("3_4_17", +@rule ∫(((~!f) + (~!g)*(~x))^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~r), (~x)) && + ( + igt((~r), 0) || + isrational((~n)) + ) && + !eq((~r), -1) ? +((~f) + (~g)*(~x))^((~r) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))⨸((~g)*((~r) + 1)) - (~b)*(~e)*(~n)*(~p)⨸((~g)*((~r) + 1))* ∫((~x)^((~n) - 1)*((~f) + (~g)*(~x))^((~r) + 1)⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +# ("3_4_18", +# @rule ∫(((~!f) + (~!g)*(~x))^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~f) + (~g)*(~x))^(~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)] : nothing) + +("3_4_19", +@rule ∫((~u)^(~!r)*((~!a) + (~!b)*log((~!c)*(~v)^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~q), (~r), (~x)) && + linear((~u), (~x)) && + isbinomial((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + binomial_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~r)*((~a) + (~b)*log((~c)*expand_to_sum((~v), (~x))^(~p)))^(~q), (~x)) : nothing) + +("3_4_20", +@rule ∫((~x)^(~!m)*((~!f) + (~!g)*(~x))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~x)) && + ext_isinteger((~m)) && + ext_isinteger((~r)) ? +∫(ext_expand(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)^(~m)*((~f) + (~g)*(~x))^(~r), (~x)), (~x)) : nothing) + +("3_4_21", +@rule ∫(((~!h)*(~x))^(~m)*((~!f) + (~!g)*(~x))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~!n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~r), (~x)) && + isfraction((~m)) && + ext_isinteger((~n)) && + ext_isinteger((~r)) ? +ext_den((~m))⨸(~h)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*((~f) + (~g)*(~x)^ext_den((~m))⨸(~h))^ (~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(ext_den((~m))*(~n))⨸(~h)^(~n))^(~p)))^(~q), (~x), (~x), ((~h)*(~x))^(1⨸ext_den((~m))), "3_4_21") : nothing) + +# ("3_4_22", +# @rule ∫(((~!h)*(~x))^(~!m)*((~!f) + (~!g)*(~x))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~r), (~x)) ? +# Unintegrable[((~h)*(~x))^(~m)*((~f) + (~g)*(~x))^(~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)] : nothing) + +("3_4_23", +@rule ∫(((~!h)*(~x))^(~!m)*(~u)^(~!r)*((~!a) + (~!b)*log((~!c)*(~v)^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~h), (~m), (~p), (~q), (~r), (~x)) && + linear((~u), (~x)) && + isbinomial((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + binomial_without_simplify((~v), (~x)) + ) ? +∫(((~h)*(~x))^(~m)* expand_to_sum((~u), (~x))^(~r)*((~a) + (~b)*log((~c)*expand_to_sum((~v), (~x))^(~p)))^(~q), (~x)) : nothing) + +("3_4_24", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))/((~f) + (~!g)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + ext_isinteger((~n)) ? +∫(1⨸((~f) + (~g)*(~x)^2), (~x))*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p))) - (~b)*(~e)*(~n)*(~p)*∫(∫(1⨸((~f) + (~g)*(~x)^2), (~x))*(~x)^((~n) - 1)⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +("3_4_25", +@rule ∫(((~f) + (~!g)*(~x)^(~s))^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^ (~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~r), (~s), (~x)) && + ext_isinteger((~n)) && + igt((~q), 0) && + ext_isinteger((~r)) && + ext_isinteger((~s)) && + ( + eq((~q), 1) || + gt((~r), 0) && + gt((~s), 1) || + lt((~s), 0) && + lt((~r), 0) + ) && + issum(ext_expand(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), ((~f) + (~g)*(~x)^(~s))^(~r), (~x))) ? +∫(ext_expand(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), ((~f) + (~g)*(~x)^(~s))^(~r), (~x)), (~x)) : nothing) + +("3_4_26", +@rule ∫(((~f) + (~!g)*(~x)^(~s))^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^ (~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~r), (~s), (~x)) && + isfraction((~n)) && + ext_isinteger(ext_den((~n))*(~s)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~f) + (~g)*(~x)^(ext_den((~n))*(~s)))^ (~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(ext_den((~n))*(~n)))^(~p)))^(~q), (~x), (~x), (~x)^(1⨸ext_den((~n))), "3_4_26") : nothing) + +# ("3_4_27", +# @rule ∫(((~f) + (~!g)*(~x)^(~s))^(~!r) ((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^ (~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~r), (~s), (~x)) ? +# Unintegrable[((~f) + (~g)*(~x)^(~s))^(~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)] : nothing) + +("3_4_28", +@rule ∫((~u)^(~!r)*((~!a) + (~!b)*log((~!c)*(~v)^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~q), (~r), (~x)) && + isbinomial([(~u), (~v)], (~x)) && + !(binomial_without_simplify([(~u), (~v)], (~x))) ? +∫(expand_to_sum((~u), (~x))^(~r)*((~a) + (~b)*log((~c)*expand_to_sum((~v), (~x))^(~p)))^(~q), (~x)) : nothing) + +("3_4_29", +@rule ∫((~x)^(~!m)*((~f) + (~!g)*(~x)^(~s))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~s), (~x)) && + ext_isinteger((~r)) && + ext_isinteger((~s)/(~n)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) && + ( + gt(((~m) + 1)/(~n), 0) || + igt((~q), 0) + ) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~f) + (~g)*(~x)^((~s)⨸(~n)))^ (~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~p)))^(~q), (~x), (~x), (~x)^(~n), "3_4_29") : nothing) + +("3_4_30", +@rule ∫((~x)^(~!m)*((~f) + (~!g)*(~x)^(~s))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~s), (~x)) && + igt((~q), 0) && + ext_isinteger((~m)) && + ext_isinteger((~r)) && + ext_isinteger((~s)) ? +∫(ext_expand(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)^(~m)*((~f) + (~g)*(~x)^(~s))^(~r), (~x)), (~x)) : nothing) + +("3_4_31", +@rule ∫(((~f) + (~!g)*(~x)^(~s))^(~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^ (~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~r), (~s), (~x)) && + isfraction((~n)) && + ext_isinteger(ext_den((~n))*(~s)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~f) + (~g)*(~x)^(ext_den((~n))*(~s)))^ (~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(ext_den((~n))*(~n)))^(~p)))^(~q), (~x), (~x), (~x)^(1⨸ext_den((~n))), "3_4_31") : nothing) + +("3_4_32", +@rule ∫((~x)^(~!m)*((~f) + (~!g)*(~x)^(~s))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~q), (~r), (~s), (~x)) && + isfraction((~n)) && + ext_isinteger(1/(~n)) && + ext_isinteger((~s)/(~n)) ? +1⨸(~n)*int_and_subst((~x)^((~m) + 1⨸(~n) - 1)*((~f) + (~g)*(~x)^((~s)⨸(~n)))^(~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x))^(~p)))^ (~q), (~x), (~x), (~x)^(~n), "3_4_32") : nothing) + +("3_4_33", +@rule ∫(((~!h)*(~x))^(~m)*((~!f) + (~!g)*(~x)^(~!s))^ (~!r)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~!n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~p), (~r), (~x)) && + isfraction((~m)) && + ext_isinteger((~n)) && + ext_isinteger((~s)) ? +ext_den((~m))⨸(~h)* int_and_subst( (~x)^(ext_den((~m))*((~m) + 1) - 1)*((~f) + (~g)*(~x)^(ext_den((~m))*(~s))⨸(~h)^(~s))^ (~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(ext_den((~m))*(~n))⨸(~h)^(~n))^(~p)))^(~q), (~x), (~x), ((~h)*(~x))^(1⨸ext_den((~m))), "3_4_33") : nothing) + +# ("3_4_34", +# @rule ∫(((~!h)*(~x))^(~!m)*((~f) + (~!g)*(~x)^(~s))^ (~!r) ((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~q), (~r), (~s), (~x)) ? +# Unintegrable[((~h)*(~x))^(~m)*((~f) + (~g)*(~x)^(~s))^(~r)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x)] : nothing) + +("3_4_35", +@rule ∫(((~!h)*(~x))^(~!m)*(~u)^(~!r)*((~!a) + (~!b)*log((~!c)*(~v)^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~h), (~m), (~p), (~q), (~r), (~x)) && + isbinomial([(~u), (~v)], (~x)) && + !(binomial_without_simplify([(~u), (~v)], (~x))) ? +∫(((~h)*(~x))^(~m)* expand_to_sum((~u), (~x))^(~r)*((~a) + (~b)*log((~c)*expand_to_sum((~v), (~x))^(~p)))^(~q), (~x)) : nothing) + +("3_4_36", +@rule ∫(log((~!f)*(~x)^(~!q))^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~q), (~x)) && + !eq((~m), -1) ? +log((~f)*(~x)^(~q))^((~m) + 1)*((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))⨸((~q)*((~m) + 1)) - (~b)*(~e)*(~n)*(~p)⨸((~q)*((~m) + 1))* ∫((~x)^((~n) - 1)*log((~f)*(~x)^(~q))^((~m) + 1)⨸((~d) + (~e)*(~x)^(~n)), (~x)) : nothing) + +("3_4_37", +@rule ∫((~F)((~!f)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*(~x)^(~n))^(~!p))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + in( (~F), [asin, acos, asinh, acosh]) && + igt((~m), 0) && + igt((~n), 1) ? +dist((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)), ∫((~F)((~f)*(~x))^(~m), (~x)), (~x)) - (~b)*(~e)*(~n)*(~p)*∫(ext_simplify(∫((~F)((~f)*(~x))^(~m), (~x))*(~x)^((~n) - 1)⨸((~d) + (~e)*(~x)^(~n)), (~x)), (~x)) : nothing) + +("3_4_38", +@rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*((~!f) + (~!g)*(~x))^(~n))^(~!p)))^(~!q),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + igt((~q), 0) && + ( + eq((~q), 1) || + ext_isinteger((~n)) + ) ? +1⨸(~g)*int_and_subst(((~a) + (~b)*log((~c)*((~d) + (~e)*(~x)^(~n))^(~p)))^(~q), (~x), (~x), (~f) + (~g)*(~x), "3_4_38") : nothing) + +# ("3_4_39", +# @rule ∫(((~!a) + (~!b)*log((~!c)*((~d) + (~!e)*((~!f) + (~!g)*(~x))^(~n))^(~!p)))^(~!q),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~q), (~x)) ? +# Unintegrable[((~a) + (~b)*log((~c)*((~d) + (~e)*((~f) + (~g)*(~x))^(~n))^(~p)))^(~q), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/3 Logarithms/3.5 Miscellaneous logarithms.jl b/src/methods/rule_based/rules2/3 Logarithms/3.5 Miscellaneous logarithms.jl new file mode 100644 index 0000000..b364fcf --- /dev/null +++ b/src/methods/rule_based/rules2/3 Logarithms/3.5 Miscellaneous logarithms.jl @@ -0,0 +1,299 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 3.5 Miscellaneous logarithms *) +# ("3_5_1", +# @rule ∫((~u)*log((~v)),(~x)) => +# !(FalseQ[(~w)])] ? +# With[{(~w) = DerivativeDivides[(~v), (~u)*(1 - (~v)), (~x)]}, (~w)*PolyLog.reli(2, 1 - (~v)) : nothing) +# +# ("3_5_2", +# @rule ∫(((~!a) + (~!b)*log((~u)))*log((~v))*(~w),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# !contains_inverse_function((~u), (~x)) && +# !(FalseQ[DerivativeDivides[(~v), (~w)*(1 - (~v)), (~x)]]) ? +# DerivativeDivides[(~v), (~w)*(1 - (~v)), (~x)]*((~a) + (~b)*log((~u)))*PolyLog.reli(2, 1 - (~v)) - (~b)*∫(ext_simplify(DerivativeDivides[(~v), (~w)*(1 - (~v)), (~x)]*PolyLog.reli(2, 1 - (~v))*(~D)[(~u), (~x)]⨸(~u), (~x)), (~x)) ] : nothing) + +("3_5_3", +@rule ∫(log((~!c)*log((~!d)*(~x)^(~!n))^(~!p)),(~x)) => + !contains_var((~c), (~d), (~n), (~p), (~x)) ? +(~x)*log((~c)*log((~d)*(~x)^(~n))^(~p)) - (~n)*(~p)*∫(1⨸log((~d)*(~x)^(~n)), (~x)) : nothing) + +("3_5_4", +@rule ∫(((~!a) + (~!b)*log((~!c)*log((~!d)*(~x)^(~!n))^(~!p)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) ? +log((~d)*(~x)^(~n))*((~a) + (~b)*log((~c)*log((~d)*(~x)^(~n))^(~p)))⨸(~n) - (~b)*(~p)*log((~x)) : nothing) + +("3_5_5", +@rule ∫(((~!e)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*log((~!d)*(~x)^(~!n))^(~!p))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !eq((~m), -1) ? +((~e)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*log((~d)*(~x)^(~n))^(~p)))⨸((~e)*((~m) + 1)) - (~b)*(~n)*(~p)⨸((~m) + 1)*∫(((~e)*(~x))^(~m)⨸log((~d)*(~x)^(~n)), (~x)) : nothing) + +("3_5_6", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~Rx)^(~!p)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + rational_function((~Rx), (~x)) && + igt((~n), 0) ? +(~x)*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^(~n) - (~b)*(~n)*(~p)* ∫(ext_simplify( (~x)*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^((~n) - 1)*Symbolics.derivative((~Rx), (~x))⨸(~Rx), (~x)), (~x)) : nothing) + +("3_5_7", +@rule ∫(((~!a) + (~!b)*log((~!c)*(~Rx)^(~!p)))^(~!n)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + rational_function((~Rx), (~x)) && + igt((~n), 0) ? +log((~d) + (~e)*(~x))*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^(~n)⨸(~e) - (~b)*(~n)*(~p)⨸(~e)* ∫(log((~d) + (~e)*(~x))*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^((~n) - 1)*Symbolics.derivative((~Rx), (~x))⨸(~Rx), (~x)) : nothing) + +("3_5_8", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*log((~!c)*(~Rx)^(~!p)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~p), (~x)) && + rational_function((~Rx), (~x)) && + igt((~n), 0) && + ( + eq((~n), 1) || + ext_isinteger((~m)) + ) && + !eq((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^(~n)⨸((~e)*((~m) + 1)) - (~b)*(~n)*(~p)⨸((~e)*((~m) + 1))* ∫(ext_simplify(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^((~n) - 1)*Symbolics.derivative((~Rx), (~x))⨸(~Rx), (~x)), (~x)) : nothing) + +("3_5_9", +@rule ∫(log((~!c)*(~Rx)^(~!n))/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~c), (~d), (~e), (~n), (~x)) && + rational_function((~Rx), (~x)) && + !(poly((~Rx), (~x))) ? +∫(1⨸((~d) + (~e)*(~x)^2), (~x))*log((~c)*(~Rx)^(~n)) - (~n)*∫(ext_simplify(∫(1⨸((~d) + (~e)*(~x)^2), (~x))*Symbolics.derivative((~Rx), (~x))⨸(~Rx), (~x)), (~x)) : nothing) + +("3_5_10", +@rule ∫(log((~!c)*(~Px)^(~!n))/(~Qx),(~x)) => + !contains_var((~c), (~n), (~x)) && + quadratic((~Qx), (~x)) && + quadratic((~Px), (~x)) && + eq((~D)[(~Px)/(~Qx), (~x)], 0) ? +∫(1⨸(~Qx), (~x))*log((~c)*(~Px)^(~n)) - (~n)*∫(ext_simplify(∫(1⨸(~Qx), (~x))*Symbolics.derivative((~Px), (~x))⨸(~Px), (~x)), (~x)) : nothing) + +("3_5_11", +@rule ∫((~Gx)*((~!a) + (~!b)*log((~!c)*(~Rx)^(~!p)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + rational_function((~Rx), (~x)) && + rational_function((~Gx), (~x)) && + igt((~n), 0) && + issum(ext_expand(((~a) + (~b)*log((~c)*(~Rx)^(~p)))^(~n), (~Gx), (~x))) ? +∫(ext_expand(((~a) + (~b)*log((~c)*(~Rx)^(~p)))^(~n), (~Gx), (~x)), (~x)) : nothing) + +("3_5_12", +@rule ∫((~Gx)*((~!a) + (~!b)*log((~!c)*(~Rx)^(~!p)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~p), (~x)) && + rational_function((~Rx), (~x)) && + rational_function((~Gx), (~x)) && + igt((~n), 0) && + issum(ext_expand((~Gx)*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^(~n), (~x))) ? +∫(ext_expand((~Gx)*((~a) + (~b)*log((~c)*(~Rx)^(~p)))^(~n), (~x)), (~x)) : nothing) + +# ("3_5_13", +# @rule ∫((~Rx)*((~!a) + (~!b)*log((~u))),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# rational_function((~Rx), (~x)) && +# !(FalseQ[lst]) ? +# lst[[2]]*lst[[4]]* int_and_subst(lst[[1]], (~x), (~x), lst[[3]]^(1⨸lst[[2]]), "3_5_13") : nothing) + +("3_5_14", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*log(1 + (~!e)*((~F)^((~!c)*((~!a) + (~!b)*(~x))))^(~!n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~e), (~f), (~g), (~n), (~x)) && + gt((~m), 0) ? +-((~f) + (~g)*(~x))^(~m)*PolyLog.reli(2, -(~e)*((~F)^((~c)*((~a) + (~b)*(~x))))^(~n))⨸((~b)*(~c)*(~n)*log((~F))) + (~g)*(~m)⨸((~b)*(~c)*(~n)*log((~F)))* ∫(((~f) + (~g)*(~x))^((~m) - 1)*PolyLog.reli(2, -(~e)*((~F)^((~c)*((~a) + (~b)*(~x))))^(~n)), (~x)) : nothing) + +("3_5_15", +@rule ∫(((~!f) + (~!g)*(~x))^(~!m)*log((~d) + (~!e)*((~F)^((~!c)*((~!a) + (~!b)*(~x))))^(~!n)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + gt((~m), 0) && + !eq((~d), 1) ? +((~f) + (~g)*(~x))^((~m) + 1)*log((~d) + (~e)*((~F)^((~c)*((~a) + (~b)*(~x))))^(~n))⨸((~g)*((~m) + 1)) - ((~f) + (~g)*(~x))^((~m) + 1)* log(1 + (~e)⨸(~d)*((~F)^((~c)*((~a) + (~b)*(~x))))^(~n))⨸((~g)*((~m) + 1)) + ∫(((~f) + (~g)*(~x))^(~m)*log(1 + (~e)⨸(~d)*((~F)^((~c)*((~a) + (~b)*(~x))))^(~n)), (~x)) : nothing) + +("3_5_16", +@rule ∫(log((~!d) + (~!e)*(~x) + (~!f)*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~e)^2 - (~c)*(~f)^2, 0) ? +(~x)*log((~d) + (~e)*(~x) + (~f)*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)) + (~f)^2*((~b)^2 - 4*(~a)*(~c))⨸2* ∫((~x)⨸((2*(~d)*(~e) - (~b)*(~f)^2)*((~a) + (~b)*(~x) + (~c)*(~x)^2) - (~f)*((~b)*(~d) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) : nothing) + +("3_5_17", +@rule ∫(log((~!d) + (~!e)*(~x) + (~!f)*sqrt((~!a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~x)) && + eq((~e)^2 - (~c)*(~f)^2, 0) ? +(~x)*log((~d) + (~e)*(~x) + (~f)*sqrt((~a) + (~c)*(~x)^2)) - (~a)*(~c)*(~f)^2* ∫((~x)⨸((~d)*(~e)*((~a) + (~c)*(~x)^2) + (~f)*((~a)*(~e) - (~c)*(~d)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) : nothing) + +("3_5_18", +@rule ∫(((~!g)*(~x))^(~!m)* log((~!d) + (~!e)*(~x) + (~!f)*sqrt((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + eq((~e)^2 - (~c)*(~f)^2, 0) && + !eq((~m), -1) && + ext_isinteger(2*(~m)) ? +((~g)*(~x))^((~m) + 1)* log((~d) + (~e)*(~x) + (~f)*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2))⨸((~g)*((~m) + 1)) + (~f)^2*((~b)^2 - 4*(~a)*(~c))⨸(2*(~g)*((~m) + 1))* ∫(((~g)*(~x))^((~m) + 1)⨸((2*(~d)*(~e) - (~b)*(~f)^2)*((~a) + (~b)*(~x) + (~c)*(~x)^2) - (~f)*((~b)*(~d) - 2*(~a)*(~e) + (2*(~c)*(~d) - (~b)*(~e))*(~x))*sqrt((~a) + (~b)*(~x) + (~c)*(~x)^2)), (~x)) : nothing) + +("3_5_19", +@rule ∫(((~!g)*(~x))^(~!m)*log((~!d) + (~!e)*(~x) + (~!f)*sqrt((~!a) + (~!c)*(~x)^2)),(~x)) => + !contains_var((~a), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + eq((~e)^2 - (~c)*(~f)^2, 0) && + !eq((~m), -1) && + ext_isinteger(2*(~m)) ? +((~g)*(~x))^((~m) + 1)*log((~d) + (~e)*(~x) + (~f)*sqrt((~a) + (~c)*(~x)^2))⨸((~g)*((~m) + 1)) - (~a)*(~c)*(~f)^2⨸((~g)*((~m) + 1))* ∫(((~g)*(~x))^((~m) + 1)⨸((~d)*(~e)*((~a) + (~c)*(~x)^2) + (~f)*((~a)*(~e) - (~c)*(~d)*(~x))*sqrt((~a) + (~c)*(~x)^2)), (~x)) : nothing) + +#(* Int[v_.*Log[d_. + e_.*x_ + f_.*Sqrt[u_]], x_Symbol] := Int[v*Log[d + e*x + f*Sqrt[ExpandToSum[u, x]]], x] /; FreeQ[{d, e, f}, x] && QuadraticQ[u, x] && Not[QuadraticMatchQ[u, x]] && (EqQ[v, 1] || MatchQ[v, (g_.*x)^m_. /; FreeQ[{g, m}, x]]) *) +("3_5_20", +@rule ∫(log((~!c)*(~x)^(~!n))^(~!r)/((~x)*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) ? +log((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))⨸((~b)*(~n)*(~q)) - (~a)*(~m)⨸((~b)*(~n)*(~q))*∫((~x)^((~m) - 1)⨸((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q)), (~x)) : nothing) + +("3_5_21", +@rule ∫(log((~!c)*(~x)^(~!n))^(~!r)*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) && + igt((~p), 0) ? +∫(ext_expand(log((~c)*(~x)^(~n))^(~r)⨸(~x), ((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))^(~p), (~x)), (~x)) : nothing) + +("3_5_22", +@rule ∫(log((~!c)*(~x)^(~!n))^(~!r)*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) && + !eq((~p), -1) ? +((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))^((~p) + 1)⨸((~b)*(~n)*(~q)*((~p) + 1)) - (~a)*(~m)⨸((~b)*(~n)*(~q))*∫((~x)^((~m) - 1)*((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))^(~p), (~x)) : nothing) + +("3_5_23", +@rule ∫(((~!d)*(~x)^(~!m) + (~!e)*log((~!c)*(~x)^(~!n))^(~!r))/((~x)*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) && + eq((~a)*(~e)*(~m) - (~b)*(~d)*(~n)*(~q), 0) ? +(~e)*log((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))⨸((~b)*(~n)*(~q)) : nothing) + +("3_5_24", +@rule ∫(((~u) + (~!d)*(~x)^(~!m) + (~!e)*log((~!c)*(~x)^(~!n))^(~!r))/((~x)*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) && + eq((~a)*(~e)*(~m) - (~b)*(~d)*(~n)*(~q), 0) ? +(~e)*log((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))⨸((~b)*(~n)*(~q)) + ∫((~u)⨸((~x)*((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))), (~x)) : nothing) + +("3_5_25", +@rule ∫(((~!d)*(~x)^(~!m) + (~!e)*log((~!c)*(~x)^(~!n))^(~!r))/((~x)*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) && + !eq((~a)*(~e)*(~m) - (~b)*(~d)*(~n)*(~q), 0) ? +(~e)*log((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))⨸((~b)*(~n)*(~q)) - ((~a)*(~e)*(~m) - (~b)*(~d)*(~n)*(~q))⨸((~b)*(~n)*(~q))* ∫((~x)^((~m) - 1)⨸((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q)), (~x)) : nothing) + +("3_5_26", +@rule ∫(((~!d)*(~x)^(~!m) + (~!e)*log((~!c)*(~x)^(~!n))^(~!r))*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))^ (~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) && + !eq((~p), -1) && + eq((~a)*(~e)*(~m) - (~b)*(~d)*(~n)*(~q), 0) ? +(~e)*((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))^((~p) + 1)⨸((~b)*(~n)*(~q)*((~p) + 1)) : nothing) + +("3_5_27", +@rule ∫(((~!d)*(~x)^(~!m) + (~!e)*log((~!c)*(~x)^(~!n))^(~!r))*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))^ (~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~q), (~r), (~x)) && + eq((~r), (~q) - 1) && + !eq((~p), -1) && + !eq((~a)*(~e)*(~m) - (~b)*(~d)*(~n)*(~q), 0) ? +(~e)*((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))^((~p) + 1)⨸((~b)*(~n)*(~q)*((~p) + 1)) - ((~a)*(~e)*(~m) - (~b)*(~d)*(~n)*(~q))⨸((~b)*(~n)*(~q))* ∫((~x)^((~m) - 1)*((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))^(~p), (~x)) : nothing) + +("3_5_28", +@rule ∫(((~!d)*(~x)^(~!m) + (~!e)*(~x)^(~!m)*log((~!c)*(~x)^(~!n)) + (~!f)*log((~!c)*(~x)^(~!n))^ (~!q))/((~x)*((~!a)*(~x)^(~!m) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~q), (~x)) && + eq((~e)*(~n) + (~d)*(~m), 0) && + eq((~a)*(~f) + (~b)*(~d)*((~q) - 1), 0) ? +(~d)*log((~c)*(~x)^(~n))⨸((~a)*(~n)*((~a)*(~x)^(~m) + (~b)*log((~c)*(~x)^(~n))^(~q))) : nothing) + +("3_5_29", +@rule ∫(((~d) + (~!e)*log((~!c)*(~x)^(~!n)))/((~!a)*(~x) + (~!b)*log((~!c)*(~x)^(~!n))^(~q))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~q), (~x)) && + eq((~d) + (~e)*(~n)*(~q), 0) ? +-(~e)*log((~c)*(~x)^(~n))⨸((~a)*((~a)*(~x) + (~b)*log((~c)*(~x)^(~n))^(~q))) + ((~d) + (~e)*(~n))⨸(~a)* ∫(1⨸((~x)*((~a)*(~x) + (~b)*log((~c)*(~x)^(~n))^(~q))), (~x)) : nothing) + +("3_5_30", +@rule ∫(log((~u)),(~x)) => + !contains_inverse_function((~u), (~x)) ? +(~x)*log((~u)) - ∫(ext_simplify((~x)*Symbolics.derivative((~u), (~x))⨸(~u), (~x)), (~x)) : nothing) + +("3_5_31", +@rule ∫(log((~u)),(~x)) => + isprod((~u)) ? +(~x)*log((~u)) - ∫(ext_simplify((~x)*simplify(Symbolics.derivative((~u), (~x))⨸(~u)), (~x)), (~x)) : nothing) + +# ("3_5_32", +# @rule ∫(log((~u))/((~!a) + (~!b)*(~x)),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# rational_function((~D)[(~u), (~x)]/(~u), (~x)) && +# ( +# !eq((~a), 0) || +# !( +# isbinomial((~u), (~x)) && +# eq(BinomialDegree[(~u), (~x)]^2, 1) +# ) +# ) ? +# log((~a) + (~b)*(~x))*log((~u))⨸(~b) - 1⨸(~b)*∫(ext_simplify(log((~a) + (~b)*(~x))*Symbolics.derivative((~u), (~x))⨸(~u), (~x)), (~x)) : nothing) + +("3_5_33", +@rule ∫(((~!a) + (~!b)*(~x))^(~!m)*log((~u)),(~x)) => + !contains_var((~a), (~b), (~m), (~x)) && + !contains_inverse_function((~u), (~x)) && + !eq((~m), -1) ? +((~a) + (~b)*(~x))^((~m) + 1)*log((~u))⨸((~b)*((~m) + 1)) - 1⨸((~b)*((~m) + 1))* ∫(ext_simplify(((~a) + (~b)*(~x))^((~m) + 1)*Symbolics.derivative((~u), (~x))⨸(~u), (~x)), (~x)) : nothing) + +("3_5_34", +@rule ∫(log((~u))/(~Qx),(~x)) => + quadratic((~Qx), (~x)) && + !contains_inverse_function((~u), (~x)) ? +∫(1⨸(~Qx), (~x))*log((~u)) - ∫(ext_simplify(∫(1⨸(~Qx), (~x))*Symbolics.derivative((~u), (~x))⨸(~u), (~x)), (~x)) : nothing) + +("3_5_35", +@rule ∫((~u)^((~!a)*(~x))*log((~u)),(~x)) => + !contains_var((~a), (~x)) && + !contains_inverse_function((~u), (~x)) ? +(~u)^((~a)*(~x))⨸(~a) - ∫(ext_simplify((~x)*(~u)^((~a)*(~x) - 1)*Symbolics.derivative((~u), (~x)), (~x)), (~x)) : nothing) + +# ("3_5_36", +# @rule ∫((~v)*log((~u)),(~x)) => +# !contains_inverse_function((~u), (~x)) && +# !contains_inverse_function(IntHide[(~v), (~x)], (~x)) ? +# dist(log((~u)), ∫((~v), (~x)), (~x)) - ∫(ext_simplify(∫((~v), (~x))*(~D)[(~u), (~x)]⨸(~u), (~x)), (~x)) ] : nothing) +# +# ("3_5_37", +# @rule ∫((~v)*log((~u)),(~x)) => +# ProductQ[(~u)] && +# !contains_inverse_function(IntHide[(~v), (~x)], (~x)) ? +# dist(log((~u)), ∫((~v), (~x)), (~x)) - ∫(ext_simplify(∫((~v), (~x))*simplify((~D)[(~u), (~x)]⨸(~u)), (~x)), (~x)) ] : nothing) + +("3_5_38", +@rule ∫(log((~v))*log((~w)),(~x)) => + !contains_inverse_function((~v), (~x)) && + !contains_inverse_function((~w), (~x)) ? +(~x)*log((~v))*log((~w)) - ∫(ext_simplify((~x)*log((~w))*Symbolics.derivative((~v), (~x))⨸(~v), (~x)), (~x)) - ∫(ext_simplify((~x)*log((~v))*Symbolics.derivative((~w), (~x))⨸(~w), (~x)), (~x)) : nothing) + +# ("3_5_39", +# @rule ∫((~u)*log((~v))*log((~w)),(~x)) => +# !contains_inverse_function((~v), (~x)) && +# !contains_inverse_function((~w), (~x)) && +# !contains_inverse_function(IntHide[(~u), (~x)], (~x)) ? +# dist(log((~v))*log((~w)), ∫((~u), (~x)), (~x)) - ∫(ext_simplify(∫((~u), (~x))*log((~w))*(~D)[(~v), (~x)]⨸(~v), (~x)), (~x)) - ∫(ext_simplify(∫((~u), (~x))*log((~v))*(~D)[(~w), (~x)]⨸(~w), (~x)), (~x)) ] : nothing) + +("3_5_40", +@rule ∫((~f)^((~!a)*log((~u))),(~x)) => + !contains_var((~a), (~f), (~x)) ? +∫((~u)^((~a)*log((~f))), (~x)) : nothing) + +#(* If[TrueQ[oLoadShowSteps], Int[u_/x_,x_Symbol] := With[{lst=FunctionOfLog[u,x]}, ShowStep["","Int[F[Log[a*x^n]]/x,x]","Subst[Int[F[x],x],x,Log[a*x^n] ]/n",Hold[ 1/lst[[3]]*Subst[Int[lst[[1]],x],x,Log[lst[[2]]]]]] /; Not[FalseQ[lst]]] /; SimplifyFlag && NonsumQ[u], Int[u_/x_,x_Symbol] := With[{lst=FunctionOfLog[u,x]}, 1/lst[[3]]*Subst[Int[lst[[1]],x],x,Log[lst[[2]]]] /; Not[FalseQ[lst]]] /; NonsumQ[u]] *) +("3_5_41", +@rule ∫((~F)(log(~a*(~x)^~n))/~x, ~x) => +int_and_subst((~F)(~x)/~n, ~x, ~x, log(~a*(~x)^~n), "3_5_41") +) + +("3_5_42", +@rule ∫((~!u)*log(SymbolicUtils.gamma((~v))),(~x)) => +(log(SymbolicUtils.gamma((~v))) - SymbolicUtils.loggamma((~v)))*∫((~u), (~x)) + ∫((~u)*SymbolicUtils.loggamma((~v)), (~x))) + +("3_5_43", +@rule ∫((~!u)*((~!a)*(~x)^(~!m) + (~!b)*(~x)^(~!r)*log((~!c)*(~x)^(~!n))^(~!q))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~p), (~q), (~r), (~x)) && + ext_isinteger((~p)) ? +∫((~u)*(~x)^((~p)*(~r))*((~a)*(~x)^((~m) - (~r)) + (~b)*log((~c)*(~x)^(~n))^(~q))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.1 (a sin)^m (b trg)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.1 (a sin)^m (b trg)^n.jl new file mode 100644 index 0000000..922aadb --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.1 (a sin)^m (b trg)^n.jl @@ -0,0 +1,207 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.0.1 (a sin)^m (b trg)^n *) +("4_1_0_1_1", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*cos((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + eq((~m) + (~n) + 2, 0) && + !eq((~m), -1) ? +((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*cos((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~b)*(~f)*((~m) + 1)) : nothing) + +("4_1_0_1_2", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*cos((~!e) + (~!f)*(~x))^(~!n),(~x)) => + !contains_var((~a), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~n) - 1)/2) && + !( + ext_isinteger(((~m) - 1)/2) && + lt(0, (~m), (~n)) + ) ? +1⨸((~a)*(~f))* int_and_subst((~x)^(~m)*(1 - (~x)^2⨸(~a)^2)^(((~n) - 1)⨸2), (~x), (~x), (~a)*sin((~e) + (~f)*(~x)), "4_1_0_1_2") : nothing) + +("4_1_0_1_3", +@rule ∫(((~!a)*cos((~!e) + (~!f)*(~x)))^(~!m)*sin((~!e) + (~!f)*(~x))^(~!n),(~x)) => + !contains_var((~a), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~n) - 1)/2) && + !( + ext_isinteger(((~m) - 1)/2) && + gt((~m), 0) && + le((~m), (~n)) + ) ? +-1⨸((~a)*(~f))* int_and_subst((~x)^(~m)*(1 - (~x)^2⨸(~a)^2)^(((~n) - 1)⨸2), (~x), (~x), (~a)*cos((~e) + (~f)*(~x)), "4_1_0_1_3") : nothing) + +("4_1_0_1_4", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*cos((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~m), 1) && + lt((~n), -1) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + eq((~m) + (~n), 0) + ) ? +-(~a)*((~a)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*cos((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)* (~f)*((~n) + 1)) + (~a)^2*((~m) - 1)⨸((~b)^2*((~n) + 1))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*cos((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_1_5", +@rule ∫(((~!a)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~m), 1) && + lt((~n), -1) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + eq((~m) + (~n), 0) + ) ? +(~a)*((~a)*cos((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*((~n) + 1)) + (~a)^2*((~m) - 1)⨸((~b)^2*((~n) + 1))* ∫(((~a)*cos((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_1_6", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*cos((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + gt((~m), 1) && + !eq((~m) + (~n), 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +-(~a)*((~b)*cos((~e) + (~f)*(~x)))^((~n) + 1)*((~a)*sin((~e) + (~f)*(~x)))^((~m) - 1)⨸((~b)* (~f)*((~m) + (~n))) + (~a)^2*((~m) - 1)⨸((~m) + (~n))* ∫(((~b)*cos((~e) + (~f)*(~x)))^(~n)*((~a)*sin((~e) + (~f)*(~x)))^((~m) - 2), (~x)) : nothing) + +("4_1_0_1_7", +@rule ∫(((~!a)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + gt((~m), 1) && + !eq((~m) + (~n), 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~a)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a)*cos((~e) + (~f)*(~x)))^((~m) - 1)⨸((~b)*(~f)*((~m) + (~n))) + (~a)^2*((~m) - 1)⨸((~m) + (~n))* ∫(((~b)*sin((~e) + (~f)*(~x)))^(~n)*((~a)*cos((~e) + (~f)*(~x)))^((~m) - 2), (~x)) : nothing) + +("4_1_0_1_8", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*cos((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +((~b)*cos((~e) + (~f)*(~x)))^((~n) + 1)*((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)*(~b)*(~f)*((~m) + 1)) + ((~m) + (~n) + 2)⨸((~a)^2*((~m) + 1))* ∫(((~b)*cos((~e) + (~f)*(~x)))^(~n)*((~a)*sin((~e) + (~f)*(~x)))^((~m) + 2), (~x)) : nothing) + +("4_1_0_1_9", +@rule ∫(((~!a)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +-((~b)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a)*cos((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)*(~b)* (~f)*((~m) + 1)) + ((~m) + (~n) + 2)⨸((~a)^2*((~m) + 1))* ∫(((~b)*sin((~e) + (~f)*(~x)))^(~n)*((~a)*cos((~e) + (~f)*(~x)))^((~m) + 2), (~x)) : nothing) + +("4_1_0_1_10", +@rule ∫(sqrt((~!a)*sin((~!e) + (~!f)*(~x)))*sqrt((~!b)*cos((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) ? +sqrt((~a)*sin((~e) + (~f)*(~x)))*sqrt((~b)*cos((~e) + (~f)*(~x)))⨸sqrt(sin(2*(~e) + 2*(~f)*(~x)))* ∫(sqrt(sin(2*(~e) + 2*(~f)*(~x))), (~x)) : nothing) + +("4_1_0_1_11", +@rule ∫(1/(sqrt((~!a)*sin((~!e) + (~!f)*(~x)))*sqrt((~!b)*cos((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) ? +sqrt(sin(2*(~e) + 2*(~f)*(~x)))⨸(sqrt((~a)*sin((~e) + (~f)*(~x)))*sqrt((~b)*cos((~e) + (~f)*(~x))))* ∫(1⨸sqrt(sin(2*(~e) + 2*(~f)*(~x))), (~x)) : nothing) + +#(* Int[(a_.*sin[e_.+f_.*x_])^m_*(b_.*cos[e_.+f_.*x_])^n_,x_Symbol] := (a*Sin[e+f*x])^m*(b*Cos[e+f*x])^n/(a*Tan[e+f*x])^m*Int[(a*Tan[e+f*x] )^m,x] /; FreeQ[{a,b,e,f,m,n},x] && EqQ[m+n,0] *) +("4_1_0_1_12", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*cos((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~m) + (~n), 0) && + gt((~m), 0) && + lt((~m), 1) ? +ext_den((~m))*(~a)*(~b)⨸(~f)* int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)⨸((~a)^2 + (~b)^2*(~x)^(2*ext_den((~m)))), (~x), (~x), ((~a)*sin((~e) + (~f)*(~x)))^(1⨸ext_den((~m)))⨸((~b)*cos((~e) + (~f)*(~x)))^(1⨸ext_den((~m))), "4_1_0_1_12") : nothing) + +("4_1_0_1_13", +@rule ∫(((~!a)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~m) + (~n), 0) && + gt((~m), 0) && + lt((~m), 1) ? +-ext_den((~m))*(~a)*(~b)⨸(~f)* int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)⨸((~a)^2 + (~b)^2*(~x)^(2*ext_den((~m)))), (~x), (~x), ((~a)*cos((~e) + (~f)*(~x)))^(1⨸ext_den((~m)))⨸((~b)*sin((~e) + (~f)*(~x)))^(1⨸ext_den((~m))), "4_1_0_1_13") : nothing) + +#(* Int[(a_.*sin[e_.+f_.*x_])^m_*(b_.*cos[e_.+f_.*x_])^n_,x_Symbol] := b^(2*IntPart[(n-1)/2]+1)*(b*Cos[e+f*x])^(2*FracPart[(n-1)/2])/(a*f*( Cos[e+f*x]^2)^FracPart[(n-1)/2])* Subst[Int[x^m*(1-x^2/a^2)^((n-1)/2),x],x,a*Sin[e+f*x]] /; FreeQ[{a,b,e,f,m,n},x] && (RationalQ[n] || Not[RationalQ[m]] && (EqQ[b,1] || NeQ[a,1])) *) +#(* Int[(a_.*cos[e_.+f_.*x_])^m_*(b_.*sin[e_.+f_.*x_])^n_,x_Symbol] := -b^(2*IntPart[(n-1)/2]+1)*(b*Sin[e+f*x])^(2*FracPart[(n-1)/2])/(a*f* (Sin[e+f*x]^2)^FracPart[(n-1)/2])* Subst[Int[x^m*(1-x^2/a^2)^((n-1)/2),x],x,a*Cos[e+f*x]] /; FreeQ[{a,b,e,f,m,n},x] *) +("4_1_0_1_14", +@rule ∫(((~!a)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + simpler((~n), (~m)) ? +-(~b)^(2*intpart(((~n) - 1)⨸2) + 1)*((~b)*sin((~e) + (~f)*(~x)))^(2* fracpart(((~n) - 1)⨸2))*((~a)*cos((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)* (~f)*((~m) + 1)*(sin((~e) + (~f)*(~x))^2)^fracpart(((~n) - 1)⨸2))* hypergeometric2f1((1 + (~m))⨸2, (1 - (~n))⨸2, (3 + (~m))⨸2, cos((~e) + (~f)*(~x))^2) : nothing) + +("4_1_0_1_15", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*cos((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) ? +(~b)^(2*intpart(((~n) - 1)⨸2) + 1)*((~b)*cos((~e) + (~f)*(~x)))^(2* fracpart(((~n) - 1)⨸2))*((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)* (~f)*((~m) + 1)*(cos((~e) + (~f)*(~x))^2)^fracpart(((~n) - 1)⨸2))* hypergeometric2f1((1 + (~m))⨸2, (1 - (~n))⨸2, (3 + (~m))⨸2, sin((~e) + (~f)*(~x))^2) : nothing) + +("4_1_0_1_16", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + eq((~m) - (~n) + 2, 0) && + !eq((~m), -1) ? +(~b)*((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)*(~f)*((~m) + 1)) : nothing) + +("4_1_0_1_17", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~n), 1) && + gt((~m), 1) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~a)*(~b)*((~a)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~n) - 1)) - (~a)^2*(~b)^2*((~m) - 1)⨸((~n) - 1)* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_0_1_18", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + gt((~n), 1) && + ext_isinteger(2*(~m), 2*(~n)) ? +((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~b)*(~f)*((~m) - (~n))) - ((~n) + 1)⨸((~b)^2*((~m) - (~n)))* ∫(((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_1_19", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + lt((~n), -1) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~b)*(~f)*((~m) + 1)) - ((~n) + 1)⨸((~a)^2*(~b)^2*((~m) + 1))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_1_20", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + lt((~n), -1) && + !eq((~m) - (~n), 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~b)*(~f)*((~m) - (~n))) - ((~n) + 1)⨸((~b)^2*((~m) - (~n)))* ∫(((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_1_21", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + gt((~m), 1) && + !eq((~m) - (~n), 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +-(~a)*(~b)*((~a)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) - (~n))) + (~a)^2*((~m) - 1)⨸((~m) - (~n))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*sec((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_1_22", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~a)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)*(~f)*((~m) + 1)) + ((~m) - (~n) + 2)⨸((~a)^2*((~m) + 1))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*sec((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_1_23", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + ext_isinteger((~m) - 1/2) && + ext_isinteger((~n) - 1/2) ? +((~b)*cos((~e) + (~f)*(~x)))^(~n)*((~b)*sec((~e) + (~f)*(~x)))^(~n)* ∫(((~a)*sin((~e) + (~f)*(~x)))^(~m)⨸((~b)*cos((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_1_24", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) && + lt((~n), 1) ? +1⨸(~b)^2*((~b)*cos((~e) + (~f)*(~x)))^((~n) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 1)* ∫(((~a)*sin((~e) + (~f)*(~x)))^(~m)⨸((~b)*cos((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_1_25", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +(~b)^2*((~b)*cos((~e) + (~f)*(~x)))^((~n) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)* ∫(((~a)*sin((~e) + (~f)*(~x)))^(~m)⨸((~b)*cos((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_1_26", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +((~a)*(~b))^intpart((~n))*((~a)*sin((~e) + (~f)*(~x)))^fracpart((~n))*((~b)*csc((~e) + (~f)*(~x)))^ fracpart((~n))*∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) - (~n)), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.2 (a trg)^m (b tan)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.2 (a trg)^m (b tan)^n.jl new file mode 100644 index 0000000..2408e4f --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.2 (a trg)^m (b tan)^n.jl @@ -0,0 +1,255 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.0.2 (a trg)^m (b tan)^n *) +("4_1_0_2_1", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + eq((~m) + (~n) - 1, 0) ? +-(~b)*((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~m)) : nothing) + +("4_1_0_2_2", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*tan((~!e) + (~!f)*(~x))^(~!n),(~x)) => + !contains_var((~e), (~f), (~x)) && + ext_isinteger((~m), (~n), ((~m) + (~n) - 1)/2) ? +-1⨸(~f)*int_and_subst((1 - (~x)^2)^(((~m) + (~n) - 1)⨸2)⨸(~x)^(~n), (~x), (~x), cos((~e) + (~f)*(~x)), "4_1_0_2_2") : nothing) + +("4_1_0_2_3", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~b), (~e), (~f), (~n), (~x)) && + ext_isinteger((~m)/2) ? +(~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst((free_factors(tan((~e) + (~f)*(~x)), (~x))*(~x))^((~m) + (~n))⨸((~b)^2 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + 1), (~x), (~x), (~b)*tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_0_2_3") : nothing) + +("4_1_0_2_4", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*tan((~!e) + (~!f)*(~x))^(~!n),(~x)) => + !contains_var((~a), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~n) + 1)/2) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst((free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^((~m) + (~n))⨸((~a)^2 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~n) + 1)⨸2), (~x), (~x), (~a)*sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_0_2_4") : nothing) + +("4_1_0_2_5", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~n), 1) && + ( + lt((~m), -1) || + eq((~m), -1) && + eq((~n), 3/2) + ) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~a)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)^2* (~f)*((~n) - 1)) - (~b)^2*((~m) + 2)⨸((~a)^2*((~n) - 1))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_0_2_6", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + gt((~n), 1) && + ext_isinteger(2*(~m), 2*(~n)) && + !( + gt((~m), 1) && + !(ext_isinteger(((~m) - 1)/2)) + ) ? +(~b)*((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~n) - 1)) - (~b)^2*((~m) + (~n) - 1)⨸((~n) - 1)* ∫(((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_0_2_7", +@rule ∫(sqrt((~!a)*sin((~!e) + (~!f)*(~x)))/((~!b)*tan((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) ? +2*sqrt((~a)*sin((~e) + (~f)*(~x)))⨸((~b)*(~f)*sqrt((~b)*tan((~e) + (~f)*(~x)))) + (~a)^2⨸(~b)^2*∫(sqrt((~b)*tan((~e) + (~f)*(~x)))⨸((~a)*sin((~e) + (~f)*(~x)))^(3⨸2), (~x)) : nothing) + +("4_1_0_2_8", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + lt((~n), -1) && + gt((~m), 1) && + ext_isinteger(2*(~m), 2*(~n)) ? +((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*(~m)) - (~a)^2*((~n) + 1)⨸((~b)^2*(~m))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_2_9", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + lt((~n), -1) && + !eq((~m) + (~n) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n)) && + !( + eq((~n), -3/2) && + eq((~m), 1) + ) ? +((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*((~m) + (~n) + 1)) - ((~n) + 1)⨸((~b)^2*((~m) + (~n) + 1))* ∫(((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_2_10", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + ( + gt((~m), 1) || + eq((~m), 1) && + eq((~n), 1/2) + ) && + ext_isinteger(2*(~m), 2*(~n)) ? +-(~b)*((~a)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~m)) + (~a)^2*((~m) + (~n) - 1)⨸(~m)* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*tan((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_2_11", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + lt((~m), -1) && + !eq((~m) + (~n) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~a)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)^2* (~f)*((~m) + (~n) + 1)) + ((~m) + 2)⨸((~a)^2*((~m) + (~n) + 1))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*tan((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_2_12", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~m)*tan((~!e) + (~!f)*(~x))^(~n),(~x)) => + !contains_var((~a), (~e), (~f), (~m), (~x)) && + ext_isinteger((~n)) && + !(ext_isinteger((~m))) ? +1⨸(~a)^(~n)*∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) + (~n))⨸cos((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + +("4_1_0_2_13", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~n))) && + ( + ilt((~m), 0) || + eq((~m), 1) && + eq((~n), -1/2) || + ext_isinteger((~m) - 1/2, (~n) - 1/2) + ) ? +cos((~e) + (~f)*(~x))^(~n)*((~b)*tan((~e) + (~f)*(~x)))^(~n)⨸((~a)*sin((~e) + (~f)*(~x)))^(~n)* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) + (~n))⨸cos((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + +("4_1_0_2_14", +@rule ∫(((~!a)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~n))) ? +(~a)*cos( (~e) + (~f)*(~x))^((~n) + 1)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*((~a)*sin((~e) + (~f)*(~x)))^((~n) + 1))* ∫(((~a)*sin((~e) + (~f)*(~x)))^((~m) + (~n))⨸cos((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + +("4_1_0_2_15", +@rule ∫(((~!a)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +((~a)*cos((~e) + (~f)*(~x)))^fracpart((~m))*(sec((~e) + (~f)*(~x))⨸(~a))^fracpart((~m))* ∫(((~b)*tan((~e) + (~f)*(~x)))^(~n)⨸(sec((~e) + (~f)*(~x))⨸(~a))^(~m), (~x)) : nothing) + +("4_1_0_2_16", +@rule ∫(((~!a)*cot((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +((~a)*cot((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^(~m)* ∫(((~b)*tan((~e) + (~f)*(~x)))^((~n) - (~m)), (~x)) : nothing) + +("4_1_0_2_17", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + eq((~m) + (~n) + 1, 0) ? +-((~a)*sec((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*(~m)) : nothing) + +("4_1_0_2_18", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~n) - 1)/2) && + !( + ext_isinteger((~m)/2) && + lt(0, (~m), (~n) + 1) + ) ? +(~a)⨸(~f)*int_and_subst(((~a)*(~x))^((~m) - 1)*(-1 + (~x)^2)^(((~n) - 1)⨸2), (~x), (~x), sec((~e) + (~f)*(~x)), "4_1_0_2_18") : nothing) + +("4_1_0_2_19", +@rule ∫(sec((~!e) + (~!f)*(~x))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~b), (~e), (~f), (~n), (~x)) && + ext_isinteger((~m)/2) && + !( + ext_isinteger(((~n) - 1)/2) && + lt(0, (~n), (~m) - 1) + ) ? +1⨸(~f)*int_and_subst(((~b)*(~x))^(~n)*(1 + (~x)^2)^((~m)⨸2 - 1), (~x), (~x), tan((~e) + (~f)*(~x)), "4_1_0_2_19") : nothing) + +("4_1_0_2_20", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + lt((~n), -1) && + ( + gt((~m), 1) || + eq((~m), 1) && + eq((~n), -3/2) + ) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~a)^2*((~a)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)* (~f)*((~n) + 1)) - (~a)^2*((~m) - 2)⨸((~b)^2*((~n) + 1))* ∫(((~a)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_2_21", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + lt((~n), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +((~a)*sec((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*((~n) + 1)) - ((~m) + (~n) + 1)⨸((~b)^2*((~n) + 1))* ∫(((~a)*sec((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_2_22", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~n), 1) && + ( + lt((~m), -1) || + eq((~m), -1) && + eq((~n), 3/2) + ) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~a)*sec((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~m)) - (~b)^2*((~n) - 1)⨸((~a)^2*(~m))* ∫(((~a)*sec((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_0_2_23", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + gt((~n), 1) && + !eq((~m) + (~n) - 1, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~a)*sec((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) + (~n) - 1)) - (~b)^2*((~n) - 1)⨸((~m) + (~n) - 1)* ∫(((~a)*sec((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_0_2_24", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + ( + lt((~m), -1) || + eq((~m), -1) && + eq((~n), -1/2) + ) && + ext_isinteger(2*(~m), 2*(~n)) ? +-((~a)*sec((~e) + (~f)*(~x)))^(~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*(~m)) + ((~m) + (~n) + 1)⨸((~a)^2*(~m))* ∫(((~a)*sec((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*tan((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_2_25", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + ( + gt((~m), 1) || + eq((~m), 1) && + eq((~n), 1/2) + ) && + !eq((~m) + (~n) - 1, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~a)^2*((~a)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)* (~f)*((~m) + (~n) - 1)) + (~a)^2*((~m) - 2)⨸((~m) + (~n) - 1)* ∫(((~a)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*tan((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_2_26", +@rule ∫(sec((~!e) + (~!f)*(~x))/sqrt((~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~b), (~e), (~f), (~x)) ? +sqrt(sin((~e) + (~f)*(~x)))⨸(sqrt(cos((~e) + (~f)*(~x)))*sqrt((~b)*tan((~e) + (~f)*(~x))))* ∫(1⨸(sqrt(cos((~e) + (~f)*(~x)))*sqrt(sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_0_2_27", +@rule ∫(sqrt((~!b)*tan((~!e) + (~!f)*(~x)))/sec((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~b), (~e), (~f), (~x)) ? +sqrt(cos((~e) + (~f)*(~x)))*sqrt((~b)*tan((~e) + (~f)*(~x)))⨸sqrt(sin((~e) + (~f)*(~x)))* ∫(sqrt(cos((~e) + (~f)*(~x)))*sqrt(sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_0_2_28", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + ext_isinteger((~n) + 1/2) && + ext_isinteger((~m) + 1/2) ? +(~a)^((~m) + (~n))*((~b)*tan((~e) + (~f)*(~x)))^ (~n)⨸(((~a)*sec((~e) + (~f)*(~x)))^(~n)*((~b)*sin((~e) + (~f)*(~x)))^(~n))* ∫(((~b)*sin((~e) + (~f)*(~x)))^(~n)⨸cos((~e) + (~f)*(~x))^((~m) + (~n)), (~x)) : nothing) + +#(* Int[(a_.*sec[e_.+f_.*x_])^m_.*(b_.*tan[e_.+f_.*x_])^n_,x_Symbol]:= (a*Sec[e+f*x])^m*(b*Tan[e+f*x])^(n+1)*(Cos[e+f*x]^2)^((m+n+1)/2)/(b* f*(b*Sin[e+f*x])^(n+1))* Subst[Int[x^n/(1-x^2/b^2)^((m+n+1)/2),x],x,b*Sin[e+f*x]] /; FreeQ[{a,b,e,f,m,n},x] && Not[IntegerQ[(n-1)/2]] && Not[IntegerQ[m/2]] *) +("4_1_0_2_29", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger(((~n) - 1)/2)) && + !(ext_isinteger((~m)/2)) ? +((~a)*sec((~e) + (~f)*(~x)))^ (~m)*((~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)*(cos((~e) + (~f)*(~x))^2)^(((~m) + (~n) + 1)⨸2)⨸((~b)* (~f)*((~n) + 1))* hypergeometric2f1(((~n) + 1)⨸2, ((~m) + (~n) + 1)⨸2, ((~n) + 3)⨸2, sin((~e) + (~f)*(~x))^2) : nothing) + +("4_1_0_2_30", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +((~a)*csc((~e) + (~f)*(~x)))^fracpart((~m))*(sin((~e) + (~f)*(~x))⨸(~a))^fracpart((~m))* ∫(((~b)*tan((~e) + (~f)*(~x)))^(~n)⨸(sin((~e) + (~f)*(~x))⨸(~a))^(~m), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.3 (a csc)^m (b sec)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.3 (a csc)^m (b sec)^n.jl new file mode 100644 index 0000000..648ad26 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.0/4.1.0.3 (a csc)^m (b sec)^n.jl @@ -0,0 +1,110 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.0.3 (a csc)^m (b sec)^n *) +("4_1_0_3_1", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + eq((~m) + (~n) - 2, 0) && + !eq((~n), 1) ? +(~a)*(~b)*((~a)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~n) - 1)) : nothing) + +("4_1_0_3_2", +@rule ∫(csc((~!e) + (~!f)*(~x))^(~!m)*sec((~!e) + (~!f)*(~x))^(~!n),(~x)) => + !contains_var((~e), (~f), (~x)) && + ext_isinteger((~m), (~n), ((~m) + (~n))/2) ? +1⨸(~f)*int_and_subst((1 + (~x)^2)^(((~m) + (~n))⨸2 - 1)⨸(~x)^(~m), (~x), (~x), tan((~e) + (~f)*(~x)), "4_1_0_3_2") : nothing) + +("4_1_0_3_3", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*sec((~!e) + (~!f)*(~x))^(~!n),(~x)) => + !contains_var((~a), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~n) + 1)/2) && + !( + ext_isinteger(((~m) + 1)/2) && + lt(0, (~m), (~n)) + ) ? +-1⨸((~f)*(~a)^(~n))* int_and_subst((~x)^((~m) + (~n) - 1)⨸(-1 + (~x)^2⨸(~a)^2)^(((~n) + 1)⨸2), (~x), (~x), (~a)*csc((~e) + (~f)*(~x)), "4_1_0_3_3") : nothing) + +("4_1_0_3_4", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~m)*csc((~!e) + (~!f)*(~x))^(~!n),(~x)) => + !contains_var((~a), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~n) + 1)/2) && + !( + ext_isinteger(((~m) + 1)/2) && + lt(0, (~m), (~n)) + ) ? +1⨸((~f)*(~a)^(~n))* int_and_subst((~x)^((~m) + (~n) - 1)⨸(-1 + (~x)^2⨸(~a)^2)^(((~n) + 1)⨸2), (~x), (~x), (~a)*sec((~e) + (~f)*(~x)), "4_1_0_3_4") : nothing) + +("4_1_0_3_5", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~m), 1) && + lt((~n), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +-(~a)*((~a)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)* (~b)*((~m) - 1)) + (~a)^2*((~n) + 1)⨸((~b)^2*((~m) - 1))* ∫(((~a)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_3_6", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~n), 1) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~a)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~a)*((~n) - 1)) + (~b)^2*((~m) + 1)⨸((~a)^2*((~n) - 1))* ∫(((~a)*csc((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_0_3_7", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + gt((~m), 1) && + ext_isinteger(2*(~m), 2*(~n)) && + !(gt((~n), (~m))) ? +-(~a)*(~b)*((~a)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) - 1)) + (~a)^2*((~m) + (~n) - 2)⨸((~m) - 1)* ∫(((~a)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*sec((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_3_8", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + gt((~n), 1) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~a)*(~b)*((~a)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~n) - 1)) + (~b)^2*((~m) + (~n) - 2)⨸((~n) - 1)* ∫(((~a)*csc((~e) + (~f)*(~x)))^(~m)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_0_3_9", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + lt((~m), -1) && + !eq((~m) + (~n), 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~a)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)*(~f)*((~m) + (~n))) + ((~m) + 1)⨸((~a)^2*((~m) + (~n)))* ∫(((~a)*csc((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*sec((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_0_3_10", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~!m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + lt((~n), -1) && + !eq((~m) + (~n), 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +-(~a)*((~a)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)* (~f)*((~m) + (~n))) + ((~n) + 1)⨸((~b)^2*((~m) + (~n)))* ∫(((~a)*csc((~e) + (~f)*(~x)))^(~m)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_0_3_11", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~n))) && + eq((~m) + (~n), 0) ? +((~a)*csc((~e) + (~f)*(~x)))^(~m)*((~b)*sec((~e) + (~f)*(~x)))^(~n)⨸tan((~e) + (~f)*(~x))^(~n)* ∫(tan((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + +("4_1_0_3_12", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + ext_isinteger((~m) - 1/2) && + ext_isinteger((~n) - 1/2) ? +((~a)*csc((~e) + (~f)*(~x)))^(~m)*((~b)*sec((~e) + (~f)*(~x)))^(~n)*((~a)*sin((~e) + (~f)*(~x)))^ (~m)*((~b)*cos((~e) + (~f)*(~x)))^(~n)* ∫(((~a)*sin((~e) + (~f)*(~x)))^(-(~m))*((~b)*cos((~e) + (~f)*(~x)))^(-(~n)), (~x)) : nothing) + +("4_1_0_3_13", +@rule ∫(((~!a)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) && + !(simpler(-(~m), -(~n))) ? +(~a)^2⨸(~b)^2*((~a)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sec((~e) + (~f)*(~x)))^((~n) + 1)*((~a)* sin((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*cos((~e) + (~f)*(~x)))^((~n) + 1)* ∫(((~a)*sin((~e) + (~f)*(~x)))^(-(~m))*((~b)*cos((~e) + (~f)*(~x)))^(-(~n)), (~x)) : nothing) + +("4_1_0_3_14", +@rule ∫(((~!a)*sec((~!e) + (~!f)*(~x)))^(~m)*((~!b)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~n), (~x)) ? +(~a)^2⨸(~b)^2*((~a)*sec((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*csc((~e) + (~f)*(~x)))^((~n) + 1)*((~a)* cos((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 1)* ∫(((~a)*cos((~e) + (~f)*(~x)))^(-(~m))*((~b)*sin((~e) + (~f)*(~x)))^(-(~n)), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.1 (a+b sin)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.1 (a+b sin)^n.jl new file mode 100644 index 0000000..099d35a --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.1 (a+b sin)^n.jl @@ -0,0 +1,230 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.1.1 (a+b sin)^n *) +("4_1_1_1_1", +@rule ∫(sin((~!c) + (~!d)*(~x))^(~n),(~x)) => + !contains_var((~c), (~d), (~x)) && + igt(((~n) - 1)/2, 0) ? +-1⨸(~d)*int_and_subst(ext_expand((1 - (~x)^2)^(((~n) - 1)⨸2), (~x)), (~x), (~x), cos((~c) + (~d)*(~x)), "4_1_1_1_1") : nothing) + +("4_1_1_1_2", +@rule ∫(sin((~!c) + (~!d)*(~x)/2)^2,(~x)) => + !contains_var((~c), (~d), (~x)) ? +(~x)⨸2 - sin(2*(~c) + (~d)*(~x))⨸(2*(~d)) : nothing) + +#(* original line: Int[(b_.*sin[c_. + d_.*x_])^n_, x_Symbol] := (* -Cot[c+d*x]*(c*Sin[c+d*x])^n/(d*n) + b^2*(n-1)/n*Int[(b*Sin[c+d*x])^(n-2),x] *) -b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1)/(d*n) + b^2*(n - 1)/n*Int[(b*Sin[c + d*x])^(n - 2), x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n] *) +("4_1_1_1_3", +@rule ∫(((~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + gt((~n), 1) && + ext_isinteger(2*(~n)) ? +-(~b)*cos((~c) + (~d)*(~x))*((~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*(~n)) + (~b)^2*((~n) - 1)⨸(~n)*∫(((~b)*sin((~c) + (~d)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_1_1_4", +@rule ∫(((~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + lt((~n), -1) && + ext_isinteger(2*(~n)) ? +cos((~c) + (~d)*(~x))*((~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸((~b)*(~d)*((~n) + 1)) + ((~n) + 2)⨸((~b)^2*((~n) + 1))*∫(((~b)*sin((~c) + (~d)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_1_1_5", +@rule ∫(sin((~!c) + Pi/2 + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~x)) ? +sin((~c) + (~d)*(~x))⨸(~d) : nothing) + +("4_1_1_1_6", +@rule ∫(sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~x)) ? +-cos((~c) + (~d)*(~x))⨸(~d) : nothing) + +# added by Mattia Micheletta Merlin +("4_1_1_1_6_1", +@rule ∫(cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~x)) ? +sin((~c) + (~d)*(~x))⨸(~d) : nothing) + +#(* Int[1/sin[c_.+d_.*x_],x_Symbol] := Int[Csc[c+d*x],x] /; FreeQ[{c,d},x] *) +("4_1_1_1_7", +@rule ∫(sqrt(sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~c), (~d), (~x)) ? +2⨸(~d)*elliptic_e(1⨸2*((~c) - π⨸2 + (~d)*(~x)), 2) : nothing) + +("4_1_1_1_8", +@rule ∫(1/sqrt(sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~c), (~d), (~x)) ? +2⨸(~d)*elliptic_f(1⨸2*((~c) - π⨸2 + (~d)*(~x)), 2) : nothing) + +("4_1_1_1_9", +@rule ∫(((~b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + lt(-1, (~n), 1) && + ext_isinteger(2*(~n)) ? +((~b)*sin((~c) + (~d)*(~x)))^(~n)⨸sin((~c) + (~d)*(~x))^(~n)*∫(sin((~c) + (~d)*(~x))^(~n), (~x)) : nothing) + +#(* Int[(b_.*sin[c_.+d_.*x_])^n_,x_Symbol] := Cos[c+d*x]/(b*d*Sqrt[Cos[c+d*x]^2])*Subst[Int[x^n/Sqrt[1-x^2/b^2],x] ,x,b*Sin[c+d*x]] /; FreeQ[{b,c,d,n},x] && Not[IntegerQ[2*n] || IntegerQ[3*n]] *) +("4_1_1_1_10", +@rule ∫(((~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~n), (~x)) && + !(ext_isinteger(2*(~n))) ? +cos((~c) + (~d)*(~x))*((~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸((~b)*(~d)*((~n) + 1)*sqrt(cos((~c) + (~d)*(~x))^2))* hypergeometric2f1(1⨸2, ((~n) + 1)⨸2, ((~n) + 3)⨸2, sin((~c) + (~d)*(~x))^2) : nothing) + +("4_1_1_1_11", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) ? +(2*(~a)^2 + (~b)^2)*(~x)⨸2 - 2*(~a)*(~b)*cos((~c) + (~d)*(~x))⨸(~d) - (~b)^2*cos((~c) + (~d)*(~x))*sin((~c) + (~d)*(~x))⨸(2*(~d)) : nothing) + +("4_1_1_1_12", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~n), 0) ? +∫(ext_expand(((~a) + (~b)*sin((~c) + (~d)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_1_1_1_13", +@rule ∫(sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-2*(~b)*cos((~c) + (~d)*(~x))⨸((~d)*sqrt((~a) + (~b)*sin((~c) + (~d)*(~x)))) : nothing) + +("4_1_1_1_14", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~n) - 1/2, 0) ? +-(~b)*cos((~c) + (~d)*(~x))*((~a) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*(~n)) + (~a)*(2*(~n) - 1)⨸(~n)*∫(((~a) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_1_1_1_15", +@rule ∫(1/((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-cos((~c) + (~d)*(~x))⨸((~d)*((~b) + (~a)*sin((~c) + (~d)*(~x)))) : nothing) + +("4_1_1_1_16", +@rule ∫(1/sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-2⨸(~d)*int_and_subst(1⨸(2*(~a) - (~x)^2), (~x), (~x), (~b)*cos((~c) + (~d)*(~x))⨸sqrt((~a) + (~b)*sin((~c) + (~d)*(~x))), "4_1_1_1_16") : nothing) + +("4_1_1_1_17", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~n), -1) && + ext_isinteger(2*(~n)) ? +(~b)*cos((~c) + (~d)*(~x))*((~a) + (~b)*sin((~c) + (~d)*(~x)))^(~n)⨸((~a)*(~d)*(2*(~n) + 1)) + ((~n) + 1)⨸((~a)*(2*(~n) + 1))*∫(((~a) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1), (~x)) : nothing) + +#(* Int[(a_+b_.*sin[c_.+d_.*x_])^n_,x_Symbol] := a^2*Cos[c+d*x]/(d*Sqrt[a+b*Sin[c+d*x]]*Sqrt[a-b*Sin[c+d*x]])*Subst[Int[(a+b*x)^(n-1/2)/Sqrt[a-b*x],x],x,Sin[c+d*x]] /; FreeQ[{a,b,c,d,n},x] && EqQ[a^2-b^2,0] && Not[IntegerQ[2*n]] *) +("4_1_1_1_18", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger(2*(~n))) && + gt((~a), 0) ? +-2^((~n) + 1⨸2)*(~a)^((~n) - 1⨸2)*(~b)* cos((~c) + (~d)*(~x))⨸((~d)*sqrt((~a) + (~b)*sin((~c) + (~d)*(~x))))* hypergeometric2f1(1⨸2, 1⨸2 - (~n), 3⨸2, 1⨸2*(1 - (~b)*sin((~c) + (~d)*(~x))⨸(~a))) : nothing) + +("4_1_1_1_19", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger(2*(~n))) && + !(gt((~a), 0)) ? +(~a)^intpart((~n))*((~a) + (~b)*sin((~c) + (~d)*(~x)))^ fracpart((~n))⨸(1 + (~b)⨸(~a)*sin((~c) + (~d)*(~x)))^fracpart((~n))* ∫((1 + (~b)⨸(~a)*sin((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + +("4_1_1_1_20", +@rule ∫(sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~a) + (~b), 0) ? +2*sqrt((~a) + (~b))⨸(~d)*elliptic_e(1⨸2*((~c) - π⨸2 + (~d)*(~x)), 2*(~b)⨸((~a) + (~b))) : nothing) + +("4_1_1_1_21", +@rule ∫(sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~a) - (~b), 0) ? +2*sqrt((~a) - (~b))⨸(~d)*elliptic_e(1⨸2*((~c) + π⨸2 + (~d)*(~x)), -2*(~b)⨸((~a) - (~b))) : nothing) + +("4_1_1_1_22", +@rule ∫(sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !(gt((~a) + (~b), 0)) ? +sqrt((~a) + (~b)*sin((~c) + (~d)*(~x)))⨸sqrt(((~a) + (~b)*sin((~c) + (~d)*(~x)))⨸((~a) + (~b)))* ∫(sqrt((~a)⨸((~a) + (~b)) + (~b)⨸((~a) + (~b))*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_1_1_23", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~n), 1) && + ext_isinteger(2*(~n)) ? +-(~b)*cos((~c) + (~d)*(~x))*((~a) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*(~n)) + 1⨸(~n)* ∫(((~a) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2)* simplify((~a)^2*(~n) + (~b)^2*((~n) - 1) + (~a)*(~b)*(2*(~n) - 1)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_1_1_24", +@rule ∫(1/((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + gt((~a)^2 - (~b)^2, 0) && + pos((~a)) ? +(~x)⨸rt((~a)^2 - (~b)^2, 2) + 2⨸((~d)*rt((~a)^2 - (~b)^2, 2))*atan((~b)*cos((~c) + (~d)*(~x))⨸((~a) + rt((~a)^2 - (~b)^2, 2) + (~b)*sin((~c) + (~d)*(~x)))) : nothing) + +("4_1_1_1_25", +@rule ∫(1/((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + gt((~a)^2 - (~b)^2, 0) && + neg((~a)) ? +-(~x)⨸rt((~a)^2 - (~b)^2, 2) - 2⨸((~d)*rt((~a)^2 - (~b)^2, 2))*atan((~b)*cos((~c) + (~d)*(~x))⨸((~a) - rt((~a)^2 - (~b)^2, 2) + (~b)*sin((~c) + (~d)*(~x)))) : nothing) + +("4_1_1_1_26", +@rule ∫(1/((~a) + (~!b)*sin((~!c) + Pi/2 + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*free_factors(tan(((~c) + (~d)*(~x))⨸2), (~x))⨸(~d)* int_and_subst(1⨸((~a) + (~b) + ((~a) - (~b))*free_factors(tan(((~c) + (~d)*(~x))⨸2), (~x))^2*(~x)^2), (~x), (~x), tan(((~c) + (~d)*(~x))⨸2)⨸free_factors(tan(((~c) + (~d)*(~x))⨸2), (~x)), "4_1_1_1_26") : nothing) + +("4_1_1_1_27", +@rule ∫(1/((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*free_factors(tan(((~c) + (~d)*(~x))⨸2), (~x))⨸(~d)* int_and_subst(1⨸((~a) + 2*(~b)*free_factors(tan(((~c) + (~d)*(~x))⨸2), (~x))*(~x) + (~a)*free_factors(tan(((~c) + (~d)*(~x))⨸2), (~x))^2*(~x)^2), (~x), (~x), tan(((~c) + (~d)*(~x))⨸2)⨸free_factors(tan(((~c) + (~d)*(~x))⨸2), (~x)), "4_1_1_1_27") : nothing) + +("4_1_1_1_28", +@rule ∫(1/sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~a) + (~b), 0) ? +2⨸((~d)*sqrt((~a) + (~b)))*elliptic_f(1⨸2*((~c) - π⨸2 + (~d)*(~x)), 2*(~b)⨸((~a) + (~b))) : nothing) + +("4_1_1_1_29", +@rule ∫(1/sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~a) - (~b), 0) ? +2⨸((~d)*sqrt((~a) - (~b)))*elliptic_f(1⨸2*((~c) + π⨸2 + (~d)*(~x)), -2*(~b)⨸((~a) - (~b))) : nothing) + +("4_1_1_1_30", +@rule ∫(1/sqrt((~a) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !(gt((~a) + (~b), 0)) ? +sqrt(((~a) + (~b)*sin((~c) + (~d)*(~x)))⨸((~a) + (~b)))⨸sqrt((~a) + (~b)*sin((~c) + (~d)*(~x)))* ∫(1⨸sqrt((~a)⨸((~a) + (~b)) + (~b)⨸((~a) + (~b))*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_1_1_31", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~n), -1) && + ext_isinteger(2*(~n)) ? +-(~b)*cos( (~c) + (~d)*(~x))*((~a) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸((~d)*((~n) + 1)*((~a)^2 - (~b)^2)) + 1⨸(((~n) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)* simplify((~a)*((~n) + 1) - (~b)*((~n) + 2)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_1_1_32", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger(2*(~n))) ? +cos((~c) + (~d)*(~x))⨸((~d)*sqrt(1 + sin((~c) + (~d)*(~x)))*sqrt(1 - sin((~c) + (~d)*(~x))))* int_and_subst(((~a) + (~b)*(~x))^(~n)⨸(sqrt(1 + (~x))*sqrt(1 - (~x))), (~x), (~x), sin((~c) + (~d)*(~x)), "4_1_1_1_32") : nothing) + +("4_1_1_1_33", +@rule ∫(((~a) + (~!b)*sin((~!c) + (~!d)*(~x))*cos((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) ? +∫(((~a) + (~b)*sin(2*(~c) + 2*(~d)*(~x))⨸2)^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.2 (g cos)^p (a+b sin)^m.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.2 (g cos)^p (a+b sin)^m.jl new file mode 100644 index 0000000..928fc1b --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.2 (g cos)^p (a+b sin)^m.jl @@ -0,0 +1,331 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.1.2 (g cos)^p (a+b sin)^m *) +("4_1_1_2_1", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~p) - 1)/2) && + eq((~a)^2 - (~b)^2, 0) && + ( + ge((~p), -1) || + !(ext_isinteger((~m) + 1/2)) + ) ? +1⨸((~b)^(~p)*(~f))* int_and_subst(((~a) + (~x))^((~m) + ((~p) - 1)⨸2)*((~a) - (~x))^(((~p) - 1)⨸2), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_1_2_1") : nothing) + +("4_1_1_2_2", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~p) - 1)/2) && + !eq((~a)^2 - (~b)^2, 0) ? +1⨸((~b)^(~p)*(~f))* int_and_subst(((~a) + (~x))^(~m)*((~b)^2 - (~x)^2)^(((~p) - 1)⨸2), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_1_2_2") : nothing) + +("4_1_1_2_3", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + ( + ext_isinteger(2*(~p)) || + !eq((~a)^2 - (~b)^2, 0) + ) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)⨸((~f)*(~g)*((~p) + 1)) + (~a)*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + +("4_1_1_2_4", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + lt((~p), -1) && + ge(2*(~m) + (~p), 0) ? +((~a)⨸(~g))^(2*(~m))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p))⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_1_2_5", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq(simplify((~m) + (~p) + 1), 0) && + !(ilt((~p), 0)) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(~g)*(~m)) : nothing) + +("4_1_1_2_6", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ilt(simplify((~m) + (~p) + 1), 0) && + !eq(2*(~m) + (~p) + 1, 0) && + !(igt((~m), 0)) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~a)*(~f)*(~g)*simplify(2*(~m) + (~p) + 1)) + simplify((~m) + (~p) + 1)⨸((~a)*simplify(2*(~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_1_1_2_7", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq(2*(~m) + (~p) - 1, 0) && + !eq((~m), 1) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)⨸((~f)* (~g)*((~m) - 1)) : nothing) + +("4_1_1_2_8", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt(simplify((2*(~m) + (~p) - 1)/2), 0) && + !eq((~m) + (~p), 0) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)⨸((~f)* (~g)*((~m) + (~p))) + (~a)*(2*(~m) + (~p) - 1)⨸((~m) + (~p))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1), (~x)) : nothing) + +("4_1_1_2_9", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + le((~p), -2*(~m)) && + ext_isinteger((~m) + 1/2, 2*(~p)) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~a)*(~f)*(~g)*((~p) + 1)) + (~a)*((~m) + (~p) + 1)⨸((~g)^2*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1), (~x)) : nothing) + +("4_1_1_2_10", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 1) && + lt((~p), -1) && + ext_isinteger(2*(~m), 2*(~p)) ? +-2*(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)⨸((~f)* (~g)*((~p) + 1)) + (~b)^2*(2*(~m) + (~p) - 1)⨸((~g)^2*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2), (~x)) : nothing) + +("4_1_1_2_11", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/sqrt((~!g)*cos((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +(~a)*sqrt(1 + cos((~e) + (~f)*(~x)))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~a) + (~a)*cos((~e) + (~f)*(~x)) + (~b)*sin((~e) + (~f)*(~x)))* ∫(sqrt(1 + cos((~e) + (~f)*(~x)))⨸sqrt((~g)*cos((~e) + (~f)*(~x))), (~x)) + (~b)*sqrt(1 + cos((~e) + (~f)*(~x)))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~a) + (~a)*cos((~e) + (~f)*(~x)) + (~b)*sin((~e) + (~f)*(~x)))* ∫(sin((~e) + (~f)*(~x))⨸(sqrt((~g)*cos((~e) + (~f)*(~x)))*sqrt(1 + cos((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_1_2_12", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + !eq((~m) + (~p), 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)⨸((~f)* (~g)*((~m) + (~p))) + (~a)*(2*(~m) + (~p) - 1)⨸((~m) + (~p))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1), (~x)) : nothing) + +("4_1_1_2_13", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + gt((~p), 1) && + ( + gt((~m), -2) || + eq(2*(~m) + (~p) + 1, 0) || + eq((~m), -2) && + ext_isinteger((~p)) + ) && + !eq((~m) + (~p), 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)* (~f)*((~m) + (~p))) + (~g)^2*((~p) - 1)⨸((~a)*((~m) + (~p)))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_1_1_2_14", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + le((~m), -2) && + gt((~p), 1) && + !eq(2*(~m) + (~p) + 1, 0) && + !(ilt((~m) + (~p) + 1, 0)) && + ext_isinteger(2*(~m), 2*(~p)) ? +2*(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)* (~f)*(2*(~m) + (~p) + 1)) + (~g)^2*((~p) - 1)⨸((~b)^2*(2*(~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2), (~x)) : nothing) + +("4_1_1_2_15", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + !eq(2*(~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~a)*(~f)*(~g)*(2*(~m) + (~p) + 1)) + ((~m) + (~p) + 1)⨸((~a)*(2*(~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_1_1_2_16", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~p), 1) && + ext_isinteger(2*(~p)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)⨸((~b)*(~f)*((~p) - 1)) + (~g)^2⨸(~a)*∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2), (~x)) : nothing) + +("4_1_1_2_17", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ge((~p), 1)) && + ext_isinteger(2*(~p)) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)⨸((~a)*(~f)*(~g)*((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))) + (~p)⨸((~a)*((~p) - 1))*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + +("4_1_1_2_18", +@rule ∫(sqrt((~!g)*cos((~!e) + (~!f)*(~x)))/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +(~g)*sqrt(1 + cos((~e) + (~f)*(~x)))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~a) + (~a)*cos((~e) + (~f)*(~x)) + (~b)*sin((~e) + (~f)*(~x)))* ∫(sqrt(1 + cos((~e) + (~f)*(~x)))⨸sqrt((~g)*cos((~e) + (~f)*(~x))), (~x)) - (~g)*sqrt(1 + cos((~e) + (~f)*(~x)))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~b) + (~b)*cos((~e) + (~f)*(~x)) + (~a)*sin((~e) + (~f)*(~x)))* ∫(sin((~e) + (~f)*(~x))⨸(sqrt((~g)*cos((~e) + (~f)*(~x)))*sqrt(1 + cos((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_1_2_19", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(3//2)/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +(~g)*sqrt((~g)*cos((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~b)*(~f)) + (~g)^2⨸(2*(~a))*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~g)*cos((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_20", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~p), 2) && + ext_isinteger(2*(~p)) ? +-2*(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)⨸((~f)* (~g)*(2*(~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)) + 2*(~a)*((~p) - 2)⨸(2*(~p) - 1)* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)⨸((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2), (~x)) : nothing) + +("4_1_1_2_21", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~p), -1) && + ext_isinteger(2*(~p)) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)⨸((~a)*(~f)*(~g)*((~p) + 1)* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) + (~a)*(2*(~p) + 1)⨸(2*(~g)^2*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)⨸((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2), (~x)) : nothing) + +("4_1_1_2_22", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) ? +(~a)^(~m)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)⨸((~f)* (~g)*(1 + sin((~e) + (~f)*(~x)))^(((~p) + 1)⨸2)*(1 - sin((~e) + (~f)*(~x)))^(((~p) + 1)⨸2))* int_and_subst((1 + (~b)⨸(~a)*(~x))^((~m) + ((~p) - 1)⨸2)*(1 - (~b)⨸(~a)*(~x))^(((~p) - 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_1_2_22") : nothing) + +("4_1_1_2_23", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) ? +(~a)^2*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)⨸((~f)* (~g)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(((~p) + 1)⨸2)*((~a) - (~b)*sin((~e) + (~f)*(~x)))^(((~p) + 1)⨸2))* int_and_subst(((~a) + (~b)*(~x))^((~m) + ((~p) - 1)⨸2)*((~a) - (~b)*(~x))^(((~p) - 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_1_2_23") : nothing) + +("4_1_1_2_24", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt(0, (~m), 1) && + lt((~p), -1) && + ( + ext_isinteger(2*(~m), 2*(~p)) || + ext_isinteger((~m)) + ) ? +-((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* sin((~e) + (~f)*(~x))⨸((~f)*(~g)*((~p) + 1)) + 1⨸((~g)^2*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~a)*((~p) + 2) + (~b)*((~m) + (~p) + 2)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_25", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 1) && + lt((~p), -1) && + ( + ext_isinteger(2*(~m), 2*(~p)) || + ext_isinteger((~m)) + ) ? +-((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~b) + (~a)*sin((~e) + (~f)*(~x)))⨸((~f)*(~g)*((~p) + 1)) + 1⨸((~g)^2*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~b)^2*((~m) - 1) + (~a)^2*((~p) + 2) + (~a)*(~b)*((~m) + (~p) + 1)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_26", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 1) && + !eq((~m) + (~p), 0) && + ( + ext_isinteger(2*(~m), 2*(~p)) || + ext_isinteger((~m)) + ) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)⨸((~f)* (~g)*((~m) + (~p))) + 1⨸((~m) + (~p))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~b)^2*((~m) - 1) + (~a)^2*((~m) + (~p)) + (~a)*(~b)*(2*(~m) + (~p) - 1)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_27", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + gt((~p), 1) && + ext_isinteger(2*(~m), 2*(~p)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)* (~f)*((~m) + 1)) + (~g)^2*((~p) - 1)⨸((~b)*((~m) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* sin((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_1_2_28", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~p)) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~f)* (~g)*((~a)^2 - (~b)^2)*((~m) + 1)) + 1⨸(((~a)^2 - (~b)^2)*((~m) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~a)*((~m) + 1) - (~b)*((~m) + (~p) + 2)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_29", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~p), 1) && + !eq((~m) + (~p), 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)* (~f)*((~m) + (~p))) + (~g)^2*((~p) - 1)⨸((~b)*((~m) + (~p)))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~b) + (~a)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_30", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~p), -1) && + ext_isinteger(2*(~m), 2*(~p)) ? +((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b) - (~a)*sin((~e) + (~f)*(~x)))⨸((~f)*(~g)*((~a)^2 - (~b)^2)*((~p) + 1)) + 1⨸((~g)^2*((~a)^2 - (~b)^2)*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~a)^2*((~p) + 2) - (~b)^2*((~m) + (~p) + 2) + (~a)*(~b)*((~m) + (~p) + 3)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_31", +@rule ∫(1/(sqrt((~!g)*cos((~!e) + (~!f)*(~x)))*sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*sqrt(2)*sqrt((~g)*cos((~e) + (~f)*(~x)))* sqrt(((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(((~a) - (~b))*(1 - sin((~e) + (~f)*(~x)))))⨸ ((~f)*(~g)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((1 + cos((~e) + (~f)*(~x)) + sin((~e) + (~f)*(~x)))⨸(1 + cos((~e) + (~f)*(~x)) - sin((~e) + (~f)*(~x)))))* int_and_subst(1⨸sqrt(1 + ((~a) + (~b))*(~x)^4⨸((~a) - (~b))), (~x), (~x), sqrt((1 + cos((~e) + (~f)*(~x)) + sin((~e) + (~f)*(~x)))⨸(1 + cos((~e) + (~f)*(~x)) - sin((~e) + (~f)*(~x)))), "4_1_1_2_31") : nothing) + +("4_1_1_2_32", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~p) + 1, 0) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*(1 - sin((~e) + (~f)*(~x)))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*(-((~a) - (~b))*(1 - sin((~e) + (~f)*(~x)))⨸(((~a) + (~b))*(1 + sin((~e) + (~f)*(~x)))))^((~m)⨸2)⨸ ((~f)*((~a) + (~b))*((~m) + 1))* hypergeometric2f1((~m) + 1, (~m)⨸2 + 1, (~m) + 2, 2*((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(((~a) + (~b))*(1 + sin((~e) + (~f)*(~x))))) : nothing) + +("4_1_1_2_33", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~p) + 2, 0) ? +((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~f)* (~g)*((~a) - (~b))*((~p) + 1)) + (~a)⨸((~g)^2*((~a) - (~b)))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸(1 - sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_34", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ilt((~m) + (~p) + 2, 0) ? +((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~f)* (~g)*((~a) - (~b))*((~p) + 1)) - (~b)*((~m) + (~p) + 2)⨸((~g)^2*((~a) - (~b))*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) + (~a)⨸((~g)^2*((~a) - (~b)))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸(1 - sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_2_35", +@rule ∫(sqrt((~!g)*cos((~!e) + (~!f)*(~x)))/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~a)*(~g)⨸(2*(~b))*∫(1⨸(sqrt((~g)*cos((~e) + (~f)*(~x)))*(rt(-(~a)^2 + (~b)^2, 2) + (~b)*cos((~e) + (~f)*(~x)))), (~x)) - (~a)*(~g)⨸(2*(~b))* ∫(1⨸(sqrt((~g)*cos((~e) + (~f)*(~x)))*(rt(-(~a)^2 + (~b)^2, 2) - (~b)*cos((~e) + (~f)*(~x)))), (~x)) + (~b)*(~g)⨸(~f)* int_and_subst(sqrt((~x))⨸((~g)^2*((~a)^2 - (~b)^2) + (~b)^2*(~x)^2), (~x), (~x), (~g)*cos((~e) + (~f)*(~x)), "4_1_1_2_35") : nothing) + +("4_1_1_2_36", +@rule ∫(1/(sqrt((~!g)*cos((~!e) + (~!f)*(~x)))*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-(~a)⨸(2*rt(-(~a)^2 + (~b)^2, 2))* ∫(1⨸(sqrt((~g)*cos((~e) + (~f)*(~x)))*(rt(-(~a)^2 + (~b)^2, 2) + (~b)*cos((~e) + (~f)*(~x)))), (~x)) - (~a)⨸(2*rt(-(~a)^2 + (~b)^2, 2))* ∫(1⨸(sqrt((~g)*cos((~e) + (~f)*(~x)))*(rt(-(~a)^2 + (~b)^2, 2) - (~b)*cos((~e) + (~f)*(~x)))), (~x)) + (~b)*(~g)⨸(~f)* int_and_subst(1⨸(sqrt((~x))*((~g)^2*((~a)^2 - (~b)^2) + (~b)^2*(~x)^2)), (~x), (~x), (~g)*cos((~e) + (~f)*(~x)), "4_1_1_2_36") : nothing) + +("4_1_1_2_37", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ilt((~m), 0) && + !(igt((~m) + (~p) + 1, 0)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸ ((~b)* (~f)*((~m) + (~p))*(-(~b)*(1 - sin((~e) + (~f)*(~x)))⨸((~a) + (~b)*sin((~e) + (~f)*(~x))))^(((~p) - 1)⨸ 2)*((~b)*(1 + sin((~e) + (~f)*(~x)))⨸((~a) + (~b)*sin((~e) + (~f)*(~x))))^(((~p) - 1)⨸2))* appell_f1(-(~p) - (~m), (1 - (~p))⨸2, (1 - (~p))⨸2, 1 - (~p) - (~m), ((~a) + (~b))⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), ((~a) - (~b))⨸((~a) + (~b)*sin((~e) + (~f)*(~x)))) : nothing) + +("4_1_1_2_38", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !(igt((~m), 0)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)⨸((~f)*(1 - ((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~a) - (~b)))^(((~p) - 1)⨸ 2)*(1 - ((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~a) + (~b)))^(((~p) - 1)⨸2))* int_and_subst((-(~b)⨸((~a) - (~b)) - (~b)*(~x)⨸((~a) - (~b)))^(((~p) - 1)⨸2)*((~b)⨸((~a) + (~b)) - (~b)*(~x)⨸((~a) + (~b)))^(((~p) - 1)⨸2)*((~a) + (~b)*(~x))^(~m), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_1_2_38") : nothing) + +("4_1_1_2_39", +@rule ∫(((~!g)*sec((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~g)^(2*intpart((~p)))*((~g)*cos((~e) + (~f)*(~x)))^fracpart((~p))*((~g)*sec((~e) + (~f)*(~x)))^ fracpart((~p))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~g)*cos((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.3 (g tan)^p (a+b sin)^m.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.3 (g tan)^p (a+b sin)^m.jl new file mode 100644 index 0000000..32a333b --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.1/4.1.1.3 (g tan)^p (a+b sin)^m.jl @@ -0,0 +1,214 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.1.3 (g tan)^p (a+b sin)^m *) +("4_1_1_3_1", +@rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~!p)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~p), -1) ? +1⨸(~a)*∫(sec((~e) + (~f)*(~x))^2*((~g)*tan((~e) + (~f)*(~x)))^(~p), (~x)) - 1⨸((~b)*(~g))*∫(sec((~e) + (~f)*(~x))*((~g)*tan((~e) + (~f)*(~x)))^((~p) + 1), (~x)) : nothing) + +("4_1_1_3_2", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(((~p) + 1)/2) ? +1⨸(~f)*int_and_subst((~x)^(~p)*((~a) + (~x))^((~m) - ((~p) + 1)⨸2)⨸((~a) - (~x))^(((~p) + 1)⨸2), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_1_3_2") : nothing) + +("4_1_1_3_3", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), (~p)) && + eq((~p), 2*(~m)) ? +(~a)^(~p)*∫(sin((~e) + (~f)*(~x))^(~p)⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_1_3_4", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), (~p)/2) && + ( + lt((~p), 0) || + gt((~m) - (~p)/2, 0) + ) ? +(~a)^(~p)*∫( ext_expand( sin((~e) + (~f)*(~x))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - (~p)⨸2)⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^((~p)⨸2), (~x)), (~x)) : nothing) + +("4_1_1_3_5", +@rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) ? +∫(ext_expand(((~g)*tan((~e) + (~f)*(~x)))^(~p), ((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)), (~x)) : nothing) + +("4_1_1_3_6", +@rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ilt((~m), 0) ? +(~a)^(2*(~m))* ∫(ext_expand(((~g)*tan((~e) + (~f)*(~x)))^(~p)* sec((~e) + (~f)*(~x))^(-(~m)), ((~a)*sec((~e) + (~f)*(~x)) - (~b)*tan((~e) + (~f)*(~x)))^(-(~m)), (~x)), (~x)) : nothing) + +("4_1_1_3_7", +@rule ∫(tan((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + lt((~m), 0) ? +(~b)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(2*(~m) - 1)*cos((~e) + (~f)*(~x))) - 1⨸((~a)^2*(2*(~m) - 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~a)*(~m) - (~b)*(2*(~m) - 1)*sin((~e) + (~f)*(~x)))⨸ cos((~e) + (~f)*(~x))^2, (~x)) : nothing) + +("4_1_1_3_8", +@rule ∫(tan((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + !(lt((~m), 0)) ? +-((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*(~m)*cos((~e) + (~f)*(~x))) + 1⨸((~b)*(~m))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*((~m) + 1) + (~a)*sin((~e) + (~f)*(~x)))⨸ cos((~e) + (~f)*(~x))^2, (~x)) : nothing) + +("4_1_1_3_9", +@rule ∫(tan((~!e) + (~!f)*(~x))^4*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m) - 1/2) ? +∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) - ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 - 2*sin((~e) + (~f)*(~x))^2)⨸cos((~e) + (~f)*(~x))^4, (~x)) : nothing) + +("4_1_1_3_10", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/tan((~!e) + (~!f)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m) - 1/2) && + lt((~m), -1) ? +-((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)*(~f)*tan((~e) + (~f)*(~x))) + 1⨸(~b)^2* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*(~m) - (~a)*((~m) + 1)*sin((~e) + (~f)*(~x)))⨸ sin((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_1_3_11", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)/tan((~!e) + (~!f)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m) - 1/2) && + !(lt((~m), -1)) ? +-((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~f)*tan((~e) + (~f)*(~x))) + 1⨸(~a)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*(~m) - (~a)*((~m) + 1)*sin((~e) + (~f)*(~x)))⨸ sin((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_1_3_12", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/tan((~!e) + (~!f)*(~x))^4,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m) - 1/2) && + lt((~m), -1) ? +-2⨸((~a)*(~b))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)⨸sin((~e) + (~f)*(~x))^3, (~x)) + 1⨸(~a)^2* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)*(1 + sin((~e) + (~f)*(~x))^2)⨸ sin((~e) + (~f)*(~x))^4, (~x)) : nothing) + +("4_1_1_3_13", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/tan((~!e) + (~!f)*(~x))^4,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m) - 1/2) && + !(lt((~m), -1)) ? +∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) + ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 - 2*sin((~e) + (~f)*(~x))^2)⨸sin((~e) + (~f)*(~x))^4, (~x)) : nothing) + +("4_1_1_3_14", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + ext_isinteger((~p)/2) ? +sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~a) - (~b)*sin((~e) + (~f)*(~x)))⨸((~b)*(~f)*cos((~e) + (~f)*(~x)))* int_and_subst((~x)^(~p)*((~a) + (~x))^((~m) - ((~p) + 1)⨸2)⨸((~a) - (~x))^(((~p) + 1)⨸2), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_1_3_14") : nothing) + +("4_1_1_3_15", +@rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~p))) ? +((~g)*tan((~e) + (~f)*(~x)))^((~p) + 1)*((~a) - (~b)*sin((~e) + (~f)*(~x)))^(((~p) + 1)⨸ 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(((~p) + 1)⨸2)⨸((~f)* (~g)*((~b)*sin((~e) + (~f)*(~x)))^((~p) + 1))* int_and_subst((~x)^(~p)*((~a) + (~x))^((~m) - ((~p) + 1)⨸2)⨸((~a) - (~x))^(((~p) + 1)⨸2), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_1_3_15") : nothing) + +("4_1_1_3_16", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(((~p) + 1)/2) ? +1⨸(~f)*int_and_subst(((~x)^(~p)*((~a) + (~x))^(~m))⨸((~b)^2 - (~x)^2)^(((~p) + 1)⨸2), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_1_3_16") : nothing) + +("4_1_1_3_17", +@rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) ? +∫(ext_expand(((~g)*tan((~e) + (~f)*(~x)))^(~p), ((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)), (~x)) : nothing) + +("4_1_1_3_18", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/tan((~!e) + (~!f)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 - sin((~e) + (~f)*(~x))^2)⨸sin((~e) + (~f)*(~x))^2, (~x)) : nothing) + +("4_1_1_3_19", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/tan((~!e) + (~!f)*(~x))^4,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ext_isinteger(2*(~m)) ? +-cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸(3*(~a)*(~f)*sin((~e) + (~f)*(~x))^3) - (3*(~a)^2 + (~b)^2*((~m) - 2))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸(3*(~a)^2*(~b)*(~f)*((~m) + 1)* sin((~e) + (~f)*(~x))^2) - 1⨸(3*(~a)^2*(~b)*((~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸sin((~e) + (~f)*(~x))^3* simplify(6*(~a)^2 - (~b)^2*((~m) - 1)*((~m) - 2) + (~a)*(~b)*((~m) + 1)*sin((~e) + (~f)*(~x)) - (3*(~a)^2 - (~b)^2*(~m)*((~m) - 2))* sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +#(* Int[(a_+b_.*sin[e_.+f_.*x_])^m_/tan[e_.+f_.*x_]^4,x_Symbol] := -Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)/(3*a*f*Sin[e+f*x]^3) - Cos[e+f*x]*(a+b*Sin[e+f*x])^(m+1)/(b*f*m*Sin[e+f*x]^2) - 1/(3*a*b*m)*Int[(a+b*Sin[e+f*x])^m/Sin[e+f*x]^3* Simp[6*a^2-b^2*m*(m-2)+a*b*(m+3)*Sin[e+f*x]-(3*a^2-b^2*m*(m-1))* Sin[e+f*x]^2,x],x] /; FreeQ[{a,b,e,f,m},x] && NeQ[a^2-b^2,0] && Not[LtQ[m,-1]] && IntegerQ[2*m] *) +("4_1_1_3_20", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/tan((~!e) + (~!f)*(~x))^4,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1)) && + ext_isinteger(2*(~m)) ? +-cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸(3*(~a)*(~f)*sin((~e) + (~f)*(~x))^3) - (~b)*((~m) - 2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸(6*(~a)^2*(~f)* sin((~e) + (~f)*(~x))^2) - 1⨸(6*(~a)^2)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸sin((~e) + (~f)*(~x))^2* simplify(8*(~a)^2 - (~b)^2*((~m) - 1)*((~m) - 2) + (~a)*(~b)*(~m)*sin((~e) + (~f)*(~x)) - (6*(~a)^2 - (~b)^2*(~m)*((~m) - 2))*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_1_3_21", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/tan((~!e) + (~!f)*(~x))^6,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~m), 1) && + ext_isinteger(2*(~m)) ? +-cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸(5*(~a)*(~f)*sin((~e) + (~f)*(~x))^5) - (~b)*((~m) - 4)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸(20*(~a)^2*(~f)* sin((~e) + (~f)*(~x))^4) + (~a)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)^2*(~f)*(~m)*((~m) - 1)* sin((~e) + (~f)*(~x))^3) + cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*(~m)*sin((~e) + (~f)*(~x))^2) + 1⨸(20*(~a)^2*(~b)^2*(~m)*((~m) - 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸sin((~e) + (~f)*(~x))^4* simplify(60*(~a)^4 - 44*(~a)^2*(~b)^2*((~m) - 1)*(~m) + (~b)^4*(~m)*((~m) - 1)*((~m) - 3)*((~m) - 4) + (~a)*(~b)*(~m)*(20*(~a)^2 - (~b)^2*(~m)*((~m) - 1))*sin((~e) + (~f)*(~x)) - (40*(~a)^4 + (~b)^4*(~m)*((~m) - 1)*((~m) - 2)*((~m) - 4) - 20*(~a)^2*(~b)^2*((~m) - 1)*(2*(~m) + 1))*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_1_3_22", +@rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~p)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~p)) && + gt((~p), 1) ? +(~a)⨸((~a)^2 - (~b)^2)*∫(((~g)*tan((~e) + (~f)*(~x)))^(~p)⨸sin((~e) + (~f)*(~x))^2, (~x)) - (~b)*(~g)⨸((~a)^2 - (~b)^2)*∫(((~g)*tan((~e) + (~f)*(~x)))^((~p) - 1)⨸cos((~e) + (~f)*(~x)), (~x)) - (~a)^2*(~g)^2⨸((~a)^2 - (~b)^2)* ∫(((~g)*tan((~e) + (~f)*(~x)))^((~p) - 2)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_3_23", +@rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~p)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~p)) && + lt((~p), -1) ? +1⨸(~a)*∫(((~g)*tan((~e) + (~f)*(~x)))^(~p)⨸cos((~e) + (~f)*(~x))^2, (~x)) - (~b)⨸((~a)^2*(~g))*∫(((~g)*tan((~e) + (~f)*(~x)))^((~p) + 1)⨸cos((~e) + (~f)*(~x)), (~x)) - ((~a)^2 - (~b)^2)⨸((~a)^2*(~g)^2)* ∫(((~g)*tan((~e) + (~f)*(~x)))^((~p) + 2)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_1_3_24", +@rule ∫(sqrt((~!g)*tan((~!e) + (~!f)*(~x)))/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +sqrt(cos((~e) + (~f)*(~x)))*sqrt((~g)*tan((~e) + (~f)*(~x)))⨸sqrt(sin((~e) + (~f)*(~x)))* ∫(sqrt(sin((~e) + (~f)*(~x)))⨸(sqrt(cos((~e) + (~f)*(~x)))*((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_1_3_25", +@rule ∫(1/(sqrt((~g)*tan((~!e) + (~!f)*(~x)))*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +sqrt(sin((~e) + (~f)*(~x)))⨸(sqrt(cos((~e) + (~f)*(~x)))*sqrt((~g)*tan((~e) + (~f)*(~x))))* ∫(sqrt(cos((~e) + (~f)*(~x)))⨸(sqrt(sin((~e) + (~f)*(~x)))*((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_1_3_26", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), (~p)/2) ? +∫(ext_expand( sin((~e) + (~f)*(~x))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸(1 - sin((~e) + (~f)*(~x))^2)^((~p)⨸2), (~x)), (~x)) : nothing) + +# ("4_1_1_3_27", +# @rule ∫(((~!g)*tan((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => +# !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) ? +# Unintegrable[((~g)*tan((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)] : nothing) + +("4_1_1_3_28", +@rule ∫(((~!g)*cot((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~g)^(2*intpart((~p)))*((~g)*cot((~e) + (~f)*(~x)))^fracpart((~p))*((~g)*tan((~e) + (~f)*(~x)))^ fracpart((~p))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~g)*tan((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.10 (c+d x)^m (a+b sin)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.10 (c+d x)^m (a+b sin)^n.jl new file mode 100644 index 0000000..f989578 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.10 (c+d x)^m (a+b sin)^n.jl @@ -0,0 +1,252 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.10 (c+d x)^m (a+b sin)^n *) +("4_1_10_1", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*sin((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + gt((~m), 0) ? +-((~c) + (~d)*(~x))^(~m)*cos((~e) + (~f)*(~x))⨸(~f) + (~d)*(~m)⨸(~f)*∫(((~c) + (~d)*(~x))^((~m) - 1)*cos((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_10_1_1", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*cos((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + gt((~m), 0) ? +((~c) + (~d)*(~x))^(~m)*sin((~e) + (~f)*(~x))⨸(~f) + (~d)*(~m)⨸(~f)*∫(((~c) + (~d)*(~x))^((~m) - 1)*sin((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_10_2", +@rule ∫(((~!c) + (~!d)*(~x))^(~m)*sin((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + lt((~m), -1) ? +((~c) + (~d)*(~x))^((~m) + 1)*sin((~e) + (~f)*(~x))⨸((~d)*((~m) + 1)) - (~f)⨸((~d)*((~m) + 1))*∫(((~c) + (~d)*(~x))^((~m) + 1)*cos((~e) + (~f)*(~x)), (~x)) : nothing) + +# ("4_1_10_3", +# @rule ∫(sin((~!e) + (~!f)*Complex[0, (~fz)]*(~x))/((~!c) + (~!d)*(~x)),(~x)) => +# !contains_var((~c), (~d), (~e), (~f), (~fz), (~x)) && +# eq((~d)*(~e) - (~c)*(~f)*(~fz)*(~I), 0) ? +# (~I)*SinhIntegral[(~c)*(~f)*(~fz)⨸(~d) + (~f)*(~fz)*(~x)]⨸(~d) : nothing) + +("4_1_10_4", +@rule ∫(sin((~!e) + (~!f)*(~x))/((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + eq((~d)*(~e) - (~c)*(~f), 0) ? +SymbolicUtils.sinint((~e) + (~f)*(~x))⨸(~d) : nothing) + +# ("4_1_10_5", +# @rule ∫(sin((~!e) + (~!f)*Complex[0, (~fz)]*(~x))/((~!c) + (~!d)*(~x)),(~x)) => +# !contains_var((~c), (~d), (~e), (~f), (~fz), (~x)) && +# eq((~d)*((~e) - π/2) - (~c)*(~f)*(~fz)*(~I), 0) && +# neg((~c)*(~f)*(~fz)/(~d), 0) ? +# CoshIntegral[-(~c)*(~f)*(~fz)⨸(~d) - (~f)*(~fz)*(~x)]⨸(~d) : nothing) +# +# ("4_1_10_6", +# @rule ∫(sin((~!e) + (~!f)*Complex[0, (~fz)]*(~x))/((~!c) + (~!d)*(~x)),(~x)) => +# !contains_var((~c), (~d), (~e), (~f), (~fz), (~x)) && +# eq((~d)*((~e) - π/2) - (~c)*(~f)*(~fz)*(~I), 0) ? +# CoshIntegral[(~c)*(~f)*(~fz)⨸(~d) + (~f)*(~fz)*(~x)]⨸(~d) : nothing) + +("4_1_10_7", +@rule ∫(sin((~!e) + (~!f)*(~x))/((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + eq((~d)*((~e) - π/2) - (~c)*(~f), 0) ? +SymbolicUtils.cosint((~e) - π⨸2 + (~f)*(~x))⨸(~d) : nothing) + +("4_1_10_8", +@rule ∫(sin((~!e) + (~!f)*(~x))/((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + !eq((~d)*(~e) - (~c)*(~f), 0) ? +cos(((~d)*(~e) - (~c)*(~f))⨸(~d))*∫(sin((~c)*(~f)⨸(~d) + (~f)*(~x))⨸((~c) + (~d)*(~x)), (~x)) + sin(((~d)*(~e) - (~c)*(~f))⨸(~d))*∫(cos((~c)*(~f)⨸(~d) + (~f)*(~x))⨸((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_10_9", +@rule ∫(sin((~!e) + π/2 + (~!f)*(~x))/sqrt((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + complexfree((~f)) && + eq((~d)*(~e) - (~c)*(~f), 0) ? +2⨸(~d)*int_and_subst(cos((~f)*(~x)^2⨸(~d)), (~x), (~x), sqrt((~c) + (~d)*(~x)), "4_1_10_9") : nothing) + +("4_1_10_10", +@rule ∫(sin((~!e) + (~!f)*(~x))/sqrt((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + complexfree((~f)) && + eq((~d)*(~e) - (~c)*(~f), 0) ? +2⨸(~d)*int_and_subst(sin((~f)*(~x)^2⨸(~d)), (~x), (~x), sqrt((~c) + (~d)*(~x)), "4_1_10_10") : nothing) + +("4_1_10_11", +@rule ∫(sin((~!e) + (~!f)*(~x))/sqrt((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + complexfree((~f)) && + !eq((~d)*(~e) - (~c)*(~f), 0) ? +cos(((~d)*(~e) - (~c)*(~f))⨸(~d))*∫(sin((~c)*(~f)⨸(~d) + (~f)*(~x))⨸sqrt((~c) + (~d)*(~x)), (~x)) + sin(((~d)*(~e) - (~c)*(~f))⨸(~d))*∫(cos((~c)*(~f)⨸(~d) + (~f)*(~x))⨸sqrt((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_10_12", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*sin((~!e) + (~!k)*π + (~!f)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger(2*(~k)) ? +(~I)⨸2*∫(((~c) + (~d)*(~x))^(~m)*ℯ^(-(~I)*(~k)*π)*ℯ^(-(~I)*((~e) + (~f)*(~x))), (~x)) - (~I)⨸2*∫(((~c) + (~d)*(~x))^(~m)*ℯ^((~I)*(~k)*π)*ℯ^((~I)*((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_10_13", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*sin((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~m), (~x)) ? +(~I)⨸2*∫(((~c) + (~d)*(~x))^(~m)*ℯ^(-(~I)*((~e) + (~f)*(~x))), (~x)) - (~I)⨸2*∫(((~c) + (~d)*(~x))^(~m)*ℯ^((~I)*((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_10_14", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*sin((~!e) + (~!f)*(~x)/2)^2,(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~m), (~x)) ? +1⨸2*∫(((~c) + (~d)*(~x))^(~m), (~x)) - 1⨸2*∫(((~c) + (~d)*(~x))^(~m)*cos(2*(~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_10_15", +@rule ∫(((~!c) + (~!d)*(~x))*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~n), 1) ? +(~d)*((~b)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)^2*(~n)^2) - (~b)*((~c) + (~d)*(~x))*cos((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~n)) + (~b)^2*((~n) - 1)⨸(~n)*∫(((~c) + (~d)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_10_16", +@rule ∫(((~!c) + (~!d)*(~x))^(~m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~n), 1) && + gt((~m), 1) ? +(~d)*(~m)*((~c) + (~d)*(~x))^((~m) - 1)*((~b)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)^2*(~n)^2) - (~b)*((~c) + (~d)*(~x))^(~m)*cos((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~n)) + (~b)^2*((~n) - 1)⨸(~n)*∫(((~c) + (~d)*(~x))^(~m)*((~b)*sin((~e) + (~f)*(~x)))^((~n) - 2), (~x)) - (~d)^2*(~m)*((~m) - 1)⨸((~f)^2*(~n)^2)* ∫(((~c) + (~d)*(~x))^((~m) - 2)*((~b)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +# ("4_1_10_17", +# @rule ∫(((~!c) + (~!d)*(~x))^(~m)*sin((~!e) + (~!f)*(~x))^(~n),(~x)) => +# !contains_var((~c), (~d), (~e), (~f), (~m), (~x)) && +# igt((~n), 1) && +# ( +# !(isrational((~m))) || +# ge((~m), -1) && +# lt((~m), 1) +# ) ? +# ∫(ExpandTrigReduce[((~c) + (~d)*(~x))^(~m), sin((~e) + (~f)*(~x))^(~n), (~x)], (~x)) : nothing) +# +# ("4_1_10_18", +# @rule ∫(((~!c) + (~!d)*(~x))^(~m)*sin((~!e) + (~!f)*(~x))^(~n),(~x)) => +# !contains_var((~c), (~d), (~e), (~f), (~m), (~x)) && +# igt((~n), 1) && +# ge((~m), -2) && +# lt((~m), -1) ? +# ((~c) + (~d)*(~x))^((~m) + 1)*sin((~e) + (~f)*(~x))^(~n)⨸((~d)*((~m) + 1)) - (~f)*(~n)⨸((~d)*((~m) + 1))* ∫(ExpandTrigReduce[((~c) + (~d)*(~x))^((~m) + 1), cos((~e) + (~f)*(~x))*sin((~e) + (~f)*(~x))^((~n) - 1), (~x)], (~x)) : nothing) + +("4_1_10_19", +@rule ∫(((~!c) + (~!d)*(~x))^(~m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~n), 1) && + lt((~m), -2) ? +((~c) + (~d)*(~x))^((~m) + 1)*((~b)*sin((~e) + (~f)*(~x)))^(~n)⨸((~d)*((~m) + 1)) - (~b)*(~f)*(~n)*((~c) + (~d)*(~x))^((~m) + 2)* cos((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~d)^2*((~m) + 1)*((~m) + 2)) - (~f)^2*(~n)^2⨸((~d)^2*((~m) + 1)*((~m) + 2))* ∫(((~c) + (~d)*(~x))^((~m) + 2)*((~b)*sin((~e) + (~f)*(~x)))^(~n), (~x)) + (~b)^2*(~f)^2*(~n)*((~n) - 1)⨸((~d)^2*((~m) + 1)*((~m) + 2))* ∫(((~c) + (~d)*(~x))^((~m) + 2)*((~b)*sin((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_10_20", +@rule ∫(((~!c) + (~!d)*(~x))*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + lt((~n), -1) && + !eq((~n), -2) ? +((~c) + (~d)*(~x))*cos((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*((~n) + 1)) - (~d)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 2)⨸((~b)^2*(~f)^2*((~n) + 1)*((~n) + 2)) + ((~n) + 2)⨸((~b)^2*((~n) + 1))* ∫(((~c) + (~d)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_10_21", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + lt((~n), -1) && + !eq((~n), -2) && + gt((~m), 1) ? +((~c) + (~d)*(~x))^(~m)*cos((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)*(~f)*((~n) + 1)) - (~d)*(~m)*((~c) + (~d)*(~x))^((~m) - 1)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 2)⨸((~b)^2* (~f)^2*((~n) + 1)*((~n) + 2)) + ((~n) + 2)⨸((~b)^2*((~n) + 1))* ∫(((~c) + (~d)*(~x))^(~m)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 2), (~x)) + (~d)^2*(~m)*((~m) - 1)⨸((~b)^2*(~f)^2*((~n) + 1)*((~n) + 2))* ∫(((~c) + (~d)*(~x))^((~m) - 2)*((~b)*sin((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_10_22", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + igt((~n), 0) && + ( + eq((~n), 1) || + igt((~m), 0) || + !eq((~a)^2 - (~b)^2, 0) + ) ? +∫(ext_expand(((~c) + (~d)*(~x))^(~m), ((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_1_10_23", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~n)) && + ( + gt((~n), 0) || + igt((~m), 0) + ) ? +(2*(~a))^(~n)* ∫(((~c) + (~d)*(~x))^(~m)*sin(1⨸2*((~e) + π*(~a)⨸(2*(~b))) + (~f)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +("4_1_10_24", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~n) + 1/2) && + ( + gt((~n), 0) || + igt((~m), 0) + ) ? +(2*(~a))^intpart((~n))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^fracpart((~n))⨸ sin((~e)⨸2 + (~a)*π⨸(4*(~b)) + (~f)*(~x)⨸2)^(2*fracpart((~n)))* ∫(((~c) + (~d)*(~x))^(~m)*sin((~e)⨸2 + (~a)*π⨸(4*(~b)) + (~f)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +#(* Int[(c_.+d_.*x_)^m_.*(a_+b_.*sin[e_.+f_.*x_])^n_.,x_Symbol] := (2*a)^n*Int[(c+d*x)^m*Cos[1/2*(e-Pi*a/(2*b))+f*x/2]^(2*n),x] /; FreeQ[{a,b,c,d,e,f,m},x] && EqQ[a^2-b^2,0] && IntegerQ[n] && (GtQ[n,0] || IGtQ[m,0]) *) +#(* Int[(c_.+d_.*x_)^m_.*(a_+b_.*sin[e_.+f_.*x_])^n_,x_Symbol] := (2*a)^IntPart[n]*(a+b*Sin[e+f*x])^FracPart[n]/Cos[1/2*(e-Pi*a/(2*b)) +f*x/2]^(2*FracPart[n])* Int[(c+d*x)^m*Cos[1/2*(e-Pi*a/(2*b))+f*x/2]^(2*n),x] /; FreeQ[{a,b,c,d,e,f,m},x] && EqQ[a^2-b^2,0] && IntegerQ[n+1/2] && (GtQ[n,0] || IGtQ[m,0]) *) +# ("4_1_10_25", +# @rule ∫(((~!c) + (~!d)*(~x))^ (~!m)/((~a) + (~!b)*sin((~!e) + (~!k)*π + (~!f)*Complex[0, (~fz)]*(~x))),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~fz), (~x)) && +# ext_isinteger(2*(~k)) && +# !eq((~a)^2 - (~b)^2, 0) && +# igt((~m), 0) ? +# 2*∫(((~c) + (~d)*(~x))^(~m)*ℯ^(-(~I)*π*((~k) - 1⨸2))* ℯ^(-(~I)*(~e) + (~f)*(~fz)*(~x))⨸((~b) + 2*(~a)*ℯ^(-(~I)*π*((~k) - 1⨸2))*ℯ^(-(~I)*(~e) + (~f)*(~fz)*(~x)) - (~b)*ℯ^(-2*(~I)*(~k)*π)*ℯ^(2*(-(~I)*(~e) + (~f)*(~fz)*(~x)))), (~x)) : nothing) + +("4_1_10_26", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)/((~a) + (~!b)*sin((~!e) + (~!k)*π + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + ext_isinteger(2*(~k)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) ? +2*∫(((~c) + (~d)*(~x))^(~m)*ℯ^((~I)*π*((~k) - 1⨸2))* ℯ^((~I)*((~e) + (~f)*(~x)))⨸((~b) + 2*(~a)*ℯ^((~I)*π*((~k) - 1⨸2))*ℯ^((~I)*((~e) + (~f)*(~x))) - (~b)*ℯ^(2*(~I)*(~k)*π)*ℯ^(2*(~I)*((~e) + (~f)*(~x)))), (~x)) : nothing) + +#(* Int[(c_.+d_.*x_)^m_./(a_+b_.*sin[e_.+f_.*Complex[0,fz_]*x_]),x_ Symbol] := 2*I*Int[(c+d*x)^m*E^(-I*e+f*fz*x)/(b+2*I*a*E^(-I*e+f*fz*x)-b*E^(2*(- I*e+f*fz*x))),x] /; FreeQ[{a,b,c,d,e,f,fz},x] && NeQ[a^2-b^2,0] && IGtQ[m,0] *) +#(* Int[(c_.+d_.*x_)^m_./(a_+b_.*sin[e_.+f_.*x_]),x_Symbol] := -2*I*Int[(c+d*x)^m*E^(I*(e+f*x))/(b-2*I*a*E^(I*(e+f*x))-b*E^(2*I*(e+ f*x))),x] /; FreeQ[{a,b,c,d,e,f},x] && NeQ[a^2-b^2,0] && IGtQ[m,0] *) +# ("4_1_10_27", +# @rule ∫(((~!c) + (~!d)*(~x))^(~!m)/((~a) + (~!b)*sin((~!e) + (~!f)*Complex[0, (~fz)]*(~x))),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~fz), (~x)) && +# !eq((~a)^2 - (~b)^2, 0) && +# igt((~m), 0) ? +# 2*∫(((~c) + (~d)*(~x))^(~m)* ℯ^(-(~I)*(~e) + (~f)*(~fz)*(~x))⨸(-(~I)*(~b) + 2*(~a)*ℯ^(-(~I)*(~e) + (~f)*(~fz)*(~x)) + (~I)*(~b)*ℯ^(2*(-(~I)*(~e) + (~f)*(~fz)*(~x)))), (~x)) : nothing) + +("4_1_10_28", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) ? +2*∫(((~c) + (~d)*(~x))^(~m)* ℯ^((~I)*((~e) + (~f)*(~x)))⨸((~I)*(~b) + 2*(~a)*ℯ^((~I)*((~e) + (~f)*(~x))) - (~I)*(~b)*ℯ^(2*(~I)*((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_10_29", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) ? +(~b)*((~c) + (~d)*(~x))^(~m)*cos((~e) + (~f)*(~x))⨸((~f)*((~a)^2 - (~b)^2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))) + (~a)⨸((~a)^2 - (~b)^2)*∫(((~c) + (~d)*(~x))^(~m)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - (~b)*(~d)*(~m)⨸((~f)*((~a)^2 - (~b)^2))* ∫(((~c) + (~d)*(~x))^((~m) - 1)*cos((~e) + (~f)*(~x))⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_10_30", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ilt((~n), -2) && + igt((~m), 0) ? +-(~b)*((~c) + (~d)*(~x))^(~m)* cos((~e) + (~f)* (~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~n) + 1)*((~a)^2 - (~b)^2)) + (~a)⨸((~a)^2 - (~b)^2)* ∫(((~c) + (~d)*(~x))^(~m)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) + (~b)*(~d)*(~m)⨸((~f)*((~n) + 1)*((~a)^2 - (~b)^2))* ∫(((~c) + (~d)*(~x))^((~m) - 1)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) - (~b)*((~n) + 2)⨸(((~n) + 1)*((~a)^2 - (~b)^2))* ∫(((~c) + (~d)*(~x))^(~m)*sin((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +# ("4_1_10_31", +# @rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) ? +# Unintegrable[((~c) + (~d)*(~x))^(~m)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~n), (~x)] : nothing) + +("4_1_10_32", +@rule ∫((~u)^(~!m)*((~!a) + (~!b)*sin((~v)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*((~a) + (~b)*sin(expand_to_sum((~v), (~x))))^(~n), (~x)) : nothing) + +("4_1_10_33", +@rule ∫((~u)^(~!m)*((~!a) + (~!b)*cos((~v)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫(expand_to_sum((~u), (~x))^(~m)*((~a) + (~b)*cos(expand_to_sum((~v), (~x))))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.11 (e x)^m (a+b x^n)^p sin.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.11 (e x)^m (a+b x^n)^p sin.jl new file mode 100644 index 0000000..0e604c3 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.11 (e x)^m (a+b x^n)^p sin.jl @@ -0,0 +1,183 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.11 (e x)^m (a+b x^n)^p sin *) +("4_1_11_1", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(sin((~c) + (~d)*(~x)), ((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_2", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~!p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(cos((~c) + (~d)*(~x)), ((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_3", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ilt((~p), -1) && + igt((~n), 2) ? +(~x)^(-(~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x))⨸((~b)*(~n)*((~p) + 1)) - (-(~n) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^(-(~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x)), (~x)) - (~d)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^(-(~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_4", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ilt((~p), -1) && + igt((~n), 2) ? +(~x)^(-(~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x))⨸((~b)*(~n)*((~p) + 1)) - (-(~n) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^(-(~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x)), (~x)) + (~d)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^(-(~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_5", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ilt((~p), 0) && + igt((~n), 0) && + ( + eq((~n), 2) || + eq((~p), -1) + ) ? +∫(ext_expand(sin((~c) + (~d)*(~x)), ((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_6", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ilt((~p), 0) && + igt((~n), 0) && + ( + eq((~n), 2) || + eq((~p), -1) + ) ? +∫(ext_expand(cos((~c) + (~d)*(~x)), ((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_7", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ilt((~p), 0) && + ilt((~n), 0) ? +∫((~x)^((~n)*(~p))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*sin((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_8", +@rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ilt((~p), 0) && + ilt((~n), 0) ? +∫((~x)^((~n)*(~p))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*cos((~c) + (~d)*(~x)), (~x)) : nothing) + +# ("4_1_11_9", +# @rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*(~x)^(~n))^(~p)*sin((~c) + (~d)*(~x)), (~x)] : nothing) + +# ("4_1_11_10", +# @rule ∫(((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*(~x)^(~n))^(~p)*cos((~c) + (~d)*(~x)), (~x)] : nothing) + +("4_1_11_11", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(sin((~c) + (~d)*(~x)), ((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_12", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(cos((~c) + (~d)*(~x)), ((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_13", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + ilt((~p), -1) && + eq((~m), (~n) - 1) && + ( + ext_isinteger((~n)) || + gt((~e), 0) + ) ? +(~e)^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x))⨸((~b)*(~n)*((~p) + 1)) - (~d)*(~e)^(~m)⨸((~b)*(~n)*((~p) + 1))*∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_14", +@rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + ilt((~p), -1) && + eq((~m), (~n) - 1) && + ( + ext_isinteger((~n)) || + gt((~e), 0) + ) ? +(~e)^(~m)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x))⨸((~b)*(~n)*((~p) + 1)) + (~d)*(~e)^(~m)⨸((~b)*(~n)*((~p) + 1))*∫(((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_15", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + ilt((~p), -1) && + igt((~n), 0) && + ( + gt((~m) - (~n) + 1, 0) || + gt((~n), 2) + ) && + isrational((~m)) ? +(~x)^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x))⨸((~b)*(~n)*((~p) + 1)) - ((~m) - (~n) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x)), (~x)) - (~d)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_16", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + ilt((~p), -1) && + igt((~n), 0) && + ( + gt((~m) - (~n) + 1, 0) || + gt((~n), 2) + ) && + isrational((~m)) ? +(~x)^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x))⨸((~b)*(~n)*((~p) + 1)) - ((~m) - (~n) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^((~m) - (~n))*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*cos((~c) + (~d)*(~x)), (~x)) + (~d)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^((~m) - (~n) + 1)*((~a) + (~b)*(~x)^(~n))^((~p) + 1)*sin((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_17", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + ilt((~p), 0) && + igt((~n), 0) && + ( + eq((~n), 2) || + eq((~p), -1) + ) && + ext_isinteger((~m)) ? +∫(ext_expand(sin((~c) + (~d)*(~x)), (~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_18", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + ilt((~p), 0) && + igt((~n), 0) && + ( + eq((~n), 2) || + eq((~p), -1) + ) && + ext_isinteger((~m)) ? +∫(ext_expand(cos((~c) + (~d)*(~x)), (~x)^(~m)*((~a) + (~b)*(~x)^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_11_19", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + ilt((~p), 0) && + ilt((~n), 0) ? +∫((~x)^((~m) + (~n)*(~p))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*sin((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_11_20", +@rule ∫((~x)^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~p)*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + ilt((~p), 0) && + ilt((~n), 0) ? +∫((~x)^((~m) + (~n)*(~p))*((~b) + (~a)*(~x)^(-(~n)))^(~p)*cos((~c) + (~d)*(~x)), (~x)) : nothing) + +# ("4_1_11_21", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*sin((~!c) + (~!d)*(~x)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*sin((~c) + (~d)*(~x)), (~x)] : nothing) + +# ("4_1_11_22", +# @rule ∫(((~!e)*(~x))^(~!m)*((~a) + (~!b)*(~x)^(~n))^(~!p)*cos((~!c) + (~!d)*(~x)),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~e)*(~x))^(~m)*((~a) + (~b)*(~x)^(~n))^(~p)*cos((~c) + (~d)*(~x)), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.12 (e x)^m (a+b sin(c+d x^n))^p.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.12 (e x)^m (a+b sin(c+d x^n))^p.jl new file mode 100644 index 0000000..af22ae5 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.12 (e x)^m (a+b sin(c+d x^n))^p.jl @@ -0,0 +1,667 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.12 (e x)^m (a+b sin(c+d x^n))^p *) +("4_1_12_1", +@rule ∫(sin((~!d)*((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~d), (~e), (~f), (~x)) ? +sqrt(π⨸2)⨸((~f)*rt((~d), 2))*FresnelIntegrals.fresnels(sqrt(2⨸π)*rt((~d), 2)*((~e) + (~f)*(~x))) : nothing) + +("4_1_12_2", +@rule ∫(cos((~!d)*((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~d), (~e), (~f), (~x)) ? +sqrt(π⨸2)⨸((~f)*rt((~d), 2))*FresnelIntegrals.fresnelc(sqrt(2⨸π)*rt((~d), 2)*((~e) + (~f)*(~x))) : nothing) + +("4_1_12_3", +@rule ∫(sin((~c) + (~!d)*((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) ? +sin((~c))*∫(cos((~d)*((~e) + (~f)*(~x))^2), (~x)) + cos((~c))*∫(sin((~d)*((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_12_4", +@rule ∫(cos((~c) + (~!d)*((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) ? +cos((~c))*∫(cos((~d)*((~e) + (~f)*(~x))^2), (~x)) - sin((~c))*∫(sin((~d)*((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_12_5", +@rule ∫(sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + igt((~n), 2) ? +(~I)⨸2*∫(ℯ^(-(~c)*(~I) - (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) - (~I)⨸2*∫(ℯ^((~c)*(~I) + (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) : nothing) + +("4_1_12_6", +@rule ∫(cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~x)) && + igt((~n), 2) ? +1⨸2*∫(ℯ^(-(~c)*(~I) - (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) + 1⨸2*∫(ℯ^((~c)*(~I) + (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) : nothing) + +# ("4_1_12_7", +# @rule ∫(((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && +# igt((~p), 1) && +# igt((~n), 1) ? +# ∫(ExpandTrigReduce[((~a) + (~b)*sin((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)], (~x)) : nothing) +# +# ("4_1_12_8", +# @rule ∫(((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && +# igt((~p), 1) && +# igt((~n), 1) ? +# ∫(ExpandTrigReduce[((~a) + (~b)*cos((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)], (~x)) : nothing) + +("4_1_12_9", +@rule ∫(((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + eq((~n), -2) ? +-1⨸(~f)*int_and_subst(((~a) + (~b)*sin((~c) + (~d)*(~x)^(-(~n))))^(~p)⨸(~x)^2, (~x), (~x), 1⨸((~e) + (~f)*(~x)), "4_1_12_9") : nothing) + +("4_1_12_10", +@rule ∫(((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + eq((~n), -2) ? +-1⨸(~f)*int_and_subst(((~a) + (~b)*cos((~c) + (~d)*(~x)^(-(~n))))^(~p)⨸(~x)^2, (~x), (~x), 1⨸((~e) + (~f)*(~x)), "4_1_12_10") : nothing) + +("4_1_12_11", +@rule ∫(((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + igt((~p), 0) && + ext_isinteger(1/(~n)) ? +1⨸((~n)*(~f))* int_and_subst((~x)^(1⨸(~n) - 1)*((~a) + (~b)*sin((~c) + (~d)*(~x)))^(~p), (~x), (~x), ((~e) + (~f)*(~x))^(~n), "4_1_12_11") : nothing) + +("4_1_12_12", +@rule ∫(((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + igt((~p), 0) && + ext_isinteger(1/(~n)) ? +1⨸((~n)*(~f))* int_and_subst((~x)^(1⨸(~n) - 1)*((~a) + (~b)*cos((~c) + (~d)*(~x)))^(~p), (~x), (~x), ((~e) + (~f)*(~x))^(~n), "4_1_12_12") : nothing) + +# ("4_1_12_13", +# @rule ∫(((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && +# igt((~p), 0) && +# isfraction((~n)) ? +# Module[{(~k) = ext_den((~n))}, (~k)⨸(~f)* int_and_subst((~x)^((~k) - 1)*((~a) + (~b)*sin((~c) + (~d)*(~x)^((~k)*(~n))))^(~p), (~x), (~x), ((~e) + (~f)*(~x))^(1⨸(~k)), "4_1_12_13")] : nothing) +# +# ("4_1_12_14", +# @rule ∫(((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && +# igt((~p), 0) && +# isfraction((~n)) ? +# Module[{(~k) = ext_den((~n))}, (~k)⨸(~f)* int_and_subst((~x)^((~k) - 1)*((~a) + (~b)*cos((~c) + (~d)*(~x)^((~k)*(~n))))^(~p), (~x), (~x), ((~e) + (~f)*(~x))^(1⨸(~k)), "4_1_12_14")] : nothing) + +("4_1_12_15", +@rule ∫(sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~n), (~x)) ? +(~I)⨸2*∫(ℯ^(-(~c)*(~I) - (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) - (~I)⨸2*∫(ℯ^((~c)*(~I) + (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) : nothing) + +("4_1_12_16", +@rule ∫(cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~f), (~n), (~x)) ? +1⨸2*∫(ℯ^(-(~c)*(~I) - (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) + 1⨸2*∫(ℯ^((~c)*(~I) + (~d)*(~I)*((~e) + (~f)*(~x))^(~n)), (~x)) : nothing) + +# ("4_1_12_17", +# @rule ∫(((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && +# igt((~p), 1) ? +# ∫(ExpandTrigReduce[((~a) + (~b)*sin((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)], (~x)) : nothing) +# +# ("4_1_12_18", +# @rule ∫(((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && +# igt((~p), 1) ? +# ∫(ExpandTrigReduce[((~a) + (~b)*cos((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)], (~x)) : nothing) + +# ("4_1_12_19", +# @rule ∫(((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*sin((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)] : nothing) + +# ("4_1_12_20", +# @rule ∫(((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*cos((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("4_1_12_21", +@rule ∫(((~!a) + (~!b)*sin((~!c) + (~!d)*(~u)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + linear((~u), (~x)) && + !(linear_without_simplify((~u), (~x))) ? +∫(((~a) + (~b)*sin((~c) + (~d)*expand_to_sum((~u), (~x))^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_22", +@rule ∫(((~!a) + (~!b)*cos((~!c) + (~!d)*(~u)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~p), (~x)) && + linear((~u), (~x)) && + !(linear_without_simplify((~u), (~x))) ? +∫(((~a) + (~b)*cos((~c) + (~d)*expand_to_sum((~u), (~x))^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_23", +@rule ∫(((~!a) + (~!b)*sin((~u)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~a) + (~b)*sin(expand_to_sum((~u), (~x))))^(~p), (~x)) : nothing) + +("4_1_12_24", +@rule ∫(((~!a) + (~!b)*cos((~u)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~a) + (~b)*cos(expand_to_sum((~u), (~x))))^(~p), (~x)) : nothing) + +("4_1_12_25", +@rule ∫(sin((~!d)*(~x)^(~!n))/(~x),(~x)) => + !contains_var((~d), (~n), (~x)) ? +SymbolicUtils.sinint((~d)*(~x)^(~n))⨸(~n) : nothing) + +("4_1_12_26", +@rule ∫(cos((~!d)*(~x)^(~!n))/(~x),(~x)) => + !contains_var((~d), (~n), (~x)) ? +SymbolicUtils.cosint((~d)*(~x)^(~n))⨸(~n) : nothing) + +("4_1_12_27", +@rule ∫(sin((~c) + (~!d)*(~x)^(~n))/(~x),(~x)) => + !contains_var((~c), (~d), (~n), (~x)) ? +sin((~c))*∫(cos((~d)*(~x)^(~n))⨸(~x), (~x)) + cos((~c))*∫(sin((~d)*(~x)^(~n))⨸(~x), (~x)) : nothing) + +("4_1_12_28", +@rule ∫(cos((~c) + (~!d)*(~x)^(~n))/(~x),(~x)) => + !contains_var((~c), (~d), (~n), (~x)) ? +cos((~c))*∫(cos((~d)*(~x)^(~n))⨸(~x), (~x)) - sin((~c))*∫(sin((~d)*(~x)^(~n))⨸(~x), (~x)) : nothing) + +("4_1_12_29", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) && + ext_isinteger( simplify(((~m) + 1)/(~n))) && + ( + eq((~p), 1) || + eq((~m), (~n) - 1) || + ext_isinteger((~p)) && + gt(simplify(((~m) + 1)/(~n)), 0) + ) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*sin((~c) + (~d)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "4_1_12_29") : nothing) + +("4_1_12_30", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) && + ext_isinteger( simplify(((~m) + 1)/(~n))) && + ( + eq((~p), 1) || + eq((~m), (~n) - 1) || + ext_isinteger((~p)) && + gt(simplify(((~m) + 1)/(~n)), 0) + ) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*cos((~c) + (~d)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "4_1_12_30") : nothing) + +("4_1_12_31", +@rule ∫(((~e)*(~x))^(~m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*sin((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_32", +@rule ∫(((~e)*(~x))^(~m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*cos((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_33", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq((~m), (~n)/2 - 1) ? +2⨸(~n)*int_and_subst(sin((~a) + (~b)*(~x)^2), (~x), (~x), (~x)^((~n)⨸2), "4_1_12_33") : nothing) + +("4_1_12_34", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n)),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq((~m), (~n)/2 - 1) ? +2⨸(~n)*int_and_subst(cos((~a) + (~b)*(~x)^2), (~x), (~x), (~x)^((~n)⨸2), "4_1_12_34") : nothing) + +("4_1_12_35", +@rule ∫(((~!e)*(~x))^(~!m)*sin((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~x)) && + igt((~n), 0) && + lt((~n), (~m) + 1) ? +-(~e)^((~n) - 1)*((~e)*(~x))^((~m) - (~n) + 1)*cos((~c) + (~d)*(~x)^(~n))⨸((~d)*(~n)) + (~e)^(~n)*((~m) - (~n) + 1)⨸((~d)*(~n))*∫(((~e)*(~x))^((~m) - (~n))*cos((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_36", +@rule ∫(((~!e)*(~x))^(~!m)*cos((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~x)) && + igt((~n), 0) && + lt((~n), (~m) + 1) ? +(~e)^((~n) - 1)*((~e)*(~x))^((~m) - (~n) + 1)*sin((~c) + (~d)*(~x)^(~n))⨸((~d)*(~n)) - (~e)^(~n)*((~m) - (~n) + 1)⨸((~d)*(~n))*∫(((~e)*(~x))^((~m) - (~n))*sin((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_37", +@rule ∫(((~!e)*(~x))^(~m)*sin((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~x)) && + igt((~n), 0) && + lt((~m), -1) ? +((~e)*(~x))^((~m) + 1)*sin((~c) + (~d)*(~x)^(~n))⨸((~e)*((~m) + 1)) - (~d)*(~n)⨸((~e)^(~n)*((~m) + 1))*∫(((~e)*(~x))^((~m) + (~n))*cos((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_38", +@rule ∫(((~!e)*(~x))^(~m)*cos((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~x)) && + igt((~n), 0) && + lt((~m), -1) ? +((~e)*(~x))^((~m) + 1)*cos((~c) + (~d)*(~x)^(~n))⨸((~e)*((~m) + 1)) + (~d)*(~n)⨸((~e)^(~n)*((~m) + 1))*∫(((~e)*(~x))^((~m) + (~n))*sin((~c) + (~d)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_39", +@rule ∫(((~!e)*(~x))^(~!m)*sin((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~m), (~x)) && + igt((~n), 0) ? +(~I)⨸2*∫(((~e)*(~x))^(~m)*ℯ^(-(~c)*(~I) - (~d)*(~I)*(~x)^(~n)), (~x)) - (~I)⨸2*∫(((~e)*(~x))^(~m)*ℯ^((~c)*(~I) + (~d)*(~I)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_40", +@rule ∫(((~!e)*(~x))^(~!m)*cos((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~m), (~x)) && + igt((~n), 0) ? +1⨸2*∫(((~e)*(~x))^(~m)*ℯ^(-(~c)*(~I) - (~d)*(~I)*(~x)^(~n)), (~x)) + 1⨸2*∫(((~e)*(~x))^(~m)*ℯ^((~c)*(~I) + (~d)*(~I)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_41", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n)/2)^2,(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) ? +1⨸2*∫((~x)^(~m), (~x)) - 1⨸2*∫((~x)^(~m)*cos(2*(~a) + (~b)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_42", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n)/2)^2,(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) ? +1⨸2*∫((~x)^(~m), (~x)) + 1⨸2*∫((~x)^(~m)*cos(2*(~a) + (~b)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_43", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + igt((~p), 1) && + eq((~m) + (~n), 0) && + !eq((~n), 1) && + ext_isinteger((~n)) ? +(~x)^((~m) + 1)*sin((~a) + (~b)*(~x)^(~n))^(~p)⨸((~m) + 1) - (~b)*(~n)*(~p)⨸((~m) + 1)*∫(sin((~a) + (~b)*(~x)^(~n))^((~p) - 1)*cos((~a) + (~b)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_44", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + igt((~p), 1) && + eq((~m) + (~n), 0) && + !eq((~n), 1) && + ext_isinteger((~n)) ? +(~x)^((~m) + 1)*cos((~a) + (~b)*(~x)^(~n))^(~p)⨸((~m) + 1) + (~b)*(~n)*(~p)⨸((~m) + 1)*∫(cos((~a) + (~b)*(~x)^(~n))^((~p) - 1)*sin((~a) + (~b)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_45", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq((~m) - 2*(~n) + 1, 0) && + gt((~p), 1) ? +(~n)*sin((~a) + (~b)*(~x)^(~n))^(~p)⨸((~b)^2*(~n)^2*(~p)^2) - (~x)^(~n)*cos((~a) + (~b)*(~x)^(~n))*sin((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸((~b)*(~n)*(~p)) + ((~p) - 1)⨸(~p)*∫((~x)^(~m)*sin((~a) + (~b)*(~x)^(~n))^((~p) - 2), (~x)) : nothing) + +("4_1_12_46", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq((~m) - 2*(~n) + 1, 0) && + gt((~p), 1) ? +(~n)*cos((~a) + (~b)*(~x)^(~n))^(~p)⨸((~b)^2*(~n)^2*(~p)^2) + (~x)^(~n)*sin((~a) + (~b)*(~x)^(~n))*cos((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸((~b)*(~n)*(~p)) + ((~p) - 1)⨸(~p)*∫((~x)^(~m)*cos((~a) + (~b)*(~x)^(~n))^((~p) - 2), (~x)) : nothing) + +("4_1_12_47", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + gt((~p), 1) && + igt((~n), 0) && + igt((~m), 2*(~n) - 1) ? +((~m) - (~n) + 1)*(~x)^((~m) - 2*(~n) + 1)*sin((~a) + (~b)*(~x)^(~n))^(~p)⨸((~b)^2*(~n)^2*(~p)^2) - (~x)^((~m) - (~n) + 1)*cos((~a) + (~b)*(~x)^(~n))*sin((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸((~b)*(~n)*(~p)) + ((~p) - 1)⨸(~p)*∫((~x)^(~m)*sin((~a) + (~b)*(~x)^(~n))^((~p) - 2), (~x)) - ((~m) - (~n) + 1)*((~m) - 2*(~n) + 1)⨸((~b)^2*(~n)^2*(~p)^2)* ∫((~x)^((~m) - 2*(~n))*sin((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("4_1_12_48", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + gt((~p), 1) && + igt((~n), 0) && + igt((~m), 2*(~n) - 1) ? +((~m) - (~n) + 1)*(~x)^((~m) - 2*(~n) + 1)*cos((~a) + (~b)*(~x)^(~n))^(~p)⨸((~b)^2*(~n)^2*(~p)^2) + (~x)^((~m) - (~n) + 1)*sin((~a) + (~b)*(~x)^(~n))*cos((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸((~b)*(~n)*(~p)) + ((~p) - 1)⨸(~p)*∫((~x)^(~m)*cos((~a) + (~b)*(~x)^(~n))^((~p) - 2), (~x)) - ((~m) - (~n) + 1)*((~m) - 2*(~n) + 1)⨸((~b)^2*(~n)^2*(~p)^2)* ∫((~x)^((~m) - 2*(~n))*cos((~a) + (~b)*(~x)^(~n))^(~p), (~x)) : nothing) + +("4_1_12_49", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + gt((~p), 1) && + igt((~n), 0) && + ilt((~m), -2*(~n) + 1) && + !eq((~m) + (~n) + 1, 0) ? +(~x)^((~m) + 1)*sin((~a) + (~b)*(~x)^(~n))^(~p)⨸((~m) + 1) - (~b)*(~n)*(~p)*(~x)^((~m) + (~n) + 1)*cos((~a) + (~b)*(~x)^(~n))* sin((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸(((~m) + 1)*((~m) + (~n) + 1)) - (~b)^2*(~n)^2*(~p)^2⨸(((~m) + 1)*((~m) + (~n) + 1))* ∫((~x)^((~m) + 2*(~n))*sin((~a) + (~b)*(~x)^(~n))^(~p), (~x)) + (~b)^2*(~n)^2*(~p)*((~p) - 1)⨸(((~m) + 1)*((~m) + (~n) + 1))* ∫((~x)^((~m) + 2*(~n))*sin((~a) + (~b)*(~x)^(~n))^((~p) - 2), (~x)) : nothing) + +("4_1_12_50", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + gt((~p), 1) && + igt((~n), 0) && + ilt((~m), -2*(~n) + 1) && + !eq((~m) + (~n) + 1, 0) ? +(~x)^((~m) + 1)*cos((~a) + (~b)*(~x)^(~n))^(~p)⨸((~m) + 1) + (~b)*(~n)*(~p)*(~x)^((~m) + (~n) + 1)*sin((~a) + (~b)*(~x)^(~n))* cos((~a) + (~b)*(~x)^(~n))^((~p) - 1)⨸(((~m) + 1)*((~m) + (~n) + 1)) - (~b)^2*(~n)^2*(~p)^2⨸(((~m) + 1)*((~m) + (~n) + 1))* ∫((~x)^((~m) + 2*(~n))*cos((~a) + (~b)*(~x)^(~n))^(~p), (~x)) + (~b)^2*(~n)^2*(~p)*((~p) - 1)⨸(((~m) + 1)*((~m) + (~n) + 1))* ∫((~x)^((~m) + 2*(~n))*cos((~a) + (~b)*(~x)^(~n))^((~p) - 2), (~x)) : nothing) + +("4_1_12_51", +@rule ∫(((~!e)*(~x))^(~m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~p)) && + igt((~n), 0) && + isfraction((~m)) ? +ext_den((~m))⨸(~e)* int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*sin((~c) + (~d)*(~x)^(ext_den((~m))*(~n))⨸(~e)^(~n)))^(~p), (~x), (~x), ((~e)*(~x))^(1⨸ext_den((~m))), "4_1_12_51") : nothing) + +("4_1_12_52", +@rule ∫(((~!e)*(~x))^(~m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~p)) && + igt((~n), 0) && + isfraction((~m)) ? +ext_den((~m))⨸(~e)* int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*cos((~c) + (~d)*(~x)^(ext_den((~m))*(~n))⨸(~e)^(~n)))^(~p), (~x), (~x), ((~e)*(~x))^(1⨸ext_den((~m))), "4_1_12_52") : nothing) + +# ("4_1_12_53", +# @rule ∫(((~!e)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# igt((~p), 1) && +# igt((~n), 0) ? +# ∫(ExpandTrigReduce[((~e)*(~x))^(~m), ((~a) + (~b)*sin((~c) + (~d)*(~x)^(~n)))^(~p), (~x)], (~x)) : nothing) +# +# ("4_1_12_54", +# @rule ∫(((~!e)*(~x))^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# igt((~p), 1) && +# igt((~n), 0) ? +# ∫(ExpandTrigReduce[((~e)*(~x))^(~m), ((~a) + (~b)*cos((~c) + (~d)*(~x)^(~n)))^(~p), (~x)], (~x)) : nothing) + +("4_1_12_55", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq((~m) - 2*(~n) + 1, 0) && + lt((~p), -1) && + !eq((~p), -2) ? +(~x)^(~n)*cos((~a) + (~b)*(~x)^(~n))*sin((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - (~n)*sin((~a) + (~b)*(~x)^(~n))^((~p) + 2)⨸((~b)^2*(~n)^2*((~p) + 1)*((~p) + 2)) + ((~p) + 2)⨸((~p) + 1)*∫((~x)^(~m)*sin((~a) + (~b)*(~x)^(~n))^((~p) + 2), (~x)) : nothing) + +("4_1_12_56", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~x)) && + eq((~m) - 2*(~n) + 1, 0) && + lt((~p), -1) && + !eq((~p), -2) ? +-(~x)^(~n)*sin((~a) + (~b)*(~x)^(~n))*cos((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - (~n)*cos((~a) + (~b)*(~x)^(~n))^((~p) + 2)⨸((~b)^2*(~n)^2*((~p) + 1)*((~p) + 2)) + ((~p) + 2)⨸((~p) + 1)*∫((~x)^(~m)*cos((~a) + (~b)*(~x)^(~n))^((~p) + 2), (~x)) : nothing) + +("4_1_12_57", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + lt((~p), -1) && + !eq((~p), -2) && + igt((~n), 0) && + igt((~m), 2*(~n) - 1) ? +(~x)^((~m) - (~n) + 1)*cos((~a) + (~b)*(~x)^(~n))* sin((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - ((~m) - (~n) + 1)*(~x)^((~m) - 2*(~n) + 1)* sin((~a) + (~b)*(~x)^(~n))^((~p) + 2)⨸((~b)^2*(~n)^2*((~p) + 1)*((~p) + 2)) + ((~p) + 2)⨸((~p) + 1)*∫((~x)^(~m)*sin((~a) + (~b)*(~x)^(~n))^((~p) + 2), (~x)) + ((~m) - (~n) + 1)*((~m) - 2*(~n) + 1)⨸((~b)^2*(~n)^2*((~p) + 1)*((~p) + 2))* ∫((~x)^((~m) - 2*(~n))*sin((~a) + (~b)*(~x)^(~n))^((~p) + 2), (~x)) : nothing) + +("4_1_12_58", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~x)) && + lt((~p), -1) && + !eq((~p), -2) && + igt((~n), 0) && + igt((~m), 2*(~n) - 1) ? +-(~x)^((~m) - (~n) + 1)*sin((~a) + (~b)*(~x)^(~n))*cos((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - ((~m) - (~n) + 1)*(~x)^((~m) - 2*(~n) + 1)* cos((~a) + (~b)*(~x)^(~n))^((~p) + 2)⨸((~b)^2*(~n)^2*((~p) + 1)*((~p) + 2)) + ((~p) + 2)⨸((~p) + 1)*∫((~x)^(~m)*cos((~a) + (~b)*(~x)^(~n))^((~p) + 2), (~x)) + ((~m) - (~n) + 1)*((~m) - 2*(~n) + 1)⨸((~b)^2*(~n)^2*((~p) + 1)*((~p) + 2))* ∫((~x)^((~m) - 2*(~n))*cos((~a) + (~b)*(~x)^(~n))^((~p) + 2), (~x)) : nothing) + +("4_1_12_59", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + ext_isinteger((~m)) && + eq((~n), -2) ? +-int_and_subst(((~a) + (~b)*sin((~c) + (~d)*(~x)^(-(~n))))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "4_1_12_59") : nothing) + +("4_1_12_60", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + ext_isinteger((~m)) && + eq((~n), -2) ? +-int_and_subst(((~a) + (~b)*cos((~c) + (~d)*(~x)^(-(~n))))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "4_1_12_60") : nothing) + +("4_1_12_61", +@rule ∫(((~!e)*(~x))^(~m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + isfraction((~m)) ? +-ext_den((~m))⨸(~e)* int_and_subst(((~a) + (~b)*sin((~c) + (~d)⨸((~e)^(~n)*(~x)^(ext_den((~m))*(~n)))))^(~p)⨸(~x)^(ext_den((~m))*((~m) + 1) + 1), (~x), (~x), 1⨸((~e)*(~x))^(1⨸ext_den((~m))), "4_1_12_61") : nothing) + +("4_1_12_62", +@rule ∫(((~!e)*(~x))^(~m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + isfraction((~m)) ? +-ext_den((~m))⨸(~e)* int_and_subst(((~a) + (~b)*cos((~c) + (~d)⨸((~e)^(~n)*(~x)^(ext_den((~m))*(~n)))))^(~p)⨸(~x)^(ext_den((~m))*((~m) + 1) + 1), (~x), (~x), 1⨸((~e)*(~x))^(1⨸ext_den((~m))), "4_1_12_62") : nothing) + +("4_1_12_63", +@rule ∫(((~!e)*(~x))^(~m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + !(isrational((~m))) ? +-((~e)*(~x))^(~m)*((~x)^(-1))^(~m)* int_and_subst(((~a) + (~b)*sin((~c) + (~d)*(~x)^(-(~n))))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "4_1_12_63") : nothing) + +("4_1_12_64", +@rule ∫(((~!e)*(~x))^(~m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + igt((~p), 0) && + ilt((~n), 0) && + !(isrational((~m))) ? +-((~e)*(~x))^(~m)*((~x)^(-1))^(~m)* int_and_subst(((~a) + (~b)*cos((~c) + (~d)*(~x)^(-(~n))))^(~p)⨸(~x)^((~m) + 2), (~x), (~x), 1⨸(~x), "4_1_12_64") : nothing) + +# ("4_1_12_65", +# @rule ∫((~x)^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && +# ext_isinteger((~p)) && +# isfraction((~n)) ? +# Module[{(~k) = ext_den((~n))}, (~k)*int_and_subst((~x)^((~k)*((~m) + 1) - 1)*((~a) + (~b)*sin((~c) + (~d)*(~x)^((~k)*(~n))))^(~p), (~x), (~x), (~x)^(1⨸(~k)), "4_1_12_65")] : nothing) +# +# ("4_1_12_66", +# @rule ∫((~x)^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && +# ext_isinteger((~p)) && +# isfraction((~n)) ? +# Module[{(~k) = ext_den((~n))}, (~k)*int_and_subst((~x)^((~k)*((~m) + 1) - 1)*((~a) + (~b)*cos((~c) + (~d)*(~x)^((~k)*(~n))))^(~p), (~x), (~x), (~x)^(1⨸(~k)), "4_1_12_66")] : nothing) + +("4_1_12_67", +@rule ∫(((~e)*(~x))^(~m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + ext_isinteger((~p)) && + isfraction((~n)) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*sin((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_68", +@rule ∫(((~e)*(~x))^(~m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + ext_isinteger((~p)) && + isfraction((~n)) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*cos((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_69", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger((~p)) && + !eq((~m), -1) && + igt(simplify((~n)/((~m) + 1)), 0) && + !(ext_isinteger((~n))) ? +1⨸((~m) + 1)* int_and_subst(((~a) + (~b)*sin((~c) + (~d)*(~x)^simplify((~n)⨸((~m) + 1))))^(~p), (~x), (~x), (~x)^((~m) + 1), "4_1_12_69") : nothing) + +("4_1_12_70", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger((~p)) && + !eq((~m), -1) && + igt(simplify((~n)/((~m) + 1)), 0) && + !(ext_isinteger((~n))) ? +1⨸((~m) + 1)* int_and_subst(((~a) + (~b)*cos((~c) + (~d)*(~x)^simplify((~n)⨸((~m) + 1))))^(~p), (~x), (~x), (~x)^((~m) + 1), "4_1_12_70") : nothing) + +("4_1_12_71", +@rule ∫(((~e)*(~x))^(~m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + ext_isinteger((~p)) && + !eq((~m), -1) && + igt(simplify((~n)/((~m) + 1)), 0) && + !(ext_isinteger((~n))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*sin((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_72", +@rule ∫(((~e)*(~x))^(~m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + ext_isinteger((~p)) && + !eq((~m), -1) && + igt(simplify((~n)/((~m) + 1)), 0) && + !(ext_isinteger((~n))) ? +(~e)^intpart((~m))*((~e)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*cos((~c) + (~d)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_73", +@rule ∫(((~!e)*(~x))^(~!m)*sin((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~m), (~n), (~x)) ? +(~I)⨸2*∫(((~e)*(~x))^(~m)*ℯ^(-(~c)*(~I) - (~d)*(~I)*(~x)^(~n)), (~x)) - (~I)⨸2*∫(((~e)*(~x))^(~m)*ℯ^((~c)*(~I) + (~d)*(~I)*(~x)^(~n)), (~x)) : nothing) + +("4_1_12_74", +@rule ∫(((~!e)*(~x))^(~!m)*cos((~!c) + (~!d)*(~x)^(~n)),(~x)) => + !contains_var((~c), (~d), (~e), (~m), (~n), (~x)) ? +1⨸2*∫(((~e)*(~x))^(~m)*ℯ^(-(~c)*(~I) - (~d)*(~I)*(~x)^(~n)), (~x)) + 1⨸2*∫(((~e)*(~x))^(~m)*ℯ^((~c)*(~I) + (~d)*(~I)*(~x)^(~n)), (~x)) : nothing) + +# ("4_1_12_75", +# @rule ∫(((~!e)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && +# igt((~p), 0) ? +# ∫(ExpandTrigReduce[((~e)*(~x))^(~m), ((~a) + (~b)*sin((~c) + (~d)*(~x)^(~n)))^(~p), (~x)], (~x)) : nothing) +# +# ("4_1_12_76", +# @rule ∫(((~!e)*(~x))^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && +# igt((~p), 0) ? +# ∫(ExpandTrigReduce[((~e)*(~x))^(~m), ((~a) + (~b)*cos((~c) + (~d)*(~x)^(~n)))^(~p), (~x)], (~x)) : nothing) + +# ("4_1_12_77", +# @rule ∫(((~!e)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~e)*(~x))^(~m)*((~a) + (~b)*sin((~c) + (~d)*(~x)^(~n)))^(~p), (~x)] : nothing) + +# ("4_1_12_78", +# @rule ∫(((~!e)*(~x))^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~x)^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~e)*(~x))^(~m)*((~a) + (~b)*cos((~c) + (~d)*(~x)^(~n)))^(~p), (~x)] : nothing) + +("4_1_12_79", +@rule ∫(((~e)*(~x))^(~!m)*((~!a) + (~!b)*sin((~u)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~m), (~p), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~e)*(~x))^(~m)*((~a) + (~b)*sin(expand_to_sum((~u), (~x))))^(~p), (~x)) : nothing) + +("4_1_12_80", +@rule ∫(((~e)*(~x))^(~!m)*((~!a) + (~!b)*cos((~u)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~m), (~p), (~x)) && + isbinomial((~u), (~x)) && + !(binomial_without_simplify((~u), (~x))) ? +∫(((~e)*(~x))^(~m)*((~a) + (~b)*cos(expand_to_sum((~u), (~x))))^(~p), (~x)) : nothing) + +("4_1_12_81", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + igt((~p), 0) && + ext_isinteger(1/(~n)) ? +1⨸((~n)*(~f))* int_and_subst( ext_expand(((~a) + (~b)*sin((~c) + (~d)*(~x)))^(~p), (~x)^(1⨸(~n) - 1)*((~g) - (~e)*(~h)⨸(~f) + (~h)*(~x)^(1⨸(~n))⨸(~f))^(~m), (~x)), (~x), (~x), ((~e) + (~f)*(~x))^(~n), "4_1_12_81") : nothing) + +("4_1_12_82", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + igt((~p), 0) && + ext_isinteger(1/(~n)) ? +1⨸((~n)*(~f))* int_and_subst( ext_expand(((~a) + (~b)*cos((~c) + (~d)*(~x)))^(~p), (~x)^(1⨸(~n) - 1)*((~g) - (~e)*(~h)⨸(~f) + (~h)*(~x)^(1⨸(~n))⨸(~f))^(~m), (~x)), (~x), (~x), ((~e) + (~f)*(~x))^(~n), "4_1_12_82") : nothing) + +#(* Int[(g_.+h_.*x_)^m_.*(a_.+b_.*Sin[c_.+d_.*(e_.+f_.*x_)^n_])^p_.,x_ Symbol] := 1/(n*f^(m+1))*Subst[Int[ExpandIntegrand[(a+b*Sin[c+d*x])^p,x^(1/n-1) *(f*g-e*h+h*x^(1/n))^m,x],x],x,(e+f*x)^n] /; FreeQ[{a,b,c,d,e,f,g,h},x] && IGtQ[p,0] && IntegerQ[m] && IntegerQ[1/n] *) +#(* Int[(g_.+h_.*x_)^m_.*(a_.+b_.*Cos[c_.+d_.*(e_.+f_.*x_)^n_])^p_.,x_ Symbol] := 1/(n*f^(m+1))*Subst[Int[ExpandIntegrand[(a+b*Cos[c+d*x])^p,x^(1/n-1) *(f*g-e*h+h*x^(1/n))^m,x],x],x,(e+f*x)^n] /; FreeQ[{a,b,c,d,e,f,g,h},x] && IGtQ[p,0] && IntegerQ[m] && IntegerQ[1/n] *) +# ("4_1_12_83", +# @rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && +# igt((~p), 0) && +# igt((~m), 0) ? +# Module[{(~k) = (~If)[FractionQ[(~n)], ext_den((~n)), 1]}, (~k)⨸(~f)^((~m) + 1)* int_and_subst( ext_expand(((~a) + (~b)*sin((~c) + (~d)*(~x)^((~k)*(~n))))^(~p), (~x)^((~k) - 1)*((~f)*(~g) - (~e)*(~h) + (~h)*(~x)^(~k))^(~m), (~x)), (~x), (~x), ((~e) + (~f)*(~x))^(1⨸(~k)), "4_1_12_83")] : nothing) +# +# ("4_1_12_84", +# @rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && +# igt((~p), 0) && +# igt((~m), 0) ? +# Module[{(~k) = (~If)[FractionQ[(~n)], ext_den((~n)), 1]}, (~k)⨸(~f)^((~m) + 1)* int_and_subst( ext_expand(((~a) + (~b)*cos((~c) + (~d)*(~x)^((~k)*(~n))))^(~p), (~x)^((~k) - 1)*((~f)*(~g) - (~e)*(~h) + (~h)*(~x)^(~k))^(~m), (~x)), (~x), (~x), ((~e) + (~f)*(~x))^(1⨸(~k)), "4_1_12_84")] : nothing) + +("4_1_12_85", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + igt((~p), 0) && + eq((~f)*(~g) - (~e)*(~h), 0) ? +1⨸(~f)*int_and_subst(((~h)*(~x)⨸(~f))^(~m)*((~a) + (~b)*sin((~c) + (~d)*(~x)^(~n)))^(~p), (~x), (~x), (~e) + (~f)*(~x), "4_1_12_85") : nothing) + +("4_1_12_86", +@rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + igt((~p), 0) && + eq((~f)*(~g) - (~e)*(~h), 0) ? +1⨸(~f)*int_and_subst(((~h)*(~x)⨸(~f))^(~m)*((~a) + (~b)*cos((~c) + (~d)*(~x)^(~n)))^(~p), (~x), (~x), (~e) + (~f)*(~x), "4_1_12_86") : nothing) + +# ("4_1_12_87", +# @rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~g) + (~h)*(~x))^(~m)*((~a) + (~b)*sin((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)] : nothing) + +# ("4_1_12_88", +# @rule ∫(((~!g) + (~!h)*(~x))^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*((~!e) + (~!f)*(~x))^(~n)))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~g) + (~h)*(~x))^(~m)*((~a) + (~b)*cos((~c) + (~d)*((~e) + (~f)*(~x))^(~n)))^(~p), (~x)] : nothing) + +("4_1_12_89", +@rule ∫((~v)^(~!m)*((~!a) + (~!b)*sin((~!c) + (~!d)*(~u)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) && + linear((~u), (~x)) && + linear((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + linear_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~v), (~x))^(~m)*((~a) + (~b)*sin((~c) + (~d)*expand_to_sum((~u), (~x))^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_90", +@rule ∫((~v)^(~!m)*((~!a) + (~!b)*cos((~!c) + (~!d)*(~u)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) && + linear((~u), (~x)) && + linear((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + linear_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~v), (~x))^(~m)*((~a) + (~b)*cos((~c) + (~d)*expand_to_sum((~u), (~x))^(~n)))^(~p), (~x)) : nothing) + +("4_1_12_91", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~!n))^(~!p)*cos((~!a) + (~!b)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && + eq((~m), (~n) - 1) && + !eq((~p), -1) ? +sin((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) : nothing) + +("4_1_12_92", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~!n))^(~!p)*sin((~!a) + (~!b)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~m), (~n), (~p), (~x)) && + eq((~m), (~n) - 1) && + !eq((~p), -1) ? +-cos((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) : nothing) + +("4_1_12_93", +@rule ∫((~x)^(~!m)*sin((~!a) + (~!b)*(~x)^(~!n))^(~!p)*cos((~!a) + (~!b)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + lt(0, (~n), (~m) + 1) && + !eq((~p), -1) ? +(~x)^((~m) - (~n) + 1)*sin((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) - ((~m) - (~n) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^((~m) - (~n))*sin((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + +("4_1_12_94", +@rule ∫((~x)^(~!m)*cos((~!a) + (~!b)*(~x)^(~!n))^(~!p)*sin((~!a) + (~!b)*(~x)^(~!n)),(~x)) => + !contains_var((~a), (~b), (~p), (~x)) && + lt(0, (~n), (~m) + 1) && + !eq((~p), -1) ? +-(~x)^((~m) - (~n) + 1)*cos((~a) + (~b)*(~x)^(~n))^((~p) + 1)⨸((~b)*(~n)*((~p) + 1)) + ((~m) - (~n) + 1)⨸((~b)*(~n)*((~p) + 1))* ∫((~x)^((~m) - (~n))*cos((~a) + (~b)*(~x)^(~n))^((~p) + 1), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.13 (d+e x)^m sin(a+b x+c x^2)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.13 (d+e x)^m sin(a+b x+c x^2)^n.jl new file mode 100644 index 0000000..3e8c052 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.13 (d+e x)^m sin(a+b x+c x^2)^n.jl @@ -0,0 +1,191 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.13 (d+e x)^m sin(a+b x+c x^2)^n *) +("4_1_13_1", +@rule ∫(sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) ? +∫(sin(((~b) + 2*(~c)*(~x))^2⨸(4*(~c))), (~x)) : nothing) + +("4_1_13_2", +@rule ∫(cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) ? +∫(cos(((~b) + 2*(~c)*(~x))^2⨸(4*(~c))), (~x)) : nothing) + +("4_1_13_3", +@rule ∫(sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +cos(((~b)^2 - 4*(~a)*(~c))⨸(4*(~c)))*∫(sin(((~b) + 2*(~c)*(~x))^2⨸(4*(~c))), (~x)) - sin(((~b)^2 - 4*(~a)*(~c))⨸(4*(~c)))*∫(cos(((~b) + 2*(~c)*(~x))^2⨸(4*(~c))), (~x)) : nothing) + +("4_1_13_4", +@rule ∫(cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +cos(((~b)^2 - 4*(~a)*(~c))⨸(4*(~c)))*∫(cos(((~b) + 2*(~c)*(~x))^2⨸(4*(~c))), (~x)) + sin(((~b)^2 - 4*(~a)*(~c))⨸(4*(~c)))*∫(sin(((~b) + 2*(~c)*(~x))^2⨸(4*(~c))), (~x)) : nothing) + +# ("4_1_13_5", +# @rule ∫(sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~x)) && +# igt((~n), 1) ? +# ∫(ExpandTrigReduce[sin((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)], (~x)) : nothing) +# +# ("4_1_13_6", +# @rule ∫(cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~x)) && +# igt((~n), 1) ? +# ∫(ExpandTrigReduce[cos((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)], (~x)) : nothing) + +# ("4_1_13_7", +# @rule ∫(sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~x)) ? +# Unintegrable[sin((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)] : nothing) + +# ("4_1_13_8", +# @rule ∫(cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~x)) ? +# Unintegrable[cos((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)] : nothing) + +("4_1_13_9", +@rule ∫(sin((~v))^(~!n),(~x)) => + igt((~n), 0) && + quadratic((~v), (~x)) && + !(quadratic_without_simplify((~v), (~x))) ? +∫(sin(expand_to_sum((~v), (~x)))^(~n), (~x)) : nothing) + +("4_1_13_10", +@rule ∫(cos((~v))^(~!n),(~x)) => + igt((~n), 0) && + quadratic((~v), (~x)) && + !(quadratic_without_simplify((~v), (~x))) ? +∫(cos(expand_to_sum((~v), (~x)))^(~n), (~x)) : nothing) + +("4_1_13_11", +@rule ∫(((~d) + (~!e)*(~x))*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +-(~e)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) : nothing) + +("4_1_13_12", +@rule ∫(((~d) + (~!e)*(~x))*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +(~e)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) : nothing) + +("4_1_13_13", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + gt((~m), 1) ? +-(~e)*((~d) + (~e)*(~x))^((~m) - 1)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) + (~e)^2*((~m) - 1)⨸(2*(~c))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_14", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + gt((~m), 1) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) - (~e)^2*((~m) - 1)⨸(2*(~c))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_15", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) - 2*(~c)⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_16", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq(2*(~c)*(~d) - (~b)*(~e), 0) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) + 2*(~c)⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_17", +@rule ∫(((~!d) + (~!e)*(~x))*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +-(~e)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) + (2*(~c)*(~d) - (~b)*(~e))⨸(2*(~c))*∫(sin((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_18", +@rule ∫(((~!d) + (~!e)*(~x))*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq(2*(~c)*(~d) - (~b)*(~e), 0) ? +(~e)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) + (2*(~c)*(~d) - (~b)*(~e))⨸(2*(~c))*∫(cos((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_19", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~e) - 2*(~c)*(~d), 0) && + gt((~m), 1) ? +-(~e)*((~d) + (~e)*(~x))^((~m) - 1)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) - ((~b)*(~e) - 2*(~c)*(~d))⨸(2*(~c))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) + (~e)^2*((~m) - 1)⨸(2*(~c))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_20", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~e) - 2*(~c)*(~d), 0) && + gt((~m), 1) ? +(~e)*((~d) + (~e)*(~x))^((~m) - 1)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸(2*(~c)) - ((~b)*(~e) - 2*(~c)*(~d))⨸(2*(~c))* ∫(((~d) + (~e)*(~x))^((~m) - 1)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) - (~e)^2*((~m) - 1)⨸(2*(~c))* ∫(((~d) + (~e)*(~x))^((~m) - 2)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_21", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~e) - 2*(~c)*(~d), 0) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) - ((~b)*(~e) - 2*(~c)*(~d))⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) - 2*(~c)⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +("4_1_13_22", +@rule ∫(((~!d) + (~!e)*(~x))^(~m)*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)*(~e) - 2*(~c)*(~d), 0) && + lt((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2)⨸((~e)*((~m) + 1)) + ((~b)*(~e) - 2*(~c)*(~d))⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) + 2*(~c)⨸((~e)^2*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 2)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2), (~x)) : nothing) + +# ("4_1_13_23", +# @rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# igt((~n), 1) ? +# ∫(ExpandTrigReduce[((~d) + (~e)*(~x))^(~m), sin((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)], (~x)) : nothing) +# +# ("4_1_13_24", +# @rule ∫(((~!d) + (~!e)*(~x))^(~!m)*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# igt((~n), 1) ? +# ∫(ExpandTrigReduce[((~d) + (~e)*(~x))^(~m), cos((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)], (~x)) : nothing) + +# ("4_1_13_25", +# @rule ∫(((~!d) + (~!e)*(~x))^(~!m)*sin((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x))^(~m)*sin((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)] : nothing) + +# ("4_1_13_26", +# @rule ∫(((~!d) + (~!e)*(~x))^(~!m)*cos((~!a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x))^(~m)*cos((~a) + (~b)*(~x) + (~c)*(~x)^2)^(~n), (~x)] : nothing) + +("4_1_13_27", +@rule ∫((~u)^(~!m)*sin((~v))^(~!n),(~x)) => + !contains_var((~m), (~x)) && + igt((~n), 0) && + linear((~u), (~x)) && + quadratic((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + quadratic_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~m)*sin(expand_to_sum((~v), (~x)))^(~n), (~x)) : nothing) + +("4_1_13_28", +@rule ∫((~u)^(~!m)*cos((~v))^(~!n),(~x)) => + !contains_var((~m), (~x)) && + igt((~n), 0) && + linear((~u), (~x)) && + quadratic((~v), (~x)) && + !( + linear_without_simplify((~u), (~x)) && + quadratic_without_simplify((~v), (~x)) + ) ? +∫(expand_to_sum((~u), (~x))^(~m)*cos(expand_to_sum((~v), (~x)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.1 (a+b sin)^m (c+d sin)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.1 (a+b sin)^m (c+d sin)^n.jl new file mode 100644 index 0000000..68c3e2c --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.1 (a+b sin)^m (c+d sin)^n.jl @@ -0,0 +1,917 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.2.1 (a+b sin)^m (c+d sin)^n *) +("4_1_2_1_1", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(2*(~a)*(~c) + (~b)*(~d))*(~x)⨸2 - ((~b)*(~c) + (~a)*(~d))*cos((~e) + (~f)*(~x))⨸(~f) - (~b)*(~d)*cos((~e) + (~f)*(~x))*sin((~e) + (~f)*(~x))⨸(2*(~f)) : nothing) + +("4_1_2_1_2", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))/((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)*(~x)⨸(~d) - ((~b)*(~c) - (~a)*(~d))⨸(~d)*∫(1⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_3", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + !( + ext_isinteger( (~n)) && + ( + lt((~m), 0) && + gt((~n), 0) || + lt(0, (~n), (~m)) || + lt((~m), (~n), 0) + ) + ) ? +(~a)^(~m)*(~c)^(~m)*∫(cos((~e) + (~f)*(~x))^(2*(~m))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - (~m)), (~x)) : nothing) + +("4_1_2_1_4", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +(~a)*(~c)*cos( (~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))))* ∫(cos((~e) + (~f)*(~x))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_5", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~n), -1/2) ? +-2*(~b)*cos( (~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~f)*(2*(~n) + 1)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) : nothing) + +("4_1_2_1_6", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m) - 1/2, 0) && + lt((~n), -1) && + !( + ilt((~m) + (~n), 0) && + gt(2*(~m) + (~n) + 1, 0) + ) ? +-2*(~b)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~f)*(2*(~n) + 1)) - (~b)*(2*(~m) - 1)⨸((~d)*(2*(~n) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_1_7", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m) - 1/2, 0) && + !(lt((~n), -1)) && + !( + igt((~n) - 1/2, 0) && + lt((~n), (~m)) + ) && + !( + ilt((~m) + (~n), 0) && + gt(2*(~m) + (~n) + 1, 0) + ) ? +-(~b)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~f)*((~m) + (~n))) + (~a)*(2*(~m) - 1)⨸((~m) + (~n))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_1_8", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +cos((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))))* ∫(1⨸cos((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_2_1_9", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~n) + 1, 0) && + !eq((~m), -1/2) ? +(~b)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(2*(~m) + 1)) : nothing) + +("4_1_2_1_10", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ilt(simplify((~m) + (~n) + 1), 0) && + !eq((~m), -1/2) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) + ) ? +(~b)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(2*(~m) + 1)) + ((~m) + (~n) + 1)⨸((~a)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_1_11", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + !(lt((~m), (~n), -1)) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(2*(~m) + 1)) + ((~m) + (~n) + 1)⨸((~a)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_1_12", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ( + isfraction((~m)) || + !(isfraction((~n))) + ) ? +(~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))^(2*fracpart((~m)))* ∫(cos((~e) + (~f)*(~x))^(2*(~m))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - (~m)), (~x)) : nothing) + +("4_1_2_1_13", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^2/((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +-(~b)^2*cos((~e) + (~f)*(~x))⨸((~d)*(~f)) + 1⨸(~d)*∫(simp((~a)^2*(~d) - (~b)*((~b)*(~c) - 2*(~a)*(~d))*sin((~e) + (~f)*(~x)), (~x))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_14", +@rule ∫(1/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_15", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~m), (~x)) ? +(~c)*∫(((~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) + (~d)⨸(~b)*∫(((~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_1_2_1_16", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + 1), 0) ? +-(~d)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~f)*((~m) + 1)) : nothing) + +("4_1_2_1_17", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1/2) ? +((~b)*(~c) - (~a)*(~d))*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(2*(~m) + 1)) + ((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + 1))⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_1_2_1_18", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) ? +-(~d)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~f)*((~m) + 1)) + ((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + 1))⨸((~b)*((~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_1_19", +@rule ∫(((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) ? +((~b)*(~c) - (~a)*(~d))⨸(~b)*∫(1⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) + (~d)⨸(~b)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_20", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + ext_isinteger(2*(~m)) ? +-(~d)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~f)*((~m) + 1)) + 1⨸((~m) + 1)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)* simp((~b)*(~d)*(~m) + (~a)*(~c)*((~m) + 1) + ((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_21", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ext_isinteger(2*(~m)) ? +-((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)* (~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp(((~a)*(~c) - (~b)*(~d))*((~m) + 1) - ((~b)*(~c) - (~a)*(~d))*((~m) + 2)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_22", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger(2*(~m))) && + eq((~c)^2 - (~d)^2, 0) ? +(~c)*cos((~e) + (~f)*(~x))⨸((~f)*sqrt(1 + sin((~e) + (~f)*(~x)))*sqrt(1 - sin((~e) + (~f)*(~x))))* int_and_subst(((~a) + (~b)*(~x))^(~m)*sqrt(1 + (~d)⨸(~c)*(~x))⨸sqrt(1 - (~d)⨸(~c)*(~x)), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_1_22") : nothing) + +("4_1_2_1_23", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) ? +((~b)*(~c) - (~a)*(~d))⨸(~b)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) + (~d)⨸(~b)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_1_2_1_24", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) && + isrational((~n)) ? +∫(ext_expand(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_1_2_1_25", +@rule ∫(sin((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1/2) ? +(~b)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(2*(~m) + 1)) - 1⨸((~a)^2*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~a)*(~m) - (~b)*(2*(~m) + 1)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_26", +@rule ∫(sin((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) ? +-cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + 1⨸((~b)*((~m) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*((~m) + 1) - (~a)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_27", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) ? +((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸((~a)*(~f)*(2*(~m) + 1)) + 1⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~a)*(~c)*(~d)*((~m) - 1) + (~b)*((~d)^2 + (~c)^2*((~m) + 1)) + (~d)*((~a)*(~d)*((~m) - 1) + (~b)*(~c)*((~m) + 2))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_28", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1)) ? +-(~d)^2*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + 1⨸((~b)*((~m) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~b)*((~d)^2*((~m) + 1) + (~c)^2*((~m) + 2)) - (~d)*((~a)*(~d) - 2*(~b)*(~c)*((~m) + 2))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_29", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 1) && + lt((~n), -1) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m) + 1/2) || + ext_isinteger((~m)) && + eq((~c), 0) + ) ? +-(~b)^2*((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~b)*(~c) + (~a)*(~d))) + (~b)^2⨸((~d)*((~n) + 1)*((~b)*(~c) + (~a)*(~d)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~a)*(~c)*((~m) - 2) - (~b)*(~d)*((~m) - 2*(~n) - 4) - ((~b)*(~c)*((~m) - 1) - (~a)*(~d)*((~m) + 2*(~n) + 1))* sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_30", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 1) && + !(lt((~n), -1)) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m) + 1/2) || + ext_isinteger((~m)) && + eq((~c), 0) + ) ? +-(~b)^2*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n))) + 1⨸((~d)*((~m) + (~n)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)*(~b)*(~c)*((~m) - 2) + (~b)^2*(~d)*((~n) + 1) + (~a)^2*(~d)*((~m) + (~n)) - (~b)*((~b)*(~c)*((~m) - 1) - (~a)*(~d)*(3*(~m) + 2*(~n) - 2))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_31", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + lt(0, (~n), 1) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m)) && + eq((~c), 0) + ) ? +(~b)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(2*(~m) + 1)) - 1⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)* simp((~a)*(~d)*(~n) - (~b)*(~c)*((~m) + 1) - (~b)*(~d)*((~m) + (~n) + 1)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_32", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + gt((~n), 1) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m)) && + eq((~c), 0) + ) ? +((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)*(~f)*(2*(~m) + 1)) + 1⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 2)* simp((~b)*((~c)^2*((~m) + 1) + (~d)^2*((~n) - 1)) + (~a)*(~c)*(~d)*((~m) - (~n) + 1) + (~d)*((~a)*(~d)*((~m) - (~n) + 1) + (~b)*(~c)*((~m) + (~n)))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_33", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + !(gt((~n), 0)) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m)) && + eq((~c), 0) + ) ? +(~b)^2*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~f)*(2*(~m) + 1)*((~b)*(~c) - (~a)*(~d))) + 1⨸((~a)*(2*(~m) + 1)*((~b)*(~c) - (~a)*(~d)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~b)*(~c)*((~m) + 1) - (~a)*(~d)*(2*(~m) + (~n) + 2) + (~b)*(~d)*((~m) + (~n) + 2)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_34", +@rule ∫(((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~n), 1) && + ( + ext_isinteger(2*(~n)) || + eq((~c), 0) + ) ? +-((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)* (~f)*((~a) + (~b)*sin((~e) + (~f)*(~x)))) - (~d)⨸((~a)*(~b))* ∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 2)* simp((~b)*(~d)*((~n) - 1) - (~a)*(~c)*(~n) + ((~b)*(~c)*((~n) - 1) - (~a)*(~d)*(~n))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_35", +@rule ∫(((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~n), 0) && + ( + ext_isinteger(2*(~n)) || + eq((~c), 0) + ) ? +-(~b)^2*cos( (~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)* (~f)*((~b)*(~c) - (~a)*(~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))) + (~d)⨸((~a)*((~b)*(~c) - (~a)*(~d)))* ∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a)*(~n) - (~b)*((~n) + 1)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_36", +@rule ∫(((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + ( + ext_isinteger(2*(~n)) || + eq((~c), 0) + ) ? +-(~b)*cos((~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*((~a) + (~b)*sin((~e) + (~f)*(~x)))) + (~d)*(~n)⨸((~a)*(~b))* ∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)*((~a) - (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_37", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~n), 0) && + ext_isinteger(2*(~n)) ? +-2*(~b)*cos( (~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~f)*(2*(~n) + 1)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) + 2*(~n)*((~b)*(~c) + (~a)*(~d))⨸((~b)*(2*(~n) + 1))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_1_2_1_38", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +-2*(~b)^2* cos((~e) + (~f)*(~x))⨸((~f)*((~b)*(~c) + (~a)*(~d))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))) : nothing) + +("4_1_2_1_39", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~n), -1) && + !eq(2*(~n) + 3, 0) && + ext_isinteger(2*(~n)) ? +((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~n) + 1)*((~c)^2 - (~d)^2)* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) + (2*(~n) + 3)*((~b)*(~c) - (~a)*(~d))⨸(2*(~b)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_1_40", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +-2*(~b)⨸(~f)* int_and_subst(1⨸((~b)*(~c) + (~a)*(~d) - (~d)*(~x)^2), (~x), (~x), (~b)*cos((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), "4_1_2_1_40") : nothing) + +("4_1_2_1_41", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/sqrt((~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~d), (~a)/(~b)) ? +-2⨸(~f)*int_and_subst(1⨸sqrt(1 - (~x)^2⨸(~a)), (~x), (~x), (~b)*cos((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), "4_1_2_1_41") : nothing) + +("4_1_2_1_42", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/ sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +-2*(~b)⨸(~f)* int_and_subst(1⨸((~b) + (~d)*(~x)^2), (~x), (~x), (~b)*cos((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), "4_1_2_1_42") : nothing) + +("4_1_2_1_43", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(ext_isinteger(2*(~n))) ? +(~a)^2*cos( (~e) + (~f)*(~x))⨸((~f)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~a) - (~b)*sin((~e) + (~f)*(~x))))* int_and_subst(((~c) + (~d)*(~x))^(~n)⨸sqrt((~a) - (~b)*(~x)), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_1_43") : nothing) + +("4_1_2_1_44", +@rule ∫(sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))/ sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~d)⨸(~b)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_45", +@rule ∫(((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~n), 1) && + ext_isinteger(2*(~n)) ? +-2*(~d)*cos( (~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(2*(~n) - 1)* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) - 1⨸((~b)*(2*(~n) - 1))* ∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 2)⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* simp((~a)*(~c)*(~d) - (~b)*(2*(~d)^2*((~n) - 1) + (~c)^2*(2*(~n) - 1)) + (~d)*((~a)*(~d) - (~b)*(~c)*(4*(~n) - 3))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_46", +@rule ∫(((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~n), -1) && + ext_isinteger(2*(~n)) ? +-(~d)*cos( (~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~n) + 1)*((~c)^2 - (~d)^2)* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) - 1⨸(2*(~b)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~a)*(~d) - 2*(~b)*(~c)*((~n) + 1) + (~b)*(~d)*(2*(~n) + 3)*sin((~e) + (~f)*(~x)), (~x))⨸ sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_47", +@rule ∫(1/(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_48", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~d), (~a)/(~b)) && + gt((~a), 0) ? +-sqrt(2)⨸(sqrt((~a))*(~f))* int_and_subst(1⨸sqrt(1 - (~x)^2), (~x), (~x), (~b)*cos((~e) + (~f)*(~x))⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), "4_1_2_1_48") : nothing) + +("4_1_2_1_49", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +-2*(~a)⨸(~f)* int_and_subst(1⨸(2*(~b)^2 - ((~a)*(~c) - (~b)*(~d))*(~x)^2), (~x), (~x), (~b)*cos((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), "4_1_2_1_49") : nothing) + +("4_1_2_1_50", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~n), 1) && + ext_isinteger((~n)) ? +-(~d)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) + (~n))) + 1⨸((~b)*((~m) + (~n)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 2)* simp((~d)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) - 1)) + (~b)*(~c)^2*((~m) + (~n)) + (~d)*((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + 2*(~n) - 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_51", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + ext_isinteger((~m)) ? +(~a)^(~m)*cos((~e) + (~f)*(~x))⨸((~f)*sqrt(1 + sin((~e) + (~f)*(~x)))*sqrt(1 - sin((~e) + (~f)*(~x))))* int_and_subst((1 + (~b)⨸(~a)*(~x))^((~m) - 1⨸2)*((~c) + (~d)*(~x))^(~n)⨸sqrt(1 - (~b)⨸(~a)*(~x)), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_1_51") : nothing) + +("4_1_2_1_52", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + gt((~a), 0) && + gt((~d)/(~b), 0) ? +-(~b)*((~d)⨸(~b))^(~n)* cos((~e) + (~f)*(~x))⨸((~f)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~a) - (~b)*sin((~e) + (~f)*(~x))))* int_and_subst(((~a) - (~x))^(~n)*(2*(~a) - (~x))^((~m) - 1⨸2)⨸sqrt((~x)), (~x), (~x), (~a) - (~b)*sin((~e) + (~f)*(~x)), "4_1_2_1_52") : nothing) + +("4_1_2_1_53", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + gt((~a), 0) && + !(gt((~d)/(~b), 0)) ? +((~d)⨸(~b))^ intpart((~n))*((~d)*sin((~e) + (~f)*(~x)))^fracpart((~n))⨸((~b)*sin((~e) + (~f)*(~x)))^ fracpart((~n))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~b)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_1_54", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + !(gt((~a), 0)) ? +(~a)^intpart((~m))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ fracpart((~m))⨸(1 + (~b)⨸(~a)*sin((~e) + (~f)*(~x)))^fracpart((~m))* ∫((1 + (~b)⨸(~a)*sin((~e) + (~f)*(~x)))^(~m)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_1_55", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(ext_isinteger((~m))) ? +(~a)^2*cos( (~e) + (~f)*(~x))⨸((~f)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~a) - (~b)*sin((~e) + (~f)*(~x))))* int_and_subst(((~a) + (~b)*(~x))^((~m) - 1⨸2)*((~c) + (~d)*(~x))^(~n)⨸sqrt((~a) - (~b)*(~x)), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_1_55") : nothing) + +("4_1_2_1_56", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~m), (~x)) ? +2*(~c)*(~d)⨸(~b)*∫(((~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) + ∫(((~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c)^2 + (~d)^2*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_2_1_57", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) ? +-((~b)^2*(~c)^2 - 2*(~a)*(~b)*(~c)*(~d) + (~a)^2*(~d)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)* (~f)*((~m) + 1)*((~a)^2 - (~b)^2)) - 1⨸((~b)*((~m) + 1)*((~a)^2 - (~b)^2))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~b)*((~m) + 1)*(2*(~b)*(~c)*(~d) - (~a)*((~c)^2 + (~d)^2)) + ((~a)^2*(~d)^2 - 2*(~a)*(~b)*(~c)*(~d)*((~m) + 2) + (~b)^2*((~d)^2*((~m) + 1) + (~c)^2*((~m) + 2)))* sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_1_58", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1)) ? +-(~d)^2*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + 1⨸((~b)*((~m) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~b)*((~d)^2*((~m) + 1) + (~c)^2*((~m) + 2)) - (~d)*((~a)*(~d) - 2*(~b)*(~c)*((~m) + 2))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +#(* Int[(a_+b_.*sin[e_.+f_.*x_])^m_.*(d_.*sin[e_.+f_.*x_])^n_.,x_ Symbol] := Int[ExpandTrig[(a+b*sin[e+f*x])^m*(d*sin[e+f*x])^n,x],x] /; FreeQ[{a,b,d,e,f,n},x] && NeQ[a^2-b^2,0] && IGtQ[m,0] *) +("4_1_2_1_59", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 2) && + lt((~n), -1) && + ( + ext_isinteger((~m)) || + ext_isinteger(2*(~m), 2*(~n)) + ) ? +-((~b)^2*(~c)^2 - 2*(~a)*(~b)*(~c)*(~d) + (~a)^2*(~d)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~c)^2 - (~d)^2)) + 1⨸((~d)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 3)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~b)*((~m) - 2)*((~b)*(~c) - (~a)*(~d))^2 + (~a)*(~d)*((~n) + 1)*((~c)*((~a)^2 + (~b)^2) - 2*(~a)*(~b)*(~d)) + ((~b)*((~n) + 1)*((~a)*(~b)*(~c)^2 + (~c)*(~d)*((~a)^2 + (~b)^2) - 3*(~a)*(~b)*(~d)^2) - (~a)*((~n) + 2)*((~b)*(~c) - (~a)*(~d))^2)*sin((~e) + (~f)*(~x)) + (~b)*((~b)^2*((~c)^2 - (~d)^2) - (~m)*((~b)*(~c) - (~a)*(~d))^2 + (~d)*(~n)*(2*(~a)*(~b)*(~c) - (~d)*((~a)^2 + (~b)^2)))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_1_60", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 2) && + ( + ext_isinteger((~m)) || + ext_isinteger(2*(~m), 2*(~n)) + ) && + !( + igt((~n), 2) && + ( + !(ext_isinteger((~m))) || + eq((~a), 0) && + !eq((~c), 0) + ) + ) ? +-(~b)^2*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n))) + 1⨸((~d)*((~m) + (~n)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 3)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)^3*(~d)*((~m) + (~n)) + (~b)^2*((~b)*(~c)*((~m) - 2) + (~a)*(~d)*((~n) + 1)) - (~b)*((~a)*(~b)*(~c) - (~b)^2*(~d)*((~m) + (~n) - 1) - 3*(~a)^2*(~d)*((~m) + (~n)))* sin((~e) + (~f)*(~x)) - (~b)^2*((~b)*(~c)*((~m) - 1) - (~a)*(~d)*(3*(~m) + 2*(~n) - 2))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_1_61", +@rule ∫(sqrt((~!d)*sin((~!e) + (~!f)*(~x)))/((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-2*(~a)*(~d)* cos((~e) + (~f)*(~x))⨸((~f)*((~a)^2 - (~b)^2)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~d)*sin((~e) + (~f)*(~x)))) - (~d)^2⨸((~a)^2 - (~b)^2)* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~d)*sin((~e) + (~f)*(~x)))^(3⨸2), (~x)) : nothing) + +("4_1_2_1_62", +@rule ∫(sqrt( (~c) + (~!d)*sin((~!e) + (~!f)*(~x)))/((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +((~c) - (~d))⨸((~a) - (~b))* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸((~a) - (~b))* ∫((1 + sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_63", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + lt(0, (~n), 1) && + ext_isinteger(2*(~m), 2*(~n)) ? +-(~b)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)* simp((~a)*(~c)*((~m) + 1) + (~b)*(~d)*(~n) + ((~a)*(~d)*((~m) + 1) - (~b)*(~c)*((~m) + 2))*sin((~e) + (~f)*(~x)) - (~b)*(~d)*((~m) + (~n) + 2)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_1_64", +@rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^(3//2)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~d)⨸(~b)*∫(sqrt((~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - (~a)*(~d)⨸(~b)*∫(sqrt((~d)*sin((~e) + (~f)*(~x)))⨸((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2), (~x)) : nothing) + +("4_1_2_1_65", +@rule ∫(((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(3//2)/((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~d)^2⨸(~b)^2*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)^2* ∫(simp((~b)*(~c) + (~a)*(~d) + 2*(~b)*(~d)*sin((~e) + (~f)*(~x)), (~x))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_66", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + lt(1, (~n), 2) && + ext_isinteger(2*(~m), 2*(~n)) ? +-((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 2)* simp((~c)*((~a)*(~c) - (~b)*(~d))*((~m) + 1) + (~d)*((~b)*(~c) - (~a)*(~d))*((~n) - 1) + ((~d)*((~a)*(~c) - (~b)*(~d))*((~m) + 1) - (~c)*((~b)*(~c) - (~a)*(~d))*((~m) + 2))*sin((~e) + (~f)*(~x)) - (~d)*((~b)*(~c) - (~a)*(~d))*((~m) + (~n) + 1)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_1_67", +@rule ∫(1/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*(~b)*cos( (~e) + (~f)*(~x))⨸((~f)*((~a)^2 - (~b)^2)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~d)*sin((~e) + (~f)*(~x)))) + (~d)⨸((~a)^2 - (~b)^2)* ∫(((~b) + (~a)*sin((~e) + (~f)*(~x)))⨸(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))*((~d)*sin((~e) + (~f)*(~x)))^(3⨸2)), (~x)) : nothing) + +("4_1_2_1_68", +@rule ∫(1/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +1⨸((~a) - (~b))* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) - (~b)⨸((~a) - (~b))* ∫((1 + sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_69", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) && + ( + eq((~a), 0) && + ext_isinteger((~m)) && + !(ext_isinteger((~n))) || + !( + ext_isinteger(2*(~n)) && + lt((~n), -1) && + ( + ext_isinteger((~n)) && + !(ext_isinteger((~m))) || + eq((~a), 0) + ) + ) + ) ? +-(~b)^2*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)*((~b)*(~c) - (~a)*(~d))*((~m) + 1) + (~b)^2*(~d)*((~m) + (~n) + 2) - ((~b)^2*(~c) + (~b)*((~b)*(~c) - (~a)*(~d))*((~m) + 1))* sin((~e) + (~f)*(~x)) - (~b)^2*(~d)*((~m) + (~n) + 3)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_1_70", +@rule ∫(sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))/((~!a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~d)⨸(~b)*∫(1⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(1⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_71", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)/((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~b)⨸(~d)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_72", +@rule ∫(1/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~c) + (~d), 0) ? +2⨸((~f)*((~a) + (~b))*sqrt((~c) + (~d)))* elliptic_pi(2*(~b)⨸((~a) + (~b)), 1⨸2*((~e) - π⨸2 + (~f)*(~x)), 2*(~d)⨸((~c) + (~d))) : nothing) + +("4_1_2_1_73", +@rule ∫(1/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~c) - (~d), 0) ? +2⨸((~f)*((~a) - (~b))*sqrt((~c) - (~d)))* elliptic_pi(-2*(~b)⨸((~a) - (~b)), 1⨸2*((~e) + π⨸2 + (~f)*(~x)), -2*(~d)⨸((~c) - (~d))) : nothing) + +("4_1_2_1_74", +@rule ∫(1/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(gt((~c) + (~d), 0)) ? +sqrt(((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸((~c) + (~d)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))* ∫(1⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~c)⨸((~c) + (~d)) + (~d)⨸((~c) + (~d))*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_75", +@rule ∫(sqrt((~!b)*sin((~!e) + (~!f)*(~x)))/sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + gt((~c)^2 - (~d)^2, 0) && + pos(((~c) + (~d))/(~b)) && + gt((~c)^2, 0) ? +2*(~c)*rt((~b)*((~c) + (~d)), 2)*tan((~e) + (~f)*(~x))*sqrt(1 + csc((~e) + (~f)*(~x)))* sqrt(1 - csc((~e) + (~f)*(~x)))⨸((~d)*(~f)*sqrt((~c)^2 - (~d)^2))* elliptic_pi(((~c) + (~d))⨸(~d), asin(sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~b)*sin((~e) + (~f)*(~x)))⨸ rt(((~c) + (~d))⨸(~b), 2)), -((~c) + (~d))⨸((~c) - (~d))) : nothing) + +("4_1_2_1_76", +@rule ∫(sqrt((~!b)*sin((~!e) + (~!f)*(~x)))/sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~c)^2 - (~d)^2, 0) && + pos(((~c) + (~d))/(~b)) ? +2*(~b)*tan((~e) + (~f)*(~x))⨸((~d)*(~f))*rt(((~c) + (~d))⨸(~b), 2)* sqrt((~c)*(1 + csc((~e) + (~f)*(~x)))⨸((~c) - (~d)))* sqrt((~c)*(1 - csc((~e) + (~f)*(~x)))⨸((~c) + (~d)))* elliptic_pi(((~c) + (~d))⨸(~d), asin(sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~b)*sin((~e) + (~f)*(~x)))⨸ rt(((~c) + (~d))⨸(~b), 2)), -((~c) + (~d))⨸((~c) - (~d))) : nothing) + +("4_1_2_1_77", +@rule ∫(sqrt((~!b)*sin((~!e) + (~!f)*(~x)))/sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~c)^2 - (~d)^2, 0) && + neg(((~c) + (~d))/(~b)) ? +sqrt((~b)*sin((~e) + (~f)*(~x)))⨸sqrt(-(~b)*sin((~e) + (~f)*(~x)))* ∫(sqrt(-(~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +#(* Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[d_.*sin[e_.+f_.*x_]],x_ Symbol] := a*Int[1/(Sqrt[a+b*Sin[e+f*x]]*Sqrt[d*Sin[e+f*x]]),x] + b/d*Int[Sqrt[d*Sin[e+f*x]]/Sqrt[a+b*Sin[e+f*x]],x] /; FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] *) +#(* Int[Sqrt[a_+b_.*sin[e_.+f_.*x_]]/Sqrt[d_.*sin[e_.+f_.*x_]],x_ Symbol] := 2*(a+b*Sin[e+f*x])/(d*f*Rt[(a+b)/d,2]*Cos[e+f*x])*Sqrt[a*(1-Sin[e+f* x])/(a+b*Sin[e+f*x])]*Sqrt[a*(1+Sin[e+f*x])/(a+b*Sin[e+f*x])]* EllipticPi[b/(a+b),ArcSin[Rt[(a+b)/d,2]*(Sqrt[d*Sin[e+f*x]]/Sqrt[ a+b*Sin[e+f*x]])],-(a-b)/(a+b)] /; FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && PosQ[(a+b)/d] *) +("4_1_2_1_78", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/ sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + pos(((~a) + (~b))/((~c) + (~d))) ? +2*((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~d)*(~f)*rt(((~a) + (~b))⨸((~c) + (~d)), 2)*cos((~e) + (~f)*(~x)))* sqrt(((~b)*(~c) - (~a)*(~d))*(1 + sin((~e) + (~f)*(~x)))⨸(((~c) - (~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))))* sqrt(-((~b)*(~c) - (~a)*(~d))*(1 - sin((~e) + (~f)*(~x)))⨸(((~c) + (~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))))* elliptic_pi((~b)*((~c) + (~d))⨸((~d)*((~a) + (~b))), asin(rt(((~a) + (~b))⨸((~c) + (~d)), 2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), ((~a) - (~b))*((~c) + (~d))⨸(((~a) + (~b))*((~c) - (~d)))) : nothing) + +("4_1_2_1_79", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/ sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + neg(((~a) + (~b))/((~c) + (~d))) ? +sqrt(-(~c) - (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt(-(~c) - (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_80", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + lt((~a)^2 - (~b)^2, 0) && + eq((~d)^2, 1) && + gt((~b)*(~d), 0) ? +-2*(~d)⨸((~f)*sqrt((~a) + (~b)*(~d)))* elliptic_f( asin(cos((~e) + (~f)*(~x))⨸(1 + (~d)*sin((~e) + (~f)*(~x)))), -((~a) - (~b)*(~d))⨸((~a) + (~b)*(~d))) : nothing) + +("4_1_2_1_81", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + lt((~a)^2 - (~b)^2, 0) && + gt((~b)^2, 0) && + !( + eq((~d)^2, 1) && + gt((~b)*(~d), 0) + ) ? +sqrt(sign((~b))*sin((~e) + (~f)*(~x)))⨸sqrt((~d)*sin((~e) + (~f)*(~x)))* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt(sign((~b))*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_82", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + gt((~a)^2 - (~b)^2, 0) && + pos(((~a) + (~b))/(~d)) && + gt((~a)^2, 0) ? +-2*sqrt((~a)^2)* sqrt(-cot((~e) + (~f)*(~x))^2)⨸((~a)*(~f)*sqrt((~a)^2 - (~b)^2)*cot((~e) + (~f)*(~x)))* rt(((~a) + (~b))⨸(~d), 2)* elliptic_f( asin(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~d)*sin((~e) + (~f)*(~x)))⨸ rt(((~a) + (~b))⨸(~d), 2)), -((~a) + (~b))⨸((~a) - (~b))) : nothing) + +("4_1_2_1_83", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + pos(((~a) + (~b))/(~d)) ? +-2*tan((~e) + (~f)*(~x))⨸((~a)*(~f))*rt(((~a) + (~b))⨸(~d), 2)* sqrt((~a)*(1 - csc((~e) + (~f)*(~x)))⨸((~a) + (~b)))* sqrt((~a)*(1 + csc((~e) + (~f)*(~x)))⨸((~a) - (~b)))* elliptic_f( asin(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~d)*sin((~e) + (~f)*(~x)))⨸ rt(((~a) + (~b))⨸(~d), 2)), -((~a) + (~b))⨸((~a) - (~b))) : nothing) + +("4_1_2_1_84", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + neg(((~a) + (~b))/(~d)) ? +sqrt(-(~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~d)*sin((~e) + (~f)*(~x)))* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt(-(~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_85", +@rule ∫(1/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + pos(((~c) + (~d))/((~a) + (~b))) ? +2*((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸((~f)*((~b)*(~c) - (~a)*(~d))*rt(((~c) + (~d))⨸((~a) + (~b)), 2)* cos((~e) + (~f)*(~x)))* sqrt(((~b)*(~c) - (~a)*(~d))*(1 - sin((~e) + (~f)*(~x)))⨸(((~a) + (~b))*((~c) + (~d)*sin((~e) + (~f)*(~x)))))* sqrt(-((~b)*(~c) - (~a)*(~d))*(1 + sin((~e) + (~f)*(~x)))⨸(((~a) - (~b))*((~c) + (~d)*sin((~e) + (~f)*(~x)))))* elliptic_f( asin(rt(((~c) + (~d))⨸((~a) + (~b)), 2)*(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))))), ((~a) + (~b))*((~c) - (~d))⨸(((~a) - (~b))*((~c) + (~d)))) : nothing) + +("4_1_2_1_86", +@rule ∫(1/(sqrt((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + neg(((~c) + (~d))/((~a) + (~b))) ? +sqrt(-(~a) - (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* ∫(1⨸(sqrt(-(~a) - (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_1_87", +@rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^(3//2)/sqrt((~!a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-(~a)*(~d)⨸(2*(~b))* ∫(sqrt((~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) + (~d)⨸(2*(~b))* ∫(sqrt((~d)*sin((~e) + (~f)*(~x)))*((~a) + 2*(~b)*sin((~e) + (~f)*(~x)))⨸ sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_1_88", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt(0, (~m), 2) && + lt(-1, (~n), 2) && + !eq((~m) + (~n), 0) && + ( + ext_isinteger((~m)) || + ext_isinteger(2*(~m), 2*(~n)) + ) ? +-(~b)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~f)*((~m) + (~n))) + 1⨸((~d)*((~m) + (~n)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)* simp((~a)^2*(~c)*(~d)*((~m) + (~n)) + (~b)*(~d)*((~b)*(~c)*((~m) - 1) + (~a)*(~d)*(~n)) + ((~a)*(~d)*(2*(~b)*(~c) + (~a)*(~d))*((~m) + (~n)) - (~b)*(~d)*((~a)*(~c) - (~b)*(~d)*((~m) + (~n) - 1)))*sin((~e) + (~f)*(~x)) + (~b)*(~d)*((~b)*(~c)*(~n) + (~a)*(~d)*(2*(~m) + (~n) - 1))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_1_89", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + igt((~m), 0) ? +(~b)⨸(~d)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_1_90", +@rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^(~!n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~a)*∫(((~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)^2 - (~b)^2*sin((~e) + (~f)*(~x))^2), (~x)) - (~b)⨸(~d)*∫(((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)^2 - (~b)^2*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_2_1_91", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ilt((~m), -1) ? +∫(ext_expand(((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) - (~b)*sin((~e) + (~f)*(~x)))^(-(~m))⨸((~a)^2 - (~b)^2*sin((~e) + (~f)*(~x))^2)^(-(~m)), (~x)), (~x)) : nothing) + +# ("4_1_2_1_92", +# @rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# !eq((~a)^2 - (~b)^2, 0) && +# !eq((~c)^2 - (~d)^2, 0) ? +# Unintegrable[((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)] : nothing) + +#(* Int[(a_.+b_.*sin[e_.+f_.*x_])^m_.*(d_./sin[e_.+f_.*x_])^n_,x_ Symbol] := d^m*Int[(d*Csc[e+f*x])^(n-m)*(b+a*Csc[e+f*x])^m,x] /; FreeQ[{a,b,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m] *) +#(* Int[(a_.+b_.*cos[e_.+f_.*x_])^m_.*(d_./cos[e_.+f_.*x_])^n_,x_ Symbol] := d^m*Int[(d*Sec[e+f*x])^(n-m)*(b+a*Sec[e+f*x])^m,x] /; FreeQ[{a,b,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m] *) +("4_1_2_1_93", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~p))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~n))) ? +(~c)^intpart((~n))*((~c)*((~d)*sin((~e) + (~f)*(~x)))^(~p))^ fracpart((~n))⨸((~d)*sin((~e) + (~f)*(~x)))^((~p)*fracpart((~n)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d)*sin((~e) + (~f)*(~x)))^((~n)*(~p)), (~x)) : nothing) + +("4_1_2_1_94", +@rule ∫(((~!a) + (~!b)*cos((~!e) + (~!f)*(~x)))^ (~!m)*((~!c)*((~!d)*cos((~!e) + (~!f)*(~x)))^(~p))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~n))) ? +(~c)^intpart((~n))*((~c)*((~d)*cos((~e) + (~f)*(~x)))^(~p))^ fracpart((~n))⨸((~d)*cos((~e) + (~f)*(~x)))^((~p)*fracpart((~n)))* ∫(((~a) + (~b)*cos((~e) + (~f)*(~x)))^(~m)*((~d)*cos((~e) + (~f)*(~x)))^((~n)*(~p)), (~x)) : nothing) + +("4_1_2_1_95", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~n)) ? +∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n)⨸sin((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + +("4_1_2_1_96", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !(ext_isinteger((~n))) && + ext_isinteger((~m)) ? +∫(((~b) + (~a)*csc((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n)⨸csc((~e) + (~f)*(~x))^(~m), (~x)) : nothing) + +("4_1_2_1_97", +@rule ∫(((~a) + (~!b)*cos((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !(ext_isinteger((~n))) && + ext_isinteger((~m)) ? +∫(((~b) + (~a)*sec((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sec((~e) + (~f)*(~x)))^(~n)⨸sec((~e) + (~f)*(~x))^(~m), (~x)) : nothing) + +("4_1_2_1_98", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~m))) ? +sin((~e) + (~f)*(~x))^(~n)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n)⨸sin((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + +("4_1_2_1_99", +@rule ∫(((~a) + (~!b)*cos((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sec((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~m))) ? +cos((~e) + (~f)*(~x))^(~n)*((~c) + (~d)*sec((~e) + (~f)*(~x)))^(~n)⨸((~d) + (~c)*cos((~e) + (~f)*(~x)))^(~n)* ∫(((~a) + (~b)*cos((~e) + (~f)*(~x)))^(~m)*((~d) + (~c)*cos((~e) + (~f)*(~x)))^(~n)⨸cos((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.2 (g cos)^p (a+b sin)^m (c+d sin)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.2 (g cos)^p (a+b sin)^m (c+d sin)^n.jl new file mode 100644 index 0000000..9722cb1 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.2 (g cos)^p (a+b sin)^m (c+d sin)^n.jl @@ -0,0 +1,883 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.2.2 (g cos)^p (a+b sin)^m (c+d sin)^n *) +("4_1_2_2_1", +@rule ∫(cos((~!e) + (~!f)*(~x))*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) ? +1⨸((~b)*(~f))*int_and_subst(((~a) + (~x))^(~m)*((~c) + (~d)⨸(~b)*(~x))^(~n), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_2_2_1") : nothing) + +("4_1_2_2_2", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~p), (~x)) && + ext_isinteger(((~p) - 1)/2) && + ext_isinteger( (~n)) && + ( + lt((~p), 0) && + !eq((~a)^2 - (~b)^2, 0) || + lt(0, (~n), (~p) - 1) || + lt((~p) + 1, -(~n), 2*(~p) + 1) + ) ? +(~a)*∫(cos((~e) + (~f)*(~x))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) + (~b)⨸(~d)*∫(cos((~e) + (~f)*(~x))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_2_3", +@rule ∫(cos((~!e) + (~!f)*(~x))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~!n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~p), (~x)) && + ext_isinteger(((~p) - 1)/2) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger( (~n)) && + ( + lt(0, (~n), ((~p) + 1)/2) || + le((~p), -(~n)) && + lt(-(~n), 2*(~p) - 3) || + gt((~n), 0) && + le((~n), -(~p)) + ) ? +1⨸(~a)*∫(cos((~e) + (~f)*(~x))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) - 1⨸((~b)*(~d))*∫(cos((~e) + (~f)*(~x))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_2_4", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger(((~p) - 1)/2) && + eq((~a)^2 - (~b)^2, 0) ? +1⨸((~b)^(~p)*(~f))* int_and_subst(((~a) + (~x))^((~m) + ((~p) - 1)⨸2)*((~a) - (~x))^(((~p) - 1)⨸2)*((~c) + (~d)⨸(~b)*(~x))^ (~n), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_2_2_4") : nothing) + +("4_1_2_2_5", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + ext_isinteger(((~p) - 1)/2) && + !eq((~a)^2 - (~b)^2, 0) ? +1⨸((~b)^(~p)*(~f))* int_and_subst(((~a) + (~x))^(~m)*((~c) + (~d)⨸(~b)*(~x))^(~n)*((~b)^2 - (~x)^2)^(((~p) - 1)⨸2), (~x), (~x), (~b)*sin((~e) + (~f)*(~x)), "4_1_2_2_5") : nothing) + +("4_1_2_2_6", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) ? +(~a)*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) + (~b)⨸(~d)*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_2_7", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~!n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +(~g)^2⨸(~a)*∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) - (~g)^2⨸((~b)*(~d))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_2_8", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + !( + ext_isinteger((~n)) && + lt((~n)^2, (~m)^2) + ) ? +(~a)^(~m)*(~c)^(~m)⨸(~g)^(2*(~m))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - (~m)), (~x)) : nothing) + +("4_1_2_2_9", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~p)/2) ? +1⨸((~a)^((~p)⨸2)*(~c)^((~p)⨸2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + (~p)⨸2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + (~p)⨸2), (~x)) : nothing) + +("4_1_2_2_10", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +(~g)*cos((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1), (~x)) : nothing) + +("4_1_2_2_11", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq(2*(~m) + (~p) - 1, 0) && + eq((~m) - (~n) - 1, 0) ? +(~a)^intpart((~m))* (~c)^intpart((~m))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ fracpart((~m))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^fracpart((~m))⨸ ((~g)^(2*intpart((~m)))*((~g)*cos((~e) + (~f)*(~x)))^(2*fracpart((~m))))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_12", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq(2*(~m) + (~p) - 1, 0) && + !eq((~m) - (~n) - 1, 0) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~g)*((~m) - (~n) - 1)) : nothing) + +("4_1_2_2_13", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + igt(simplify((~m) + (~p)/2 - 1/2), 0) && + lt((~n), -1) && + !eq(2*(~n) + (~p) + 1, 0) && + !( + ilt(simplify((~m) + (~n) + (~p)), 0) && + gt(simplify(2*(~m) + (~n) + 3*(~p)/2 + 1), 0) + ) ? +-2*(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~g)*(2*(~n) + (~p) + 1)) - (~b)*(2*(~m) + (~p) - 1)⨸((~d)*(2*(~n) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_2_14", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + igt(simplify((~m) + (~p)/2 - 1/2), 0) && + !(lt((~n), -1)) && + !( + igt(simplify((~n) + (~p)/2 - 1/2), 0) && + gt((~m) - (~n), 0) + ) && + !( + ilt(simplify((~m) + (~n) + (~p)), 0) && + gt(simplify(2*(~m) + (~n) + 3*(~p)/2 + 1), 0) + ) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~g)*((~m) + (~n) + (~p))) + (~a)*(2*(~m) + (~p) - 1)⨸((~m) + (~n) + (~p))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_2_15", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq(2*(~m) + (~p) + 1, 0) ? +(~a)^intpart((~m))* (~c)^intpart((~m))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ fracpart((~m))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^fracpart((~m))⨸ ((~g)^(2*intpart((~m)))*((~g)*cos((~e) + (~f)*(~x)))^(2*fracpart((~m))))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p)), (~x)) : nothing) + +("4_1_2_2_16", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~n) + (~p) + 1, 0) && + !eq((~m), (~n)) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(~g)*((~m) - (~n))) : nothing) + +("4_1_2_2_17", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ilt(simplify((~m) + (~n) + (~p) + 1), 0) && + !eq(2*(~m) + (~p) + 1, 0) && + ( + sumsimpler((~m), 1) || + !(sumsimpler((~n), 1)) + ) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(~g)*(2*(~m) + (~p) + 1)) + ((~m) + (~n) + (~p) + 1)⨸((~a)*(2*(~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_2_18", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + lt((~n), -1) && + !eq(2*(~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-2*(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~g)*(2*(~n) + (~p) + 1)) - (~b)*(2*(~m) + (~p) - 1)⨸((~d)*(2*(~n) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_2_2_19", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + !eq((~m) + (~n) + (~p), 0) && + !(lt(0, (~n), (~m))) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~g)*((~m) + (~n) + (~p))) + (~a)*(2*(~m) + (~p) - 1)⨸((~m) + (~n) + (~p))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_2_20", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + !eq(2*(~m) + (~p) + 1, 0) && + !(lt((~m), (~n), -1)) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(~g)*(2*(~m) + (~p) + 1)) + ((~m) + (~n) + (~p) + 1)⨸((~a)*(2*(~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_2_21", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ( + isfraction((~m)) || + !(isfraction((~n))) + ) ? +(~a)^intpart((~m))* (~c)^intpart((~m))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ fracpart((~m))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^fracpart((~m))⨸ ((~g)^(2*intpart((~m)))*((~g)*cos((~e) + (~f)*(~x)))^(2*fracpart((~m))))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - (~m)), (~x)) : nothing) + +("4_1_2_2_22", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 1), 0) ? +-(~d)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~f)*(~g)*((~m) + (~p) + 1)) : nothing) + +("4_1_2_2_23", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), -1) && + lt((~p), -1) ? +-((~b)*(~c) + (~a)*(~d))*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~a)*(~f)*(~g)*((~p) + 1)) + (~b)*((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 1))⨸((~a)*(~g)^2*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1), (~x)) : nothing) + +("4_1_2_2_24", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt(simplify((2*(~m) + (~p) + 1)/2), 0) && + !eq((~m) + (~p) + 1, 0) ? +-(~d)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~f)*(~g)*((~m) + (~p) + 1)) + ((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 1))⨸((~b)*((~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_25", +@rule ∫(cos((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -3/2) ? +2*((~b)*(~c) - (~a)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)^2*(~f)*(2*(~m) + 3)) + 1⨸((~b)^3*(2*(~m) + 3))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*(~c) + 2*(~a)*(~d)*((~m) + 1) - (~b)*(~d)*(2*(~m) + 3)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_26", +@rule ∫(cos((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ge((~m), -3/2) && + lt((~m), 0) ? +(~d)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)⨸((~b)^2*(~f)*((~m) + 3)) - 1⨸((~b)^2*((~m) + 3))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*(~d)*((~m) + 2) - (~a)*(~c)*((~m) + 3) + ((~b)*(~c)*((~m) + 3) - (~a)*(~d)*((~m) + 4))*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_27", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ( + lt((~m), -1) || + ilt(simplify((~m) + (~p)), 0) + ) && + !eq(2*(~m) + (~p) + 1, 0) ? +((~b)*(~c) - (~a)*(~d))*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~a)*(~f)*(~g)*(2*(~m) + (~p) + 1)) + ((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 1))⨸((~a)*(~b)*(2*(~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_1_2_2_28", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~m) + (~p) + 1, 0) ? +-(~d)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~f)*(~g)*((~m) + (~p) + 1)) + ((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 1))⨸((~b)*((~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_29", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + lt((~p), -1) && + ext_isinteger(2*(~m)) && + !( + eq((~m), 1) && + !eq((~c)^2 - (~d)^2, 0) && + simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) + ) ? +-((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))⨸((~f)*(~g)*((~p) + 1)) + 1⨸((~g)^2*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)* simp((~a)*(~c)*((~p) + 2) + (~b)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 2)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_2_30", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + !(lt((~p), -1)) && + ext_isinteger(2*(~m)) && + !( + eq((~m), 1) && + !eq((~c)^2 - (~d)^2, 0) && + simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) + ) ? +-(~d)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~f)*(~g)*((~m) + (~p) + 1)) + 1⨸((~m) + (~p) + 1)* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)* simp((~a)*(~c)*((~m) + (~p) + 1) + (~b)*(~d)*(~m) + ((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_2_31", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + gt((~p), 1) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*(~c)*((~m) + (~p) + 1) - (~a)*(~d)*(~p) + (~b)*(~d)*((~m) + 1)*sin((~e) + (~f)*(~x)))⨸((~b)^2* (~f)*((~m) + 1)*((~m) + (~p) + 1)) + (~g)^2*((~p) - 1)⨸((~b)^2*((~m) + 1)*((~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~b)*(~d)*((~m) + 1) + ((~b)*(~c)*((~m) + (~p) + 1) - (~a)*(~d)*(~p))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_2_32", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ext_isinteger(2*(~m)) ? +-((~b)*(~c) - (~a)*(~d))*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~f)*(~g)*((~a)^2 - (~b)^2)*((~m) + 1)) + 1⨸(((~a)^2 - (~b)^2)*((~m) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp(((~a)*(~c) - (~b)*(~d))*((~m) + 1) - ((~b)*(~c) - (~a)*(~d))*((~m) + (~p) + 2)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_2_33", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~p), 1) && + !eq((~m) + (~p), 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m)) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*(~c)*((~m) + (~p) + 1) - (~a)*(~d)*(~p) + (~b)*(~d)*((~m) + (~p))*sin((~e) + (~f)*(~x)))⨸((~b)^2* (~f)*((~m) + (~p))*((~m) + (~p) + 1)) + (~g)^2*((~p) - 1)⨸((~b)^2*((~m) + (~p))*((~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~b)*((~a)*(~d)*(~m) + (~b)*(~c)*((~m) + (~p) + 1)) + ((~a)*(~b)*(~c)*((~m) + (~p) + 1) - (~d)*((~a)^2*(~p) - (~b)^2*((~m) + (~p))))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_2_34", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~p), -1) && + ext_isinteger(2*(~m)) ? +((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*(~c) - (~a)*(~d) - ((~a)*(~c) - (~b)*(~d))*sin((~e) + (~f)*(~x)))⨸((~f)*(~g)*((~a)^2 - (~b)^2)*((~p) + 1)) + 1⨸((~g)^2*((~a)^2 - (~b)^2)*((~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~c)*((~a)^2*((~p) + 2) - (~b)^2*((~m) + (~p) + 2)) + (~a)*(~b)*(~d)*(~m) + (~b)*((~a)*(~c) - (~b)*(~d))*((~m) + (~p) + 3)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_2_2_35", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~d)⨸(~b)*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~b)* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_36", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + eq((~c)^2 - (~d)^2, 0) ? +(~c)*(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)⨸((~f)*(1 + sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2)*(1 - sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2))* int_and_subst((1 + (~d)⨸(~c)*(~x))^(((~p) + 1)⨸2)*(1 - (~d)⨸(~c)*(~x))^(((~p) - 1)⨸2)*((~a) + (~b)*(~x))^(~m), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_36") : nothing) + +("4_1_2_2_37", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), (~p)) && + eq(2*(~m) + (~p), 0) ? +(~a)^(2*(~m))*∫(((~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_38", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)* sin((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) - (~p), 0) ? +-((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸(2*(~b)*(~f)* (~g)*((~m) + 1)) + (~a)⨸(2*(~g)^2)* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1), (~x)) : nothing) + +("4_1_2_2_39", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)* sin((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~p) + 1, 0) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(~g)*(~m)) - 1⨸(~g)^2*∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_40", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), (~n), (~p)/2) && + ( + gt((~m), 0) && + gt((~p), 0) && + lt(-(~m) - (~p), (~n), -1) || + gt((~m), 2) && + lt((~p), 0) && + gt((~m) + (~p)/2, 0) + ) ? +1⨸(~a)^(~p)* ∫(ext_expand(((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) - (~b)*sin((~e) + (~f)*(~x)))^((~p)⨸2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + (~p)⨸2), (~x)), (~x)) : nothing) + +("4_1_2_2_41", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) ? +∫(ext_expand(((~g)*cos((~e) + (~f)*(~x)))^ (~p), ((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)), (~x)) : nothing) + +("4_1_2_2_42", +@rule ∫(cos((~!e) + (~!f)*(~x))^2*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ( + ilt((~m), 0) || + !(igt((~n), 0)) + ) ? +1⨸(~b)^2* ∫(((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~a) - (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_43", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ilt((~m), 0) ? +((~a)⨸(~g))^(2*(~m))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p))*((~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_44", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + isrational((~p)) && + ( + eq(2*(~m) + (~p), 0) || + gt(2*(~m) + (~p), 0) && + lt((~p), -1) + ) ? +((~a)⨸(~g))^(2*(~m))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p))*((~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_45", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)* sin((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + le((~m), -1/2) && + !eq(2*(~m) + (~p) + 1, 0) ? +(~b)*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)⨸((~a)*(~f)*(~g)*(2*(~m) + (~p) + 1)) - 1⨸((~a)^2*(2*(~m) + (~p) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~a)*(~m) - (~b)*(2*(~m) + (~p) + 1)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_46", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)* sin((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~m) + (~p) + 2, 0) ? +-((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)* (~g)*((~m) + (~p) + 2)) + 1⨸((~b)*((~m) + (~p) + 2))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~b)*((~m) + 1) - (~a)*((~p) + 1)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_47", +@rule ∫(cos((~!e) + (~!f)*(~x))^2*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +1⨸(~b)^2* ∫(((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~a) - (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_48", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) ? +-2⨸((~a)*(~b)*(~d))* ∫(((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2), (~x)) + 1⨸(~a)^2* ∫(((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)*(1 + sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_2_2_49", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(igt((~m), 0)) ? +1⨸(~d)^4*∫(((~d)*sin((~e) + (~f)*(~x)))^((~n) + 4)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) + ∫(((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*(1 - 2*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_2_2_50", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~p)/2) && + ext_isinteger((~m)) ? +(~a)^(~m)*cos( (~e) + (~f)*(~x))⨸((~f)*sqrt(1 + sin((~e) + (~f)*(~x)))*sqrt(1 - sin((~e) + (~f)*(~x))))* int_and_subst(((~d)*(~x))^(~n)*(1 + (~b)⨸(~a)*(~x))^((~m) + ((~p) - 1)⨸2)*(1 - (~b)⨸(~a)*(~x))^(((~p) - 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_50") : nothing) + +("4_1_2_2_51", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~p)/2) && + !(ext_isinteger((~m))) ? +cos((~e) + (~f)*(~x))⨸((~a)^((~p) - 2)*(~f)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~a) - (~b)*sin((~e) + (~f)*(~x))))* int_and_subst(((~d)*(~x))^(~n)*((~a) + (~b)*(~x))^((~m) + (~p)⨸2 - 1⨸2)*((~a) - (~b)*(~x))^((~p)⨸2 - 1⨸2), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_51") : nothing) + +("4_1_2_2_52", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) && + ( + ext_isinteger((~p)) || + igt((~n), 0) + ) ? +∫(ext_expand(((~g)*cos((~e) + (~f)*(~x)))^ (~p), ((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)), (~x)) : nothing) + +("4_1_2_2_53", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) ? +(~a)^(~m)*(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)⨸((~f)*(1 + sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2)*(1 - sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2))* int_and_subst(((~d)*(~x))^(~n)*(1 + (~b)⨸(~a)*(~x))^((~m) + ((~p) - 1)⨸2)*(1 - (~b)⨸(~a)*(~x))^(((~p) - 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_53") : nothing) + +("4_1_2_2_54", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)⨸((~f)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2)*((~a) - (~b)*sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2))* int_and_subst(((~d)*(~x))^(~n)*((~a) + (~b)*(~x))^((~m) + ((~p) - 1)⨸2)*((~a) - (~b)*(~x))^(((~p) - 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_54") : nothing) + +("4_1_2_2_55", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/ sqrt((~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + eq((~m) + (~p) + 1/2, 0) ? +-(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)* sqrt((~d)*sin((~e) + (~f)*(~x)))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)*(~d)* (~f)*((~m) + 1)) + (~g)^2*(2*(~m) + 3)⨸(2*(~a)*((~m) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸ sqrt((~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_56", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)/ sqrt((~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) && + eq((~m) + (~p) + 3/2, 0) ? +2*((~g)*cos((~e) + (~f)*(~x)))^((~p) + 1)* sqrt((~d)*sin((~e) + (~f)*(~x)))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~d)*(~f)*(~g)*(2*(~m) + 1)) + 2*(~a)*(~m)⨸((~g)^2*(2*(~m) + 1))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)⨸ sqrt((~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_57", +@rule ∫(cos((~!e) + (~!f)*(~x))^2*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ( + igt((~m), 0) || + ext_isinteger(2*(~m), 2*(~n)) + ) ? +∫(((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 - sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +#(* Int[cos[e_.+f_.*x_]^4*sin[e_.+f_.*x_]^n_*(a_+b_.*sin[e_.+f_.*x_])^ m_,x_Symbol] := (a^2-b^2)*Cos[e+f*x]*Sin[e+f*x]^(n+1)*(a+b*Sin[e+f*x])^(m+1)/(a*b^2* d*(m+1)) - (a^2*(n+1)-b^2*(m+n+2))*Cos[e+f*x]*Sin[e+f*x]^(n+1)*(a+b*Sin[e+f*x]) ^(m+2)/(a^2*b^2*d*(n+1)*(m+1)) + 1/(a^2*b*(n+1)*(m+1))*Int[Sin[e+f*x]^(n+1)*(a+b*Sin[e+f*x])^(m+1)* Simp[a^2*(n+1)*(n+2)-b^2*(m+n+2)*(m+n+3)+a*b*(m+1)*Sin[e+f*x]-(a^ 2*(n+1)*(n+3)-b^2*(m+n+2)*(m+n+4))*Sin[e+f*x]^2,x],x] /; FreeQ[{a,b,d,e,f},x] && NeQ[a^2-b^2,0] && IntegersQ[2*m,2*n] && LtQ[m,-1] && LtQ[n,-1] *) +("4_1_2_2_58", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~m), 2*(~n)) && + lt((~m), -1) && + lt((~n), -1) ? +cos((~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)*(~d)* (~f)*((~n) + 1)) - ((~a)^2*((~n) + 1) - (~b)^2*((~m) + (~n) + 2))* cos((~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)^2*(~b)*(~d)^2*(~f)*((~n) + 1)*((~m) + 1)) + 1⨸((~a)^2*(~b)*(~d)*((~n) + 1)*((~m) + 1))* ∫(((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~a)^2*((~n) + 1)*((~n) + 2) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 3) + (~a)*(~b)*((~m) + 1)* sin((~e) + (~f)*(~x)) - ((~a)^2*((~n) + 1)*((~n) + 3) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 4))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_2_59", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~m), 2*(~n)) && + lt((~m), -1) && + !(lt((~n), -1)) && + ( + lt((~m), -2) || + eq((~m) + (~n) + 4, 0) + ) ? +((~a)^2 - (~b)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~b)^2*(~d)*(~f)*((~m) + 1)) + ((~a)^2*((~n) - (~m) + 1) - (~b)^2*((~m) + (~n) + 2))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)^2*(~b)^2*(~d)*(~f)*((~m) + 1)*((~m) + 2)) - 1⨸((~a)^2*(~b)^2*((~m) + 1)*((~m) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)^2*((~n) + 1)*((~n) + 3) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 3) + (~a)*(~b)*((~m) + 2)* sin((~e) + (~f)*(~x)) - ((~a)^2*((~n) + 2)*((~n) + 3) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 4))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_2_60", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~m), 2*(~n)) && + lt((~m), -1) && + !(lt((~n), -1)) && + !eq((~m) + (~n) + 4, 0) ? +((~a)^2 - (~b)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~b)^2*(~d)*(~f)*((~m) + 1)) - cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)^2*(~d)*(~f)*((~m) + (~n) + 4)) - 1⨸((~a)*(~b)^2*((~m) + 1)*((~m) + (~n) + 4))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)^2*((~n) + 1)*((~n) + 3) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 4) + (~a)*(~b)*((~m) + 1)* sin((~e) + (~f)*(~x)) - ((~a)^2*((~n) + 2)*((~n) + 3) - (~b)^2*((~m) + (~n) + 3)*((~m) + (~n) + 4))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_2_61", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ( + igt((~m), 0) || + ext_isinteger(2*(~m), 2*(~n)) + ) && + !((~m) < -1) && + lt((~n), -1) && + ( + lt((~n), -2) || + eq((~m) + (~n) + 4, 0) + ) ? +cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~d)* (~f)*((~n) + 1)) - (~b)*((~m) + (~n) + 2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)⨸((~a)^2*(~d)^2*(~f)*((~n) + 1)*((~n) + 2)) - 1⨸((~a)^2*(~d)^2*((~n) + 1)*((~n) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)* simp((~a)^2*(~n)*((~n) + 2) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 3) + (~a)*(~b)*(~m)*sin( (~e) + (~f)*(~x)) - ((~a)^2*((~n) + 1)*((~n) + 2) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 4))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_2_62", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ( + igt((~m), 0) || + ext_isinteger(2*(~m), 2*(~n)) + ) && + !((~m) < -1) && + lt((~n), -1) && + !eq((~m) + (~n) + 4, 0) ? +cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~d)* (~f)*((~n) + 1)) - cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)⨸((~b)*(~d)^2*(~f)*((~m) + (~n) + 4)) + 1⨸((~a)*(~b)*(~d)*((~n) + 1)*((~m) + (~n) + 4))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~a)^2*((~n) + 1)*((~n) + 2) - (~b)^2*((~m) + (~n) + 2)*((~m) + (~n) + 4) + (~a)*(~b)*((~m) + 3)* sin((~e) + (~f)*(~x)) - ((~a)^2*((~n) + 1)*((~n) + 3) - (~b)^2*((~m) + (~n) + 3)*((~m) + (~n) + 4))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_2_63", +@rule ∫(cos((~!e) + (~!f)*(~x))^4*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ( + igt((~m), 0) || + ext_isinteger(2*(~m), 2*(~n)) + ) && + !((~m) < -1) && + !(lt((~n), -1)) && + !eq((~m) + (~n) + 3, 0) && + !eq((~m) + (~n) + 4, 0) ? +(~a)*((~n) + 3)* cos((~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)^2*(~d)* (~f)*((~m) + (~n) + 3)*((~m) + (~n) + 4)) - cos( (~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~d)^2*(~f)*((~m) + (~n) + 4)) - 1⨸((~b)^2*((~m) + (~n) + 3)*((~m) + (~n) + 4))* ∫(((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~a)^2*((~n) + 1)*((~n) + 3) - (~b)^2*((~m) + (~n) + 3)*((~m) + (~n) + 4) + (~a)*(~b)*(~m)*sin( (~e) + (~f)*(~x)) - ((~a)^2*((~n) + 2)*((~n) + 3) - (~b)^2*((~m) + (~n) + 3)*((~m) + (~n) + 5))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_2_64", +@rule ∫(cos((~!e) + (~!f)*(~x))^6*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~m), 2*(~n)) && + !eq((~n), -1) && + !eq((~n), -2) && + !eq((~m) + (~n) + 5, 0) && + !eq((~m) + (~n) + 6, 0) && + !(igt((~m), 0)) ? +cos((~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)*(~d)* (~f)*((~n) + 1)) - (~b)*((~m) + (~n) + 2)* cos((~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~a)^2*(~d)^2*(~f)*((~n) + 1)*((~n) + 2)) - (~a)*((~n) + 5)* cos((~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 3)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)^2*(~d)^3* (~f)*((~m) + (~n) + 5)*((~m) + (~n) + 6)) + cos( (~e) + (~f)*(~x))*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 4)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~d)^4*(~f)*((~m) + (~n) + 6)) + 1⨸((~a)^2*(~b)^2*(~d)^2*((~n) + 1)*((~n) + 2)*((~m) + (~n) + 5)*((~m) + (~n) + 6))* ∫(((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~a)^4*((~n) + 1)*((~n) + 2)*((~n) + 3)*((~n) + 5) - (~a)^2*(~b)^2*((~n) + 2)*(2*(~n) + 1)*((~m) + (~n) + 5)*((~m) + (~n) + 6) + (~b)^4*((~m) + (~n) + 2)*((~m) + (~n) + 3)*((~m) + (~n) + 5)*((~m) + (~n) + 6) + (~a)*(~b)*(~m)*((~a)^2*((~n) + 1)*((~n) + 2) - (~b)^2*((~m) + (~n) + 5)*((~m) + (~n) + 6))* sin((~e) + (~f)*(~x)) - ((~a)^4*((~n) + 1)*((~n) + 2)*(4 + (~n))*((~n) + 5) + (~b)^4*((~m) + (~n) + 2)*((~m) + (~n) + 4)*((~m) + (~n) + 5)*((~m) + (~n) + 6) - (~a)^2*(~b)^2*((~n) + 1)*((~n) + 2)*((~m) + (~n) + 5)*(2*(~n) + 2*(~m) + 13))* sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_2_2_65", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), 2*(~n), (~p)/2) && + ( + lt((~m), -1) || + eq((~m), -1) && + gt((~p), 0) + ) ? +∫(ext_expand(((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*(1 - sin((~e) + (~f)*(~x))^2)^((~p)⨸2), (~x)), (~x)) : nothing) + +("4_1_2_2_66", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)* sin((~!e) + (~!f)*(~x))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~n)) && + ( + lt((~n), 0) || + igt((~p) + 1/2, 0) + ) ? +∫(ext_expand(((~g)*cos((~e) + (~f)*(~x)))^(~p), sin((~e) + (~f)*(~x))^(~n)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)), (~x)) : nothing) + +("4_1_2_2_67", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + gt((~p), 1) && + ( + le((~n), -2) || + eq((~n), -3/2) && + eq((~p), 3/2) + ) ? +(~g)^2⨸(~a)*∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) - (~b)*(~g)^2⨸((~a)^2*(~d))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) - (~g)^2*((~a)^2 - (~b)^2)⨸((~a)^2*(~d)^2)* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_68", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + gt((~p), 1) && + ( + lt((~n), -1) || + eq((~p), 3/2) && + eq((~n), -1/2) + ) ? +(~g)^2⨸((~a)*(~b))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~b) - (~a)*sin((~e) + (~f)*(~x))), (~x)) + (~g)^2*((~a)^2 - (~b)^2)⨸((~a)*(~b)*(~d))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_69", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + gt((~p), 1) ? +(~g)^2⨸(~b)^2* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) - (~b)*sin((~e) + (~f)*(~x))), (~x)) - (~g)^2*((~a)^2 - (~b)^2)⨸(~b)^2* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +#(* Int[(g_.*cos[e_.+f_.*x_])^p_*(d_.*sin[e_.+f_.*x_])^n_/(a_+b_.*sin[ e_.+f_.*x_]),x_Symbol] := g^2*Int[(g*Cos[e+f*x])^(p-2)*(d*Sin[e+f*x])^n/(a+b*Sin[e+f*x]),x] - g^2/d^2*Int[(g*Cos[e+f*x])^(p-2)*(d*Sin[e+f*x])^(n+2)/(a+b*Sin[e+f* x]),x] /; FreeQ[{a,b,d,e,f,g},x] && NeQ[a^2-b^2,0] && IntegersQ[2*n,2*p] && GtQ[p,1] *) +("4_1_2_2_70", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + lt((~p), -1) && + gt((~n), 1) ? +(~a)*(~d)^2⨸((~a)^2 - (~b)^2)* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) - 2), (~x)) - (~b)*(~d)⨸((~a)^2 - (~b)^2)* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) - 1), (~x)) - (~a)^2*(~d)^2⨸((~g)^2*((~a)^2 - (~b)^2))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) - 2)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_71", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + lt((~p), -1) && + gt((~n), 0) ? +-(~d)⨸((~a)^2 - (~b)^2)* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)*((~b) - (~a)*sin((~e) + (~f)*(~x))), (~x)) + (~a)*(~b)*(~d)⨸((~g)^2*((~a)^2 - (~b)^2))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_72", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + lt((~p), -1) ? +1⨸((~a)^2 - (~b)^2)* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) - (~b)*sin((~e) + (~f)*(~x))), (~x)) - (~b)^2⨸((~g)^2*((~a)^2 - (~b)^2))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) + 2)*((~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_73", +@rule ∫(sqrt( (~!g)*cos((~!e) + (~!f)*(~x)))/(sqrt( sin((~!e) + (~!f)*(~x)))*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-4*sqrt(2)*(~g)⨸(~f)* int_and_subst((~x)^2⨸((((~a) + (~b))*(~g)^2 + ((~a) - (~b))*(~x)^4)*sqrt(1 - (~x)^4⨸(~g)^2)), (~x), (~x), sqrt((~g)*cos((~e) + (~f)*(~x)))⨸sqrt(1 + sin((~e) + (~f)*(~x))), "4_1_2_2_73") : nothing) + +("4_1_2_2_74", +@rule ∫(sqrt( (~!g)*cos((~!e) + (~!f)*(~x)))/(sqrt( (~d)*sin((~!e) + (~!f)*(~x)))*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +sqrt(sin((~e) + (~f)*(~x)))⨸sqrt((~d)*sin((~e) + (~f)*(~x)))* ∫(sqrt((~g)*cos((~e) + (~f)*(~x)))⨸(sqrt(sin((~e) + (~f)*(~x)))*((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_2_75", +@rule ∫(sqrt( (~!d)*sin((~!e) + (~!f)*(~x)))/(sqrt( cos((~!e) + (~!f)*(~x)))*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*sqrt(2)*(~d)*((~b) + rt(-(~a)^2 + (~b)^2, 2))⨸((~f)*rt(-(~a)^2 + (~b)^2, 2))* int_and_subst(1⨸(((~d)*((~b) + rt(-(~a)^2 + (~b)^2, 2)) + (~a)*(~x)^2)*sqrt(1 - (~x)^4⨸(~d)^2)), (~x), (~x), sqrt((~d)*sin((~e) + (~f)*(~x)))⨸sqrt(1 + cos((~e) + (~f)*(~x))), "4_1_2_2_75") - 2*sqrt(2)*(~d)*((~b) - rt(-(~a)^2 + (~b)^2, 2))⨸((~f)*rt(-(~a)^2 + (~b)^2, 2))* int_and_subst(1⨸(((~d)*((~b) - rt(-(~a)^2 + (~b)^2, 2)) + (~a)*(~x)^2)*sqrt(1 - (~x)^4⨸(~d)^2)), (~x), (~x), sqrt((~d)*sin((~e) + (~f)*(~x)))⨸sqrt(1 + cos((~e) + (~f)*(~x))), "4_1_2_2_75") : nothing) + +("4_1_2_2_76", +@rule ∫(sqrt( (~!d)*sin((~!e) + (~!f)*(~x)))/(sqrt( (~!g)*cos((~!e) + (~!f)*(~x)))*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +sqrt(cos((~e) + (~f)*(~x)))⨸sqrt((~g)*cos((~e) + (~f)*(~x)))* ∫(sqrt((~d)*sin((~e) + (~f)*(~x)))⨸(sqrt(cos((~e) + (~f)*(~x)))*((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_2_77", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + lt(-1, (~p), 1) && + gt((~n), 0) ? +(~d)⨸(~b)*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) - 1), (~x)) - (~a)*(~d)⨸(~b)* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_78", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^ (~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~n), 2*(~p)) && + lt(-1, (~p), 1) && + lt((~n), 0) ? +1⨸(~a)*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) - (~b)⨸((~a)*(~d))* ∫(((~g)*cos((~e) + (~f)*(~x)))^ (~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_79", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*(~a)*(~b)⨸(~d)*∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) + ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a)^2 + (~b)^2*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_2_2_80", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + ( + gt((~m), 0) || + ext_isinteger((~n)) + ) ? +∫(ext_expand(((~g)*cos((~e) + (~f)*(~x)))^ (~p), ((~d)*sin((~e) + (~f)*(~x)))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)), (~x)) : nothing) + +("4_1_2_2_81", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~g), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), 2*(~n), 2*(~p)) && + lt((~m), 0) && + gt((~p), 1) && + ( + le((~n), -2) || + eq((~m), -1) && + eq((~n), -3/2) && + eq((~p), 3/2) + ) ? +(~g)^2⨸(~a)* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) - (~b)*(~g)^2⨸((~a)^2*(~d))* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1), (~x)) - (~g)^2*((~a)^2 - (~b)^2)⨸((~a)^2*(~d)^2)* ∫(((~g)*cos((~e) + (~f)*(~x)))^((~p) - 2)*((~d)*sin((~e) + (~f)*(~x)))^((~n) + 2)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_82", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m), (~p)) && + eq(2*(~m) + (~p), 0) ? +(~a)^(2*(~m))*∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_83", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + ( + eq(2*(~m) + (~p), 0) || + gt(2*(~m) + (~p), 0) && + lt((~p), -1) + ) ? +((~a)⨸(~g))^(2*(~m))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(2*(~m) + (~p))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~a) - (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_2_2_84", +@rule ∫(cos((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +1⨸(~b)^2* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) - (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_2_85", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~p)/2) && + ext_isinteger((~m)) ? +(~a)^(~m)*cos( (~e) + (~f)*(~x))⨸((~f)*sqrt(1 + sin((~e) + (~f)*(~x)))*sqrt(1 - sin((~e) + (~f)*(~x))))* int_and_subst((1 + (~b)⨸(~a)*(~x))^((~m) + ((~p) - 1)⨸2)*(1 - (~b)⨸(~a)*(~x))^(((~p) - 1)⨸2)*((~c) + (~d)*(~x))^ (~n), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_85") : nothing) + +("4_1_2_2_86", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~p)/2) && + !(ext_isinteger((~m))) ? +cos((~e) + (~f)*(~x))⨸((~a)^((~p) - 2)*(~f)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~a) - (~b)*sin((~e) + (~f)*(~x))))* int_and_subst(((~a) + (~b)*(~x))^((~m) + (~p)⨸2 - 1⨸2)*((~a) - (~b)*(~x))^((~p)⨸2 - 1⨸2)*((~c) + (~d)*(~x))^(~n), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_86") : nothing) + +("4_1_2_2_87", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) && + ( + ext_isinteger((~p)) || + igt((~n), 0) + ) ? +∫(ext_expand(((~g)*cos((~e) + (~f)*(~x)))^ (~p), ((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_1_2_2_88", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) ? +(~a)^(~m)*(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)⨸((~f)*(1 + sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2)*(1 - sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2))* int_and_subst((1 + (~b)⨸(~a)*(~x))^((~m) + ((~p) - 1)⨸2)*(1 - (~b)⨸(~a)*(~x))^(((~p) - 1)⨸2)*((~c) + (~d)*(~x))^ (~n), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_88") : nothing) + +("4_1_2_2_89", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) ? +(~g)*((~g)*cos((~e) + (~f)*(~x)))^((~p) - 1)⨸((~f)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2)*((~a) - (~b)*sin((~e) + (~f)*(~x)))^(((~p) - 1)⨸2))* int_and_subst(((~a) + (~b)*(~x))^((~m) + ((~p) - 1)⨸2)*((~a) - (~b)*(~x))^(((~p) - 1)⨸2)*((~c) + (~d)*(~x))^(~n), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_2_89") : nothing) + +("4_1_2_2_90", +@rule ∫(cos((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ( + igt((~m), 0) || + ext_isinteger(2*(~m), 2*(~n)) + ) ? +∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*(1 - sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_2_2_91", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~p)/2, 0) && + ( + igt((~m), 0) || + ext_isinteger(2*(~m), 2*(~n)) + ) ? +∫(ext_expand(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*(1 - sin((~e) + (~f)*(~x))^2)^((~p)⨸2), (~x)), (~x)) : nothing) + +("4_1_2_2_92", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +∫(ext_expand(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)), (~x)) : nothing) + +# ("4_1_2_2_93", +# @rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && +# !eq((~a)^2 - (~b)^2, 0) ? +# Unintegrable[((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)] : nothing) + +("4_1_2_2_94", +@rule ∫(((~!g)*sec((~!e) + (~!f)*(~x)))^(~p)*((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~g)^(2*intpart((~p)))*((~g)*cos((~e) + (~f)*(~x)))^fracpart((~p))*((~g)*sec((~e) + (~f)*(~x)))^ fracpart((~p))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~g)*cos((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + +("4_1_2_2_95", +@rule ∫(((~!g)*csc((~!e) + (~!f)*(~x)))^(~p)*((~!a) + (~!b)*cos((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*cos((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~g)^(2*intpart((~p)))*((~g)*sin((~e) + (~f)*(~x)))^fracpart((~p))*((~g)*csc((~e) + (~f)*(~x)))^ fracpart((~p))* ∫(((~a) + (~b)*cos((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*cos((~e) + (~f)*(~x)))^(~n)⨸((~g)*sin((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.3 (g sin)^p (a+b sin)^m (c+d sin)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.3 (g sin)^p (a+b sin)^m (c+d sin)^n.jl new file mode 100644 index 0000000..8e0d45b --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.2/4.1.2.3 (g sin)^p (a+b sin)^m (c+d sin)^n.jl @@ -0,0 +1,320 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.2.3 (g sin)^p (a+b sin)^m (c+d sin)^n *) +("4_1_2_3_1", +@rule ∫(sqrt((~!g)*sin((~!e) + (~!f)*(~x)))* sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + eq((~a)^2 - (~b)^2, 0) || + eq((~c)^2 - (~d)^2, 0) + ) ? +(~g)⨸(~d)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~g)*sin((~e) + (~f)*(~x))), (~x)) - (~c)*(~g)⨸(~d)* ∫(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(sqrt( (~g)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_2", +@rule ∫(sqrt((~!g)*sin((~!e) + (~!f)*(~x)))* sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/((~c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~b)⨸(~d)*∫(sqrt((~g)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - ((~b)*(~c) - (~a)*(~d))⨸(~d)* ∫(sqrt( (~g)*sin((~e) + (~f)*(~x)))⨸(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_3", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sqrt( (~!g)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +-2*(~b)⨸(~f)* int_and_subst(1⨸((~b)*(~c) + (~a)*(~d) + (~c)*(~g)*(~x)^2), (~x), (~x), (~b)*cos((~e) + (~f)*(~x))⨸(sqrt((~g)*sin((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), "4_1_2_3_3") : nothing) + +("4_1_2_3_4", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sqrt( sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~d), (~c)) && + gt((~b)^2 - (~a)^2, 0) && + gt((~b), 0) ? +-sqrt((~a) + (~b))⨸((~c)*(~f))* elliptic_e( asin(cos((~e) + (~f)*(~x))⨸(1 + sin((~e) + (~f)*(~x)))), -((~a) - (~b))⨸((~a) + (~b))) : nothing) + +("4_1_2_3_5", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sqrt( (~!g)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + eq((~c)^2 - (~d)^2, 0) ? +-sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~d)*sin((~e) + (~f)*(~x))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))))⨸ ((~d)*(~f)*sqrt((~g)*sin((~e) + (~f)*(~x)))* sqrt((~c)^2*((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(((~a)*(~c) + (~b)*(~d))*((~c) + (~d)*sin((~e) + (~f)*(~x))))))* elliptic_e( asin((~c)* cos((~e) + (~f)*(~x))⨸((~c) + (~d)*sin((~e) + (~f)*(~x)))), ((~b)*(~c) - (~a)*(~d))⨸((~b)*(~c) + (~a)*(~d))) : nothing) + +("4_1_2_3_6", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sqrt( (~!g)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~a)⨸(~c)*∫(1⨸(sqrt((~g)*sin((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸((~c)*(~g))* ∫(sqrt( (~g)*sin((~e) + (~f)*(~x)))⨸(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_7", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sin( (~!e) + (~!f)*(~x))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +1⨸(~c)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sin((~e) + (~f)*(~x)), (~x)) - (~d)⨸(~c)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_3_8", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sin( (~!e) + (~!f)*(~x))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) ? +(~a)⨸(~c)*∫(1⨸(sin((~e) + (~f)*(~x))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) + ((~b)*(~c) - (~a)*(~d))⨸(~c)* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_9", +@rule ∫(sqrt( (~!g)*sin((~!e) + (~!f)*(~x)))/(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + eq((~a)^2 - (~b)^2, 0) || + eq((~c)^2 - (~d)^2, 0) + ) ? +-(~a)*(~g)⨸((~b)*(~c) - (~a)*(~d))* ∫(1⨸(sqrt((~g)*sin((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) + (~c)*(~g)⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(sqrt( (~g)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_10", +@rule ∫(sqrt( (~!g)*sin((~!e) + (~!f)*(~x)))/(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +2*sqrt(-cot((~e) + (~f)*(~x))^2)* sqrt((~g)*sin((~e) + (~f)*(~x)))⨸((~f)*((~c) + (~d))*cot((~e) + (~f)*(~x))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))))*sqrt(((~b) + (~a)*csc((~e) + (~f)*(~x)))⨸((~a) + (~b)))* elliptic_pi(2*(~c)⨸((~c) + (~d)), asin(sqrt(1 - csc((~e) + (~f)*(~x)))⨸sqrt(2)), 2*(~a)⨸((~a) + (~b))) : nothing) + +("4_1_2_3_11", +@rule ∫(1/(sqrt((~!g)*sin((~!e) + (~!f)*(~x)))* sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + eq((~a)^2 - (~b)^2, 0) || + eq((~c)^2 - (~d)^2, 0) + ) ? +(~b)⨸((~b)*(~c) - (~a)*(~d))* ∫(1⨸(sqrt((~g)*sin((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) - (~d)⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(sqrt( (~g)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_12", +@rule ∫(1/(sqrt((~!g)*sin((~!e) + (~!f)*(~x)))* sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +1⨸(~c)*∫(1⨸(sqrt((~g)*sin((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) - (~d)⨸((~c)*(~g))* ∫(sqrt( (~g)*sin((~e) + (~f)*(~x)))⨸(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_13", +@rule ∫(1/(sin((~!e) + (~!f)*(~x))* sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +(~d)^2⨸((~c)*((~b)*(~c) - (~a)*(~d)))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + 1⨸((~c)*((~b)*(~c) - (~a)*(~d)))* ∫(((~b)*(~c) - (~a)*(~d) - (~b)*(~d)*sin((~e) + (~f)*(~x)))⨸(sin((~e) + (~f)*(~x))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_14", +@rule ∫(1/(sin((~!e) + (~!f)*(~x))* sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) ? +1⨸(~c)*∫(1⨸(sin((~e) + (~f)*(~x))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) - (~d)⨸(~c)*∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_15", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sin((~!e) + (~!f)*(~x))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~b)*(~c) + (~a)*(~d), 0) ? +-(~d)⨸(~c)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + 1⨸(~c)* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sin((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_2_3_16", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sin((~!e) + (~!f)*(~x))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~b)*(~c) + (~a)*(~d), 0) ? +-2*(~a)⨸(~f)* int_and_subst(1⨸(1 - (~a)*(~c)*(~x)^2), (~x), (~x), cos((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), "4_1_2_3_16") : nothing) + +("4_1_2_3_17", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sin((~!e) + (~!f)*(~x))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + eq((~c)^2 - (~d)^2, 0) ? +((~b)*(~c) - (~a)*(~d))⨸(~c)* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) + (~a)⨸(~c)* ∫(sqrt( (~c) + (~d)*sin((~e) + (~f)*(~x)))⨸(sin((~e) + (~f)*(~x))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_18", +@rule ∫(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))/(sin((~!e) + (~!f)*(~x))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +-2*((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~c)*(~f)*rt(((~a) + (~b))⨸((~c) + (~d)), 2)*cos((~e) + (~f)*(~x)))* sqrt(-((~b)*(~c) - (~a)*(~d))*(1 - sin((~e) + (~f)*(~x)))⨸(((~c) + (~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))))* sqrt(((~b)*(~c) - (~a)*(~d))*(1 + sin((~e) + (~f)*(~x)))⨸(((~c) - (~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))))* elliptic_pi((~a)*((~c) + (~d))⨸((~c)*((~a) + (~b))), asin(rt(((~a) + (~b))⨸((~c) + (~d)), 2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), ((~a) - (~b))*((~c) + (~d))⨸(((~a) + (~b))*((~c) - (~d)))) : nothing) + +("4_1_2_3_19", +@rule ∫(1/(sin((~!e) + (~!f)*(~x))*sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~c)^2 - (~d)^2, 0) ? +cos((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))))* ∫(1⨸(cos((~e) + (~f)*(~x))*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_2_3_20", +@rule ∫(1/(sin((~!e) + (~!f)*(~x))*sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + !eq((~a)^2 - (~b)^2, 0) || + !eq((~c)^2 - (~d)^2, 0) + ) ? +-(~b)⨸(~a)*∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) + 1⨸(~a)* ∫(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(sin((~e) + (~f)*(~x))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_21", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))/sin((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~c)^2 - (~d)^2, 0) ? +sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸cos((~e) + (~f)*(~x))* ∫(cot((~e) + (~f)*(~x)), (~x)) : nothing) + +("4_1_2_3_22", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))/sin((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + !eq((~a)^2 - (~b)^2, 0) || + !eq((~c)^2 - (~d)^2, 0) + ) ? +(~d)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + (~c)*∫( sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸(sin((~e) + (~f)*(~x))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_2_3_23", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~p) + 2*(~n), 0) && + ext_isinteger((~n)) ? +(~a)^(~n)*(~c)^(~n)*∫(tan((~e) + (~f)*(~x))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - (~n)), (~x)) : nothing) + +("4_1_2_3_24", +@rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + ext_isinteger((~m) - 1/2) ? +sqrt((~a) - (~b)*sin((~e) + (~f)*(~x)))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~f)*cos((~e) + (~f)*(~x)))* int_and_subst(((~g)*(~x))^(~p)*((~a) + (~b)*(~x))^((~m) - 1⨸2)*((~c) + (~d)*(~x))^(~n)⨸sqrt((~a) - (~b)*(~x)), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_2_3_24") : nothing) + +("4_1_2_3_25", +@rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + ( + ext_isinteger((~m), (~n)) || + ext_isinteger((~m), (~p)) || + ext_isinteger((~n), (~p)) + ) && + !eq((~p), 2) ? +∫(ext_expand(((~g)*sin((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)), (~x)) : nothing) + +# ("4_1_2_3_26", +# @rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && +# !eq((~p), 2) ? +# Unintegrable[((~g)*sin((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)] : nothing) + +("4_1_2_3_27", +@rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~!p)*((~!a) + (~!b)*csc((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !(ext_isinteger((~p))) && + ext_isinteger((~m)) && + ext_isinteger((~n)) ? +(~g)^((~m) + (~n))* ∫(((~g)*sin((~e) + (~f)*(~x)))^((~p) - (~m) - (~n))*((~b) + (~a)*sin((~e) + (~f)*(~x)))^ (~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_3_28", +@rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~!p)*((~!a) + (~!b)*csc((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !(ext_isinteger((~p))) && + !( + ext_isinteger((~m)) && + ext_isinteger((~n)) + ) ? +((~g)*csc((~e) + (~f)*(~x)))^(~p)*((~g)*sin((~e) + (~f)*(~x)))^(~p)* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~g)*csc((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + +("4_1_2_3_29", +@rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + ext_isinteger((~n)) ? +(~g)^(~n)*∫(((~g)*sin((~e) + (~f)*(~x)))^((~p) - (~n))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_3_30", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && + !(ext_isinteger((~n))) && + ext_isinteger((~m)) && + ext_isinteger((~p)) ? +∫(((~b) + (~a)*csc((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n)⨸ csc((~e) + (~f)*(~x))^((~m) + (~p)), (~x)) : nothing) + +("4_1_2_3_31", +@rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + !(ext_isinteger((~n))) && + ext_isinteger((~m)) && + !(ext_isinteger((~p))) ? +csc((~e) + (~f)*(~x))^(~p)*((~g)*sin((~e) + (~f)*(~x)))^(~p)* ∫(((~b) + (~a)*csc((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n)⨸ csc((~e) + (~f)*(~x))^((~m) + (~p)), (~x)) : nothing) + +("4_1_2_3_32", +@rule ∫(((~!g)*sin((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~n))) && + !(ext_isinteger((~m))) ? +((~g)*sin((~e) + (~f)*(~x)))^(~n)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n)* ∫(((~g)*sin((~e) + (~f)*(~x)))^((~p) - (~n))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_3_33", +@rule ∫(((~!g)*csc((~!e) + (~!f)*(~x)))^(~!p)*((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !(ext_isinteger((~p))) && + ext_isinteger((~m)) && + ext_isinteger((~n)) ? +(~g)^((~m) + (~n))* ∫(((~g)*csc((~e) + (~f)*(~x)))^((~p) - (~m) - (~n))*((~b) + (~a)*csc((~e) + (~f)*(~x)))^ (~m)*((~d) + (~c)*csc((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_3_34", +@rule ∫(((~!g)*csc((~!e) + (~!f)*(~x)))^(~!p)*((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !(ext_isinteger((~p))) && + !( + ext_isinteger((~m)) && + ext_isinteger((~n)) + ) ? +((~g)*csc((~e) + (~f)*(~x)))^(~p)*((~g)*sin((~e) + (~f)*(~x)))^(~p)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~g)*sin((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + +("4_1_2_3_35", +@rule ∫(((~!g)*csc((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + ext_isinteger((~m)) ? +(~g)^(~m)*∫(((~g)*csc((~e) + (~f)*(~x)))^((~p) - (~m))*((~b) + (~a)*csc((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_2_3_36", +@rule ∫(csc((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !(ext_isinteger((~m))) && + ext_isinteger((~n)) && + ext_isinteger((~p)) ? +∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n)⨸ sin((~e) + (~f)*(~x))^((~n) + (~p)), (~x)) : nothing) + +("4_1_2_3_37", +@rule ∫(((~!g)*csc((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) && + ext_isinteger((~n)) && + !(ext_isinteger((~p))) ? +sin((~e) + (~f)*(~x))^(~p)*((~g)*csc((~e) + (~f)*(~x)))^(~p)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~d) + (~c)*sin((~e) + (~f)*(~x)))^(~n)⨸ sin((~e) + (~f)*(~x))^((~n) + (~p)), (~x)) : nothing) + +("4_1_2_3_38", +@rule ∫(((~!g)*csc((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~c) + (~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~n))) ? +((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~g)*csc((~e) + (~f)*(~x)))^(~m)⨸((~b) + (~a)*csc((~e) + (~f)*(~x)))^(~m)* ∫(((~g)*csc((~e) + (~f)*(~x)))^((~p) - (~m))*((~b) + (~a)*csc((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*csc((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.3 (a+b sin)^m (c+d sin)^n (A+B sin).jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.3 (a+b sin)^m (c+d sin)^n (A+B sin).jl new file mode 100644 index 0000000..5493e51 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.3 (a+b sin)^m (c+d sin)^n (A+B sin).jl @@ -0,0 +1,447 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.3.1 (a+b sin)^m (c+d sin)^n (A+B sin) *) +("4_1_3_1", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) && + eq((~A)*(~b) + (~a)*(~B), 0) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + ext_isinteger((~n)) ? +∫(ext_expand( sin((~e) + (~f)*(~x))^(~n)*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~A) + (~B)*sin((~e) + (~f)*(~x))), (~x)), (~x)) : nothing) + +("4_1_3_2", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) && + !( + ext_isinteger( (~n)) && + ( + lt((~m), 0) && + gt((~n), 0) || + lt(0, (~n), (~m)) || + lt((~m), (~n), 0) + ) + ) ? +(~a)^(~m)*(~c)^(~m)* ∫(cos((~e) + (~f)*(~x))^(2*(~m))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - (~m))*((~A) + (~B)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_3_3", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) ? +∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~A)*(~c) + ((~B)*(~c) + (~A)*(~d))*sin((~e) + (~f)*(~x)) + (~B)*(~d)*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_3_4", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +((~A)*(~b) + (~a)*(~B))⨸(2*(~a)*(~b))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + ((~B)*(~c) + (~A)*(~d))⨸(2*(~c)*(~d))* ∫(sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_3_5", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + eq((~A)*(~b)*((~m) + (~n) + 1) + (~a)*(~B)*((~m) - (~n)), 0) && + !eq((~m), -1/2) ? +-(~B)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*((~m) + (~n) + 1)) : nothing) + +("4_1_3_6", +@rule ∫(sqrt((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +(~B)⨸(~d)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) - ((~B)*(~c) - (~A)*(~d))⨸(~d)* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_3_7", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ( + lt((~m), -1/2) || + ilt((~m) + (~n), 0) && + !(sumsimpler((~n), 1)) + ) && + !eq(2*(~m) + 1, 0) ? +((~A)*(~b) - (~a)*(~B))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(2*(~m) + 1)) + ((~a)*(~B)*((~m) - (~n)) + (~A)*(~b)*((~m) + (~n) + 1))⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_3_8", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) && + !eq((~m) + (~n) + 1, 0) ? +-(~B)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*((~m) + (~n) + 1)) - ((~B)*(~c)*((~m) - (~n)) - (~A)*(~d)*((~m) + (~n) + 1))⨸((~d)*((~m) + (~n) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_3_9", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + eq((~m) + (~n) + 2, 0) && + eq((~A)*((~a)*(~d)*(~m) + (~b)*(~c)*((~n) + 1)) - (~B)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)), 0) ? +((~B)*(~c) - (~A)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~n) + 1)*((~c)^2 - (~d)^2)) : nothing) + +("4_1_3_10", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 1/2) && + lt((~n), -1) && + ext_isinteger(2*(~m)) && + ( + ext_isinteger(2*(~n)) || + eq((~c), 0) + ) ? +-(~b)^2*((~B)*(~c) - (~A)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~b)*(~c) + (~a)*(~d))) - (~b)⨸((~d)*((~n) + 1)*((~b)*(~c) + (~a)*(~d)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~a)*(~A)*(~d)*((~m) - (~n) - 2) - (~B)*((~a)*(~c)*((~m) - 1) + (~b)*(~d)*((~n) + 1)) - ((~A)*(~b)*(~d)*((~m) + (~n) + 1) - (~B)*((~b)*(~c)*(~m) - (~a)*(~d)*((~n) + 1)))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_3_11", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 1/2) && + !(lt((~n), -1)) && + ext_isinteger(2*(~m)) && + ( + ext_isinteger(2*(~n)) || + eq((~c), 0) + ) ? +-(~b)*(~B)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 1)) + 1⨸((~d)*((~m) + (~n) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)*(~A)*(~d)*((~m) + (~n) + 1) + (~B)*((~a)*(~c)*((~m) - 1) + (~b)*(~d)*((~n) + 1)) + ((~A)*(~b)*(~d)*((~m) + (~n) + 1) - (~B)*((~b)*(~c)*(~m) - (~a)*(~d)*(2*(~m) + (~n))))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_3_12", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1/2) && + gt((~n), 0) && + ext_isinteger(2*(~m)) && + ( + ext_isinteger(2*(~n)) || + eq((~c), 0) + ) ? +((~A)*(~b) - (~a)*(~B))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(2*(~m) + 1)) - 1⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)* simp((~A)*((~a)*(~d)*(~n) - (~b)*(~c)*((~m) + 1)) - (~B)*((~a)*(~c)*(~m) + (~b)*(~d)*(~n)) - (~d)*((~a)*(~B)*((~m) - (~n)) + (~A)*(~b)*((~m) + (~n) + 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_3_13", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1/2) && + !(gt((~n), 0)) && + ext_isinteger(2*(~m)) && + ( + ext_isinteger(2*(~n)) || + eq((~c), 0) + ) ? +(~b)*((~A)*(~b) - (~a)*(~B))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a)*(~f)*(2*(~m) + 1)*((~b)*(~c) - (~a)*(~d))) + 1⨸((~a)*(2*(~m) + 1)*((~b)*(~c) - (~a)*(~d)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~B)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + (~A)*((~b)*(~c)*((~m) + 1) - (~a)*(~d)*(2*(~m) + (~n) + 2)) + (~d)*((~A)*(~b) - (~a)*(~B))*((~m) + (~n) + 2)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_3_14", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + eq((~A)*(~b)*(~d)*(2*(~n) + 3) - (~B)*((~b)*(~c) - 2*(~a)*(~d)*((~n) + 1)), 0) ? +-2*(~b)*(~B)* cos((~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*(2*(~n) + 3)* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) : nothing) + +("4_1_3_15", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~n), -1) ? +-(~b)^2*((~B)*(~c) - (~A)*(~d))* cos((~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)* (~f)*((~n) + 1)*((~b)*(~c) + (~a)*(~d))*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) + ((~A)*(~b)*(~d)*(2*(~n) + 3) - (~B)*((~b)*(~c) - 2*(~a)*(~d)*((~n) + 1)))⨸(2* (~d)*((~n) + 1)*((~b)*(~c) + (~a)*(~d)))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_3_16", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(lt((~n), -1)) ? +-2*(~b)*(~B)* cos((~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*(2*(~n) + 3)* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) + ((~A)*(~b)*(~d)*(2*(~n) + 3) - (~B)*((~b)*(~c) - 2*(~a)*(~d)*((~n) + 1)))⨸((~b)*(~d)*(2*(~n) + 3))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_3_17", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +((~A)*(~b) - (~a)*(~B))⨸(~b)* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) + (~B)⨸(~b)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_3_18", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~n), 0) && + ( + ext_isinteger((~n)) || + eq((~m) + 1/2, 0) + ) ? +-(~B)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*((~m) + (~n) + 1)) + 1⨸((~b)*((~m) + (~n) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)* simp((~A)*(~b)*(~c)*((~m) + (~n) + 1) + (~B)*((~a)*(~c)*(~m) + (~b)*(~d)*(~n)) + ((~A)*(~b)*(~d)*((~m) + (~n) + 1) + (~B)*((~a)*(~d)*(~m) + (~b)*(~c)*(~n)))* sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_3_19", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~n), -1) && + ( + ext_isinteger((~n)) || + eq((~m) + 1/2, 0) + ) ? +((~B)*(~c) - (~A)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~n) + 1)*((~c)^2 - (~d)^2)) + 1⨸((~b)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~A)*((~a)*(~d)*(~m) + (~b)*(~c)*((~n) + 1)) - (~B)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + (~b)*((~B)*(~c) - (~A)*(~d))*((~m) + (~n) + 2)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_3_20", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(sqrt( (~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +((~A)*(~b) - (~a)*(~B))⨸((~b)*(~c) - (~a)*(~d))*∫(1⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) + ((~B)*(~c) - (~A)*(~d))⨸((~b)*(~c) - (~a)*(~d))* ∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_3_21", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !eq((~m) + 1/2, 0) ? +(~B)⨸(~d)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) - ((~B)*(~c) - (~A)*(~d))⨸(~d)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_3_22", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !eq((~A)*(~b) + (~a)*(~B), 0) ? +((~A)*(~b) - (~a)*(~B))⨸(~b)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) + (~B)⨸(~b)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_1_3_23", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^2*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~n), -1) ? +((~B)*(~c) - (~A)*(~d))*((~b)*(~c) - (~a)*(~d))^2* cos((~e) + (~f)*(~x))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)* (~d)^2*((~n) + 1)*((~c)^2 - (~d)^2)) - 1⨸((~d)^2*((~n) + 1)*((~c)^2 - (~d)^2))*∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~d)*((~n) + 1)*((~B)*((~b)*(~c) - (~a)*(~d))^2 - (~A)*(~d)*((~a)^2*(~c) + (~b)^2*(~c) - 2*(~a)*(~b)*(~d))) - (((~B)*(~c) - (~A)*(~d))*((~a)^2*(~d)^2*((~n) + 2) + (~b)^2*((~c)^2 + (~d)^2*((~n) + 1))) + 2*(~a)*(~b)*(~d)*((~A)*(~c)*(~d)*((~n) + 2) - (~B)*((~c)^2 + (~d)^2*((~n) + 1))))* sin((~e) + (~f)*(~x)) - (~b)^2*(~B)*(~d)*((~n) + 1)*((~c)^2 - (~d)^2)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_3_24", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 1) && + lt((~n), -1) ? +-((~b)*(~c) - (~a)*(~d))*((~B)*(~c) - (~A)*(~d))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~c)^2 - (~d)^2)) + 1⨸((~d)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~b)*((~b)*(~c) - (~a)*(~d))*((~B)*(~c) - (~A)*(~d))*((~m) - 1) + (~a)*(~d)*((~a)*(~A)*(~c) + (~b)*(~B)*(~c) - ((~A)*(~b) + (~a)*(~B))*(~d))*((~n) + 1) + ((~b)*((~b)*(~d)*((~B)*(~c) - (~A)*(~d)) + (~a)*((~A)*(~c)*(~d) + (~B)*((~c)^2 - 2*(~d)^2)))*((~n) + 1) - (~a)*((~b)*(~c) - (~a)*(~d))*((~B)*(~c) - (~A)*(~d))*((~n) + 2))*sin((~e) + (~f)*(~x)) + (~b)*((~d)*((~A)*(~b)*(~c) + (~a)*(~B)*(~c) - (~a)*(~A)*(~d))*((~m) + (~n) + 1) - (~b)*(~B)*((~c)^2*(~m) + (~d)^2*((~n) + 1)))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_3_25", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 1) && + !( + igt((~n), 1) && + ( + !(ext_isinteger((~m))) || + eq((~a), 0) && + !eq((~c), 0) + ) + ) ? +-(~b)*(~B)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 1)) + 1⨸((~d)*((~m) + (~n) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 2)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)^2*(~A)*(~d)*((~m) + (~n) + 1) + (~b)*(~B)*((~b)*(~c)*((~m) - 1) + (~a)*(~d)*((~n) + 1)) + ((~a)*(~d)*(2*(~A)*(~b) + (~a)*(~B))*((~m) + (~n) + 1) - (~b)*(~B)*((~a)*(~c) - (~b)*(~d)*((~m) + (~n))))*sin((~e) + (~f)*(~x)) + (~b)*((~A)*(~b)*(~d)*((~m) + (~n) + 1) - (~B)*((~b)*(~c)*(~m) - (~a)*(~d)*(2*(~m) + (~n))))* sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_3_26", +@rule ∫(sqrt( (~c) + (~!d)*sin((~!e) + (~!f)*(~x)))*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/((~!b)*sin((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~c)^2 - (~d)^2, 0) ? +(~B)*(~d)⨸(~b)^2*∫(sqrt((~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + ∫(((~A)*(~c) + ((~B)*(~c) + (~A)*(~d))*sin((~e) + (~f)*(~x)))⨸(((~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_3_27", +@rule ∫(sqrt( (~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~B)⨸(~b)*∫(sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) + ((~A)*(~b) - (~a)*(~B))⨸(~b)* ∫(sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2), (~x)) : nothing) + +("4_1_3_28", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*((~A)*(~b) - (~a)*(~B))* cos((~e) + (~f)*(~x))⨸((~f)*((~a)^2 - (~b)^2)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~d)*sin((~e) + (~f)*(~x)))) + (~d)⨸((~a)^2 - (~b)^2)* ∫(((~A)*(~b) - (~a)*(~B) + ((~a)*(~A) - (~b)*(~B))*sin((~e) + (~f)*(~x)))⨸(sqrt( (~a) + (~b)*sin((~e) + (~f)*(~x)))*((~d)*sin((~e) + (~f)*(~x)))^(3⨸2)), (~x)) : nothing) + +("4_1_3_29", +@rule ∫(((~A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(((~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~c)^2 - (~d)^2, 0) && + eq((~A), (~B)) && + pos(((~c) + (~d))/(~b)) ? +-2*(~A)*((~c) - (~d))*tan((~e) + (~f)*(~x))⨸((~f)*(~b)*(~c)^2)*rt(((~c) + (~d))⨸(~b), 2)* sqrt((~c)*(1 + csc((~e) + (~f)*(~x)))⨸((~c) - (~d)))* sqrt((~c)*(1 - csc((~e) + (~f)*(~x)))⨸((~c) + (~d)))* elliptic_e( asin(sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~b)*sin((~e) + (~f)*(~x)))⨸ rt(((~c) + (~d))⨸(~b), 2)), -((~c) + (~d))⨸((~c) - (~d))) : nothing) + +("4_1_3_30", +@rule ∫(((~A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(((~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~c)^2 - (~d)^2, 0) && + eq((~A), (~B)) && + neg(((~c) + (~d))/(~b)) ? +-sqrt(-(~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~b)*sin((~e) + (~f)*(~x)))* ∫(((~A) + (~B)*sin((~e) + (~f)*(~x)))⨸((-(~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_3_31", +@rule ∫(((~A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + eq((~A), (~B)) && + pos(((~a) + (~b))/((~c) + (~d))) ? +-2*(~A)*((~c) - (~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸((~f)*((~b)*(~c) - (~a)*(~d))^2*rt(((~a) + (~b))⨸((~c) + (~d)), 2)* cos((~e) + (~f)*(~x)))* sqrt(((~b)*(~c) - (~a)*(~d))*(1 + sin((~e) + (~f)*(~x)))⨸(((~c) - (~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))))* sqrt(-((~b)*(~c) - (~a)*(~d))*(1 - sin((~e) + (~f)*(~x)))⨸(((~c) + (~d))*((~a) + (~b)*sin((~e) + (~f)*(~x)))))* elliptic_e( asin(rt(((~a) + (~b))⨸((~c) + (~d)), 2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), ((~a) - (~b))*((~c) + (~d))⨸(((~a) + (~b))*((~c) - (~d)))) : nothing) + +("4_1_3_32", +@rule ∫(((~A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + eq((~A), (~B)) && + neg(((~a) + (~b))/((~c) + (~d))) ? +sqrt(-(~c) - (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))* ∫(((~A) + (~B)*sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt(-(~c) - (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_3_33", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !eq((~A), (~B)) ? +((~A) - (~B))⨸((~a) - (~b))* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) - ((~A)*(~b) - (~a)*(~B))⨸((~a) - (~b))* ∫((1 + sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_3_34", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + gt((~n), 0) ? +((~B)*(~a) - (~A)*(~b))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)* simp((~c)*((~a)*(~A) - (~b)*(~B))*((~m) + 1) + (~d)*(~n)*((~A)*(~b) - (~a)*(~B)) + ((~d)*((~a)*(~A) - (~b)*(~B))*((~m) + 1) - (~c)*((~A)*(~b) - (~a)*(~B))*((~m) + 2))*sin((~e) + (~f)*(~x)) - (~d)*((~A)*(~b) - (~a)*(~B))*((~m) + (~n) + 2)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_3_35", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + isrational((~m)) && + (~m) < -1 && + ( + eq((~a), 0) && + ext_isinteger((~m)) && + !(ext_isinteger((~n))) || + !( + ext_isinteger(2*(~n)) && + lt((~n), -1) && + ( + ext_isinteger((~n)) && + !(ext_isinteger((~m))) || + eq((~a), 0) + ) + ) + ) ? +-((~A)*(~b)^2 - (~a)*(~b)*(~B))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(1 + (~n))⨸((~f)*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp(((~a)*(~A) - (~b)*(~B))*((~b)*(~c) - (~a)*(~d))*((~m) + 1) + (~b)*(~d)*((~A)*(~b) - (~a)*(~B))*((~m) + (~n) + 2) + ((~A)*(~b) - (~a)*(~B))*((~a)*(~d)*((~m) + 1) - (~b)*(~c)*((~m) + 2))*sin((~e) + (~f)*(~x)) - (~b)*(~d)*((~A)*(~b) - (~a)*(~B))*((~m) + (~n) + 3)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_3_36", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +((~A)*(~b) - (~a)*(~B))⨸((~b)*(~c) - (~a)*(~d))* ∫(1⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) + ((~B)*(~c) - (~A)*(~d))⨸((~b)*(~c) - (~a)*(~d))* ∫(1⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_3_37", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~B)⨸(~d)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) - ((~B)*(~c) - (~A)*(~d))⨸(~d)* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_3_38", +@rule ∫(sqrt((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + eq((~n)^2, 1/4) ? +-2*(~B)*cos((~e) + (~f)*(~x))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~f)*(2*(~n) + 3)) + 1⨸(2*(~n) + 3)* ∫(((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) - 1)⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* simp((~a)*(~A)*(~c)*(2*(~n) + 3) + (~B)*((~b)*(~c) + 2*(~a)*(~d)*(~n)) + ((~B)*((~a)*(~c) + (~b)*(~d))*(2*(~n) + 1) + (~A)*((~b)*(~c) + (~a)*(~d))*(2*(~n) + 3))* sin((~e) + (~f)*(~x)) + ((~A)*(~b)*(~d)*(2*(~n) + 3) + (~B)*((~a)*(~d) + 2*(~b)*(~c)*(~n)))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_3_39", +@rule ∫(((~A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(sqrt(sin((~!e) + (~!f)*(~x)))* sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) && + gt((~b), 0) && + gt((~b)^2 - (~a)^2, 0) && + eq((~A), (~B)) ? +4*(~A)⨸((~f)*sqrt((~a) + (~b)))* elliptic_pi(-1, -asin( cos((~e) + (~f)*(~x))⨸(1 + sin((~e) + (~f)*(~x)))), -((~a) - (~b))⨸((~a) + (~b))) : nothing) + +("4_1_3_40", +@rule ∫(((~A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~d), (~A), (~B), (~x)) && + gt((~b), 0) && + gt((~b)^2 - (~a)^2, 0) && + eq((~A), (~B)) ? +sqrt(sin((~e) + (~f)*(~x)))⨸sqrt((~d)*sin((~e) + (~f)*(~x)))* ∫(((~A) + (~B)*sin((~e) + (~f)*(~x)))⨸(sqrt(sin((~e) + (~f)*(~x)))* sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_3_41", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))/(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~B)⨸(~d)*∫(sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - ((~B)*(~c) - (~A)*(~d))⨸(~d)* ∫(1⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +# ("4_1_3_42", +# @rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# !eq((~a)^2 - (~b)^2, 0) && +# !eq((~c)^2 - (~d)^2, 0) ? +# Unintegrable[((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~A) + (~B)*sin((~e) + (~f)*(~x))), (~x)] : nothing) + +#(* Int[(a_+b_.*sin[e_.+f_.*x_])^m_*(c_+d_.*sin[e_.+f_.*x_])^n_*(A_.+B_ .*sin[e_.+f_.*x_])^p_,x_Symbol] := a^m*c^m*Int[Cos[e+f*x]^(2*m)*(c+d*Sin[e+f*x])^(n-m)*(A+B*Sin[e+f*x]) ^p,x] /; FreeQ[{a,b,c,d,e,f,A,B,n,p},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m] && Not[IntegerQ[n] && (LtQ[m,0] && GtQ[n,0] || LtQ[0,n,m] || LtQ[m,n,0])] *) +#(* Int[(a_+b_.*cos[e_.+f_.*x_])^m_*(c_+d_.*cos[e_.+f_.*x_])^n_*(A_.+B_ .*cos[e_.+f_.*x_])^p_,x_Symbol] := a^m*c^m*Int[Sin[e+f*x]^(2*m)*(c+d*Cos[e+f*x])^(n-m)*(A+B*Cos[e+f*x]) ^p,x] /; FreeQ[{a,b,c,d,e,f,A,B,n,p},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m] && Not[IntegerQ[n] && (LtQ[m,0] && GtQ[n,0] || LtQ[0,n,m] || LtQ[m,n,0])] *) +("4_1_3_43", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸((~f)*cos((~e) + (~f)*(~x)))* int_and_subst(((~a) + (~b)*(~x))^((~m) - 1⨸2)*((~c) + (~d)*(~x))^((~n) - 1⨸2)*((~A) + (~B)*(~x))^(~p), (~x), (~x), sin((~e) + (~f)*(~x)), "4_1_3_43") : nothing) + +("4_1_3_44", +@rule ∫(((~a) + (~!b)*cos((~!e) + (~!f)*(~x)))^(~!m)*((~c) + (~!d)*cos((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*cos((~!e) + (~!f)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) ? +-sqrt((~a) + (~b)*cos((~e) + (~f)*(~x)))*sqrt((~c) + (~d)*cos((~e) + (~f)*(~x)))⨸((~f)*sin((~e) + (~f)*(~x)))* int_and_subst(((~a) + (~b)*(~x))^((~m) - 1⨸2)*((~c) + (~d)*(~x))^((~n) - 1⨸2)*((~A) + (~B)*(~x))^(~p), (~x), (~x), cos((~e) + (~f)*(~x)), "4_1_3_44") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.4/4.1.4.1 (a+b sin)^m (A+B sin+C sin^2).jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.4/4.1.4.1 (a+b sin)^m (A+B sin+C sin^2).jl new file mode 100644 index 0000000..1530305 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.4/4.1.4.1 (a+b sin)^m (A+B sin+C sin^2).jl @@ -0,0 +1,124 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.4.1 (a+b sin)^m (A+B sin+C sin^2) *) +("4_1_4_1_1", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~B), (~C), (~m), (~x)) ? +1⨸(~b)*∫(((~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~B) + (~C)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_1_2", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~A), (~C), (~m), (~x)) && + eq((~A)*((~m) + 2) + (~C)*((~m) + 1), 0) ? +(~A)*cos((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 1)) : nothing) + +("4_1_4_1_3", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~A), (~C), (~x)) && + lt((~m), -1) ? +(~A)*cos( (~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 1)) + ((~A)*((~m) + 2) + (~C)*((~m) + 1))⨸((~b)^2*((~m) + 1))*∫(((~b)*sin((~e) + (~f)*(~x)))^((~m) + 2), (~x)) : nothing) + +("4_1_4_1_4", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~e), (~f), (~A), (~C), (~x)) && + igt(((~m) + 1)/2, 0) ? +-1⨸(~f)*int_and_subst((1 - (~x)^2)^(((~m) - 1)⨸2)*((~A) + (~C) - (~C)*(~x)^2), (~x), (~x), cos((~e) + (~f)*(~x)), "4_1_4_1_4") : nothing) + +("4_1_4_1_5", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~A), (~C), (~m), (~x)) && + !(lt((~m), -1)) ? +-(~C)*cos( (~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + ((~A)*((~m) + 2) + (~C)*((~m) + 1))⨸((~m) + 2)*∫(((~b)*sin((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_1_4_1_6", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~C), (~m), (~x)) && + eq((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C), 0) ? +1⨸(~b)^2* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~b)*(~B) - (~a)*(~C) + (~b)*(~C)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_7", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~C), (~m), (~x)) && + eq((~A)*(~b)^2 + (~a)^2*(~C), 0) ? +(~C)⨸(~b)^2* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*simp(-(~a) + (~b)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_8", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~C), (~m), (~x)) && + eq((~A) - (~B) + (~C), 0) && + !(ext_isinteger(2*(~m))) ? +((~A) - (~C))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 + sin((~e) + (~f)*(~x))), (~x)) + (~C)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 + sin((~e) + (~f)*(~x)))^2, (~x)) : nothing) + +("4_1_4_1_9", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~C), (~m), (~x)) && + eq((~A) + (~C), 0) && + !(ext_isinteger(2*(~m))) ? +((~A) - (~C))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 + sin((~e) + (~f)*(~x))), (~x)) + (~C)*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*(1 + sin((~e) + (~f)*(~x)))^2, (~x)) : nothing) + +("4_1_4_1_10", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~C), (~x)) && + lt((~m), -1) && + eq((~a)^2 - (~b)^2, 0) ? +((~A)*(~b) - (~a)*(~B) + (~b)*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(2*(~m) + 1)) + 1⨸((~a)^2*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~a)*(~A)*((~m) + 1) + (~m)*((~b)*(~B) - (~a)*(~C)) + (~b)*(~C)*(2*(~m) + 1)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_11", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~C), (~x)) && + lt((~m), -1) && + eq((~a)^2 - (~b)^2, 0) ? +(~b)*((~A) + (~C))*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(2*(~m) + 1)) + 1⨸((~a)^2*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~a)*(~A)*((~m) + 1) - (~a)*(~C)*(~m) + (~b)*(~C)*(2*(~m) + 1)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_12", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~C), (~x)) && + lt((~m), -1) && + !eq((~a)^2 - (~b)^2, 0) ? +-((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)* (~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸((~b)*((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~b)*((~a)*(~A) - (~b)*(~B) + (~a)*(~C))*((~m) + 1) - ((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C) + (~b)*((~A)*(~b) - (~a)*(~B) + (~b)*(~C))*((~m) + 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_13", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~C), (~x)) && + lt((~m), -1) && + !eq((~a)^2 - (~b)^2, 0) ? +-((~A)*(~b)^2 + (~a)^2*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)* (~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸((~b)*((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~a)*(~b)*((~A) + (~C))*((~m) + 1) - ((~A)*(~b)^2 + (~a)^2*(~C) + (~b)^2*((~A) + (~C))*((~m) + 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_14", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~C), (~m), (~x)) && + !(lt((~m), -1)) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + 1⨸((~b)*((~m) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~A)*(~b)*((~m) + 2) + (~b)*(~C)*((~m) + 1) + ((~b)*(~B)*((~m) + 2) - (~a)*(~C))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_15", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~C), (~m), (~x)) && + !(lt((~m), -1)) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + 1⨸((~b)*((~m) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~A)*(~b)*((~m) + 2) + (~b)*(~C)*((~m) + 1) - (~a)*(~C)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_1_16", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x))^(~p))^ (~m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~A), (~B), (~C), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*sin((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*sin((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~b)*sin((~e) + (~f)*(~x)))^((~m)*(~p))*((~A) + (~B)*sin((~e) + (~f)*(~x)) + (~C)*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_4_1_17", +@rule ∫(((~!b)*cos((~!e) + (~!f)*(~x))^(~p))^ (~m)*((~!A) + (~!B)*cos((~!e) + (~!f)*(~x)) + (~!C)*cos((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~A), (~B), (~C), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*cos((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*cos((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~b)*cos((~e) + (~f)*(~x)))^((~m)*(~p))*((~A) + (~B)*cos((~e) + (~f)*(~x)) + (~C)*cos((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_4_1_18", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x))^(~p))^(~m)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~A), (~C), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*sin((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*sin((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~b)*sin((~e) + (~f)*(~x)))^((~m)*(~p))*((~A) + (~C)*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_4_1_19", +@rule ∫(((~!b)*cos((~!e) + (~!f)*(~x))^(~p))^(~m)*((~!A) + (~!C)*cos((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~e), (~f), (~A), (~C), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*cos((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*cos((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~b)*cos((~e) + (~f)*(~x)))^((~m)*(~p))*((~A) + (~C)*cos((~e) + (~f)*(~x))^2), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.4/4.1.4.2 (a+b sin)^m (c+d sin)^n (A+B sin+C sin^2).jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.4/4.1.4.2 (a+b sin)^m (c+d sin)^n (A+B sin+C sin^2).jl new file mode 100644 index 0000000..f4ed52b --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.4/4.1.4.2 (a+b sin)^m (c+d sin)^n (A+B sin+C sin^2).jl @@ -0,0 +1,401 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.4.2 (a+b sin)^m (c+d sin)^n (A+B sin+C sin^2) *) +("4_1_4_2_1", +@rule ∫(((~!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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C), 0) ? +1⨸(~b)^2* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~b)*(~B) - (~a)*(~C) + (~b)*(~C)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_2_2", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~A)*(~b)^2 + (~a)^2*(~C), 0) ? +-(~C)⨸(~b)^2* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~a) - (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_2_3", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) ? +-((~b)*(~c) - (~a)*(~d))*((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)^2* (~f)*((~m) + 1)*((~a)^2 - (~b)^2)) - 1⨸((~b)^2*((~m) + 1)*((~a)^2 - (~b)^2))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~b)*((~m) + 1)*(((~b)*(~B) - (~a)*(~C))*((~b)*(~c) - (~a)*(~d)) - (~A)*(~b)*((~a)*(~c) - (~b)*(~d))) + ((~b)* (~B)*((~a)^2*(~d) + (~b)^2*(~d)*((~m) + 1) - (~a)*(~b)*(~c)*((~m) + 2)) + ((~b)*(~c) - (~a)*(~d))*((~A)*(~b)^2*((~m) + 2) + (~C)*((~a)^2 + (~b)^2*((~m) + 1))))* sin((~e) + (~f)*(~x)) - (~b)*(~C)*(~d)*((~m) + 1)*((~a)^2 - (~b)^2)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_4", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) ? +-((~b)*(~c) - (~a)*(~d))*((~A)*(~b)^2 + (~a)^2*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)^2* (~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸((~b)^2*((~m) + 1)*((~a)^2 - (~b)^2))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)* simp((~b)*((~m) + 1)*((~a)*(~C)*((~b)*(~c) - (~a)*(~d)) + (~A)*(~b)*((~a)*(~c) - (~b)*(~d))) - (((~b)*(~c) - (~a)*(~d))*((~A)*(~b)^2*((~m) + 2) + (~C)*((~a)^2 + (~b)^2*((~m) + 1))))* sin((~e) + (~f)*(~x)) + (~b)*(~C)*(~d)*((~m) + 1)*((~a)^2 - (~b)^2)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_5", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1)) ? +-(~C)*(~d)*cos((~e) + (~f)*(~x))* sin((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 3)) + 1⨸((~b)*((~m) + 3))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~a)*(~C)*(~d) + (~A)*(~b)*(~c)*((~m) + 3) + (~b)*((~B)*(~c)*((~m) + 3) + (~d)*((~C)*((~m) + 2) + (~A)*((~m) + 3)))* sin((~e) + (~f)*(~x)) - (2*(~a)*(~C)*(~d) - (~b)*((~c)*(~C) + (~B)*(~d))*((~m) + 3))* sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_6", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1)) ? +-(~C)*(~d)*cos((~e) + (~f)*(~x))* sin((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 3)) + 1⨸((~b)*((~m) + 3))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~a)*(~C)*(~d) + (~A)*(~b)*(~c)*((~m) + 3) + (~b)*(~d)*((~C)*((~m) + 2) + (~A)*((~m) + 3))* sin((~e) + (~f)*(~x)) - (2*(~a)*(~C)*(~d) - (~b)*(~c)*(~C)*((~m) + 3))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_7", +@rule ∫(((~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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ( + lt((~m), -1/2) || + eq((~m) + (~n) + 2, 0) && + !eq(2*(~m) + 1, 0) + ) ? +((~a)*(~A) - (~b)*(~B) + (~a)*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸(2*(~b)*(~c)*(~f)*(2*(~m) + 1)) - 1⨸(2*(~b)*(~c)*(~d)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*((~c)^2*((~m) + 1) + (~d)^2*(2*(~m) + (~n) + 2)) - (~B)*(~c)*(~d)*((~m) - (~n) - 1) - (~C)*((~c)^2*(~m) - (~d)^2*((~n) + 1)) + (~d)*(((~A)*(~c) + (~B)*(~d))*((~m) + (~n) + 2) - (~c)*(~C)*(3*(~m) - (~n)))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_8", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + ( + lt((~m), -1/2) || + eq((~m) + (~n) + 2, 0) && + !eq(2*(~m) + 1, 0) + ) ? +((~a)*(~A) + (~a)*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸(2*(~b)*(~c)*(~f)*(2*(~m) + 1)) - 1⨸(2*(~b)*(~c)*(~d)*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*((~c)^2*((~m) + 1) + (~d)^2*(2*(~m) + (~n) + 2)) - (~C)*((~c)^2*(~m) - (~d)^2*((~n) + 1)) + (~d)*((~A)*(~c)*((~m) + (~n) + 2) - (~c)*(~C)*(3*(~m) - (~n)))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_9", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^ (~!m)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/ sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) ? +-2*(~C)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*(2*(~m) + 3)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))) + ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)* simp((~A) + (~C) + (~B)*sin((~e) + (~f)*(~x)), (~x))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_2_10", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/ sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) ? +-2*(~C)*cos( (~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*(2*(~m) + 3)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))) + ((~A) + (~C))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_2_11", +@rule ∫(((~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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) && + !eq((~m) + (~n) + 2, 0) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 2)) + 1⨸((~b)*(~d)*((~m) + (~n) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*(~b)*(~d)*((~m) + (~n) + 2) + (~C)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + ((~b)*(~B)*(~d)*((~m) + (~n) + 2) - (~b)*(~c)*(~C)*(2*(~m) + 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_12", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~n), (~x)) && + eq((~b)*(~c) + (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) && + !eq((~m) + (~n) + 2, 0) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 2)) + 1⨸((~b)*(~d)*((~m) + (~n) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*(~b)*(~d)*((~m) + (~n) + 2) + (~C)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) - (~b)*(~c)*(~C)*(2*(~m) + 1)*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_13", +@rule ∫(((~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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1/2) ? +((~a)*(~A) - (~b)*(~B) + (~a)*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~b)*(~c) - (~a)*(~d))*(2*(~m) + 1)) + 1⨸((~b)*((~b)*(~c) - (~a)*(~d))*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*((~a)*(~c)*((~m) + 1) - (~b)*(~d)*(2*(~m) + (~n) + 2)) + (~B)*((~b)*(~c)*(~m) + (~a)*(~d)*((~n) + 1)) - (~C)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + ((~d)*((~a)*(~A) - (~b)*(~B))*((~m) + (~n) + 2) + (~C)*((~b)*(~c)*(2*(~m) + 1) - (~a)*(~d)*((~m) - (~n) - 1)))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_14", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1/2) ? +(~a)*((~A) + (~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~b)*(~c) - (~a)*(~d))*(2*(~m) + 1)) + 1⨸((~b)*((~b)*(~c) - (~a)*(~d))*(2*(~m) + 1))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*((~a)*(~c)*((~m) + 1) - (~b)*(~d)*(2*(~m) + (~n) + 2)) - (~C)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + ((~a)*(~A)*(~d)*((~m) + (~n) + 2) + (~C)*((~b)*(~c)*(2*(~m) + 1) - (~a)*(~d)*((~m) - (~n) - 1)))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_15", +@rule ∫(((~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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(lt((~m), -1/2)) && + ( + lt((~n), -1) || + eq((~m) + (~n) + 2, 0) + ) ? +-((~c)^2*(~C) - (~B)*(~c)*(~d) + (~A)*(~d)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~c)^2 - (~d)^2)) + 1⨸((~b)*(~d)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~A)*(~d)*((~a)*(~d)*(~m) + (~b)*(~c)*((~n) + 1)) + ((~c)*(~C) - (~B)*(~d))*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + (~b)*((~d)*((~B)*(~c) - (~A)*(~d))*((~m) + (~n) + 2) - (~C)*((~c)^2*((~m) + 1) + (~d)^2*((~n) + 1)))* sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_16", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(lt((~m), -1/2)) && + ( + lt((~n), -1) || + eq((~m) + (~n) + 2, 0) + ) ? +-((~c)^2*(~C) + (~A)*(~d)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~c)^2 - (~d)^2)) + 1⨸((~b)*(~d)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~A)*(~d)*((~a)*(~d)*(~m) + (~b)*(~c)*((~n) + 1)) + (~c)*(~C)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) - (~b)*((~A)*(~d)^2*((~m) + (~n) + 2) + (~C)*((~c)^2*((~m) + 1) + (~d)^2*((~n) + 1)))* sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_17", +@rule ∫(((~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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(lt((~m), -1/2)) && + !eq((~m) + (~n) + 2, 0) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 2)) + 1⨸((~b)*(~d)*((~m) + (~n) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*(~b)*(~d)*((~m) + (~n) + 2) + (~C)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + ((~C)*((~a)*(~d)*(~m) - (~b)*(~c)*((~m) + 1)) + (~b)*(~B)*(~d)*((~m) + (~n) + 2))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_18", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + !(lt((~m), -1/2)) && + !eq((~m) + (~n) + 2, 0) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 2)) + 1⨸((~b)*(~d)*((~m) + (~n) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~A)*(~b)*(~d)*((~m) + (~n) + 2) + (~C)*((~a)*(~c)*(~m) + (~b)*(~d)*((~n) + 1)) + (~C)*((~a)*(~d)*(~m) - (~b)*(~c)*((~m) + 1))*sin((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_1_4_2_19", +@rule ∫(((~!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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 0) && + lt((~n), -1) ? +-((~c)^2*(~C) - (~B)*(~c)*(~d) + (~A)*(~d)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~c)^2 - (~d)^2)) + 1⨸((~d)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~A)*(~d)*((~b)*(~d)*(~m) + (~a)*(~c)*((~n) + 1)) + ((~c)*(~C) - (~B)*(~d))*((~b)*(~c)*(~m) + (~a)*(~d)*((~n) + 1)) - ((~d)*((~A)*((~a)*(~d)*((~n) + 2) - (~b)*(~c)*((~n) + 1)) + (~B)*((~b)*(~d)*((~n) + 1) - (~a)*(~c)*((~n) + 2))) - (~C)*((~b)*(~c)*(~d)*((~n) + 1) - (~a)*((~c)^2 + (~d)^2*((~n) + 1))))*sin((~e) + (~f)*(~x)) + (~b)*((~d)*((~B)*(~c) - (~A)*(~d))*((~m) + (~n) + 2) - (~C)*((~c)^2*((~m) + 1) + (~d)^2*((~n) + 1)))* sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_20", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 0) && + lt((~n), -1) ? +-((~c)^2*(~C) + (~A)*(~d)^2)* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~n) + 1)*((~c)^2 - (~d)^2)) + 1⨸((~d)*((~n) + 1)*((~c)^2 - (~d)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)* simp((~A)*(~d)*((~b)*(~d)*(~m) + (~a)*(~c)*((~n) + 1)) + (~c)*(~C)*((~b)*(~c)*(~m) + (~a)*(~d)*((~n) + 1)) - ((~A)*(~d)*((~a)*(~d)*((~n) + 2) - (~b)*(~c)*((~n) + 1)) - (~C)*((~b)*(~c)*(~d)*((~n) + 1) - (~a)*((~c)^2 + (~d)^2*((~n) + 1))))*sin((~e) + (~f)*(~x)) - (~b)*((~A)*(~d)^2*((~m) + (~n) + 2) + (~C)*((~c)^2*((~m) + 1) + (~d)^2*((~n) + 1)))* sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_21", +@rule ∫(((~!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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 0) && + !( + igt((~n), 0) && + ( + !(ext_isinteger((~m))) || + eq((~a), 0) && + !eq((~c), 0) + ) + ) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 2)) + 1⨸((~d)*((~m) + (~n) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)*(~A)*(~d)*((~m) + (~n) + 2) + (~C)*((~b)*(~c)*(~m) + (~a)*(~d)*((~n) + 1)) + ((~d)*((~A)*(~b) + (~a)*(~B))*((~m) + (~n) + 2) - (~C)*((~a)*(~c) - (~b)*(~d)*((~m) + (~n) + 1)))* sin((~e) + (~f)*(~x)) + ((~C)*((~a)*(~d)*(~m) - (~b)*(~c)*((~m) + 1)) + (~b)*(~B)*(~d)*((~m) + (~n) + 2))* sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_22", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + gt((~m), 0) && + !( + igt((~n), 0) && + ( + !(ext_isinteger((~m))) || + eq((~a), 0) && + !eq((~c), 0) + ) + ) ? +-(~C)*cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^ (~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~d)*(~f)*((~m) + (~n) + 2)) + 1⨸((~d)*((~m) + (~n) + 2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) - 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)*(~A)*(~d)*((~m) + (~n) + 2) + (~C)*((~b)*(~c)*(~m) + (~a)*(~d)*((~n) + 1)) + ((~A)*(~b)*(~d)*((~m) + (~n) + 2) - (~C)*((~a)*(~c) - (~b)*(~d)*((~m) + (~n) + 1)))*sin((~e) + (~f)*(~x)) + (~C)*((~a)*(~d)*(~m) - (~b)*(~c)*((~m) + 1))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_23", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~A), (~B), (~C), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~C)⨸((~b)*(~d))*∫(sqrt((~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) + 1⨸(~b)* ∫(((~A)*(~b) + ((~b)*(~B) - (~a)*(~C))*sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_4_2_24", +@rule ∫(((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~A), (~C), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~C)⨸((~b)*(~d))*∫(sqrt((~d)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) + 1⨸(~b)* ∫(((~A)*(~b) - (~a)*(~C)*sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_4_2_25", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~C)⨸(~b)^2*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + 1⨸(~b)^2* ∫(((~A)*(~b)^2 - (~a)^2*(~C) + (~b)*((~b)*(~B) - 2*(~a)*(~C))*sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_4_2_26", +@rule ∫(((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~C)⨸(~b)^2*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))⨸sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) + 1⨸(~b)^2* ∫(((~A)*(~b)^2 - (~a)^2*(~C) - 2*(~a)*(~b)*(~C)*sin((~e) + (~f)*(~x)))⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_4_2_27", +@rule ∫(((~!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))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + ( + eq((~a), 0) && + ext_isinteger((~m)) && + !(ext_isinteger((~n))) || + !( + ext_isinteger(2*(~n)) && + lt((~n), -1) && + ( + ext_isinteger((~n)) && + !(ext_isinteger((~m))) || + eq((~a), 0) + ) + ) + ) ? +-((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)*(~A) - (~b)*(~B) + (~a)*(~C)) + (~d)*((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))*((~m) + (~n) + 2) - ((~c)*((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C)) + ((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~A)*(~b) - (~a)*(~B) + (~b)*(~C)))*sin((~e) + (~f)*(~x)) - (~d)*((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))*((~m) + (~n) + 3)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_28", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~n), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) && + lt((~m), -1) && + ( + eq((~a), 0) && + ext_isinteger((~m)) && + !(ext_isinteger((~n))) || + !( + ext_isinteger(2*(~n)) && + lt((~n), -1) && + ( + ext_isinteger((~n)) && + !(ext_isinteger((~m))) || + eq((~a), 0) + ) + ) + ) ? +-((~A)*(~b)^2 + (~a)^2*(~C))* cos((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^((~n) + 1)⨸((~f)*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x)))^((~m) + 1)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^(~n)* simp((~a)*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~A) + (~C)) + (~d)*((~A)*(~b)^2 + (~a)^2*(~C))*((~m) + (~n) + 2) - ((~c)*((~A)*(~b)^2 + (~a)^2*(~C)) + (~b)*((~m) + 1)*((~b)*(~c) - (~a)*(~d))*((~A) + (~C)))* sin((~e) + (~f)*(~x)) - (~d)*((~A)*(~b)^2 + (~a)^2*(~C))*((~m) + (~n) + 3)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_29", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~C)*(~x)⨸((~b)*(~d)) + ((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))⨸((~b)*((~b)*(~c) - (~a)*(~d)))* ∫(1⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - ((~c)^2*(~C) - (~B)*(~c)*(~d) + (~A)*(~d)^2)⨸((~d)*((~b)*(~c) - (~a)*(~d)))* ∫(1⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_2_30", +@rule ∫(((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(((~a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~C)*(~x)⨸((~b)*(~d)) + ((~A)*(~b)^2 + (~a)^2*(~C))⨸((~b)*((~b)*(~c) - (~a)*(~d)))* ∫(1⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - ((~c)^2*(~C) + (~A)*(~d)^2)⨸((~d)*((~b)*(~c) - (~a)*(~d)))*∫(1⨸((~c) + (~d)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_2_31", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(sqrt( (~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~C)⨸((~b)*(~d))*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - 1⨸((~b)*(~d))* ∫(simp((~a)*(~c)*(~C) - (~A)*(~b)*(~d) + ((~b)*(~c)*(~C) - (~b)*(~B)*(~d) + (~a)*(~C)*(~d))*sin((~e) + (~f)*(~x)), (~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_4_2_32", +@rule ∫(((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(sqrt( (~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +(~C)⨸((~b)*(~d))*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) - 1⨸((~b)*(~d))* ∫(simp((~a)*(~c)*(~C) - (~A)*(~b)*(~d) + ((~b)*(~c)*(~C) + (~a)*(~C)*(~d))*sin((~e) + (~f)*(~x)), (~x))⨸(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))*((~c) + (~d)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_1_4_2_33", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(sqrt((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +-(~C)*cos((~e) + (~f)*(~x))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸((~d)*(~f)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) + 1⨸(2*(~d))* ∫(1⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))))* simp(2*(~a)*(~A)*(~d) - (~C)*((~b)*(~c) - (~a)*(~d)) - 2*((~a)*(~c)*(~C) - (~d)*((~A)*(~b) + (~a)*(~B)))* sin((~e) + (~f)*(~x)) + (2*(~b)*(~B)*(~d) - (~C)*((~b)*(~c) + (~a)*(~d)))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_34", +@rule ∫(((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/(sqrt((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))* sqrt((~c) + (~!d)*sin((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~x)) && + !eq((~b)*(~c) - (~a)*(~d), 0) && + !eq((~a)^2 - (~b)^2, 0) && + !eq((~c)^2 - (~d)^2, 0) ? +-(~C)*cos((~e) + (~f)*(~x))* sqrt((~c) + (~d)*sin((~e) + (~f)*(~x)))⨸((~d)*(~f)*sqrt((~a) + (~b)*sin((~e) + (~f)*(~x)))) + 1⨸(2*(~d))* ∫(1⨸(((~a) + (~b)*sin((~e) + (~f)*(~x)))^(3⨸2)*sqrt((~c) + (~d)*sin((~e) + (~f)*(~x))))* simp(2*(~a)*(~A)*(~d) - (~C)*((~b)*(~c) - (~a)*(~d)) - 2*((~a)*(~c)*(~C) - (~A)*(~b)*(~d))*sin((~e) + (~f)*(~x)) - (~C)*((~b)*(~c) + (~a)*(~d))*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_4_2_35", +@rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~A), (~B), (~C), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +((~b)*(~B) - (~a)*(~C))⨸(~b)^2*∫(((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) + (~C)⨸((~b)*(~d))*∫(((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) + ((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C))⨸(~b)^2* ∫(((~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_1_4_2_36", +@rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~A), (~C), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-(~a)*(~C)⨸(~b)^2*∫(((~d)*sin((~e) + (~f)*(~x)))^(~n), (~x)) + (~C)⨸((~b)*(~d))*∫(((~d)*sin((~e) + (~f)*(~x)))^((~n) + 1), (~x)) + ((~A)*(~b)^2 + (~a)^2*(~C))⨸(~b)^2* ∫(((~d)*sin((~e) + (~f)*(~x)))^(~n)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +# ("4_1_4_2_37", +# @rule ∫(((~!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))^2),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# !eq((~a)^2 - (~b)^2, 0) && +# !eq((~c)^2 - (~d)^2, 0) ? +# Unintegrable[((~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))^2), (~x)] : nothing) + +# ("4_1_4_2_38", +# @rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x)))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~n), (~x)) && +# !eq((~b)*(~c) - (~a)*(~d), 0) && +# !eq((~a)^2 - (~b)^2, 0) && +# !eq((~c)^2 - (~d)^2, 0) ? +# Unintegrable[((~a) + (~b)*sin((~e) + (~f)*(~x)))^(~m)*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~A) + (~C)*sin((~e) + (~f)*(~x))^2), (~x)] : nothing) + +("4_1_4_2_39", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x))^(~p))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x)) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*sin((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*sin((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~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))^2), (~x)) : nothing) + +("4_1_4_2_40", +@rule ∫(((~!b)*cos((~!e) + (~!f)*(~x))^(~p))^(~m)*((~!c) + (~!d)*cos((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!B)*cos((~!e) + (~!f)*(~x)) + (~!C)*cos((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*cos((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*cos((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~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))^2), (~x)) : nothing) + +("4_1_4_2_41", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x))^(~p))^(~m)*((~!c) + (~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*sin((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*sin((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~b)*sin((~e) + (~f)*(~x)))^((~m)*(~p))*((~c) + (~d)*sin((~e) + (~f)*(~x)))^ (~n)*((~A) + (~C)*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_4_2_42", +@rule ∫(((~!b)*cos((~!e) + (~!f)*(~x))^(~p))^(~m)*((~!c) + (~!d)*cos((~!e) + (~!f)*(~x)))^ (~!n)*((~!A) + (~!C)*cos((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~A), (~C), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~b)*cos((~e) + (~f)*(~x))^(~p))^(~m)⨸((~b)*cos((~e) + (~f)*(~x)))^((~m)*(~p))* ∫(((~b)*cos((~e) + (~f)*(~x)))^((~m)*(~p))*((~c) + (~d)*cos((~e) + (~f)*(~x)))^ (~n)*((~A) + (~C)*cos((~e) + (~f)*(~x))^2), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.5 trig^m (a cos+b sin)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.5 trig^m (a cos+b sin)^n.jl new file mode 100644 index 0000000..5248465 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.5 trig^m (a cos+b sin)^n.jl @@ -0,0 +1,333 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.5 trig^m (a cos+b sin)^n *) +("4_1_5_1", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +(~a)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n)⨸((~b)*(~d)*(~n)) : nothing) + +("4_1_5_2", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + igt(((~n) - 1)/2, 0) ? +-1⨸(~d)*int_and_subst(((~a)^2 + (~b)^2 - (~x)^2)^(((~n) - 1)⨸2), (~x), (~x), (~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)), "4_1_5_2") : nothing) + +("4_1_5_3", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + !(ext_isinteger(((~n) - 1)/2)) && + gt((~n), 1) ? +-((~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)))*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)* (~n)) + ((~n) - 1)*((~a)^2 + (~b)^2)⨸(~n)* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_5_4", +@rule ∫(1/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +-1⨸(~d)*int_and_subst(1⨸((~a)^2 + (~b)^2 - (~x)^2), (~x), (~x), (~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)), "4_1_5_4") : nothing) + +("4_1_5_5", +@rule ∫(1/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +sin((~c) + (~d)*(~x))⨸((~a)*(~d)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))) : nothing) + +("4_1_5_6", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) && + !eq((~n), -2) ? +((~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)))*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸((~d)*((~n) + 1)*((~a)^2 + (~b)^2)) + ((~n) + 2)⨸(((~n) + 1)*((~a)^2 + (~b)^2))* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_5_7", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !( + ge((~n), 1) || + le((~n), -1) + ) && + gt((~a)^2 + (~b)^2, 0) ? +((~a)^2 + (~b)^2)^((~n)⨸2)*∫((cos((~c) + (~d)*(~x) - atan((~a), (~b))))^(~n), (~x)) : nothing) + +("4_1_5_8", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !( + ge((~n), 1) || + le((~n), -1) + ) && + !( + gt((~a)^2 + (~b)^2, 0) || + eq((~a)^2 + (~b)^2, 0) + ) ? +((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^ (~n)⨸(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))⨸sqrt((~a)^2 + (~b)^2))^(~n)* ∫(cos((~c) + (~d)*(~x) - atan((~a), (~b)))^(~n), (~x)) : nothing) + +("4_1_5_9", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~m) + (~n), 0) && + eq((~a)^2 + (~b)^2, 0) && + gt((~n), 1) ? +-(~a)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)* sin((~c) + (~d)*(~x))^((~n) - 1)) + 2*(~b)* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸ sin((~c) + (~d)*(~x))^((~n) - 1), (~x)) : nothing) + +("4_1_5_10", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~m) + (~n), 0) && + eq((~a)^2 + (~b)^2, 0) && + gt((~n), 1) ? +(~b)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)* cos((~c) + (~d)*(~x))^((~n) - 1)) + 2*(~a)* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸ cos((~c) + (~d)*(~x))^((~n) - 1), (~x)) : nothing) + +("4_1_5_11", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~m) + (~n), 0) && + eq((~a)^2 + (~b)^2, 0) && + lt((~n), 0) ? +(~a)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n)⨸(2*(~b)*(~d)*(~n)*sin((~c) + (~d)*(~x))^(~n)) + 1⨸(2*(~b))* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸ sin((~c) + (~d)*(~x))^((~n) + 1), (~x)) : nothing) + +("4_1_5_12", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~m) + (~n), 0) && + eq((~a)^2 + (~b)^2, 0) && + lt((~n), 0) ? +-(~b)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n)⨸(2*(~a)*(~d)*(~n)*cos((~c) + (~d)*(~x))^(~n)) + 1⨸(2*(~a))* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸ cos((~c) + (~d)*(~x))^((~n) + 1), (~x)) : nothing) + +("4_1_5_13", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~m) + (~n), 0) && + eq((~a)^2 + (~b)^2, 0) && + !(ext_isinteger((~n))) ? +(~a)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n)⨸(2*(~b)*(~d)*(~n)*sin((~c) + (~d)*(~x))^(~n))* hypergeometric2f1(1, (~n), (~n) + 1, ((~b) + (~a)*cot((~c) + (~d)*(~x)))⨸(2*(~b))) : nothing) + +("4_1_5_14", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~m) + (~n), 0) && + eq((~a)^2 + (~b)^2, 0) && + !(ext_isinteger((~n))) ? +-(~b)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n)⨸(2*(~a)*(~d)*(~n)*cos((~c) + (~d)*(~x))^(~n))* hypergeometric2f1(1, (~n), (~n) + 1, ((~a) + (~b)*tan((~c) + (~d)*(~x)))⨸(2*(~a))) : nothing) + +("4_1_5_15", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~m) + (~n), 0) && + ext_isinteger((~n)) && + !eq((~a)^2 + (~b)^2, 0) ? +∫(((~b) + (~a)*cot((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + +("4_1_5_16", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~m) + (~n), 0) && + ext_isinteger((~n)) && + !eq((~a)^2 + (~b)^2, 0) ? +∫(((~a) + (~b)*tan((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + +("4_1_5_17", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ext_isinteger((~n)) && + ext_isinteger(((~m) + (~n))/2) && + !eq((~n), -1) && + !( + gt((~n), 0) && + gt((~m), 1) + ) ? +1⨸(~d)*int_and_subst((~x)^(~m)*((~a) + (~b)*(~x))^(~n)⨸(1 + (~x)^2)^(((~m) + (~n) + 2)⨸2), (~x), (~x), tan((~c) + (~d)*(~x)), "4_1_5_17") : nothing) + +("4_1_5_18", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ext_isinteger((~n)) && + ext_isinteger(((~m) + (~n))/2) && + !eq((~n), -1) && + !( + gt((~n), 0) && + gt((~m), 1) + ) ? +-1⨸(~d)*int_and_subst((~x)^(~m)*((~b) + (~a)*(~x))^(~n)⨸(1 + (~x)^2)^(((~m) + (~n) + 2)⨸2), (~x), (~x), cot((~c) + (~d)*(~x)), "4_1_5_18") : nothing) + +("4_1_5_19", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ext_isinteger((~m)) && + igt((~n), 0) ? +∫(ext_expand(sin((~c) + (~d)*(~x))^(~m)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_1_5_20", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ext_isinteger((~m)) && + igt((~n), 0) ? +∫(ext_expand(cos((~c) + (~d)*(~x))^(~m)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_1_5_21", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + ilt((~n), 0) ? +(~a)^(~n)*(~b)^(~n)* ∫(sin((~c) + (~d)*(~x))^(~m)*((~b)*cos((~c) + (~d)*(~x)) + (~a)*sin((~c) + (~d)*(~x)))^(-(~n)), (~x)) : nothing) + +("4_1_5_22", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~!m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + ilt((~n), 0) ? +(~a)^(~n)*(~b)^(~n)* ∫(cos((~c) + (~d)*(~x))^(~m)*((~b)*cos((~c) + (~d)*(~x)) + (~a)*sin((~c) + (~d)*(~x)))^(-(~n)), (~x)) : nothing) + +("4_1_5_23", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n)/ sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) ? +(~a)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)) + (~b)*∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1), (~x)) + (~a)^2* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2)⨸sin((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_5_24", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n)/ cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) ? +-(~b)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)) + (~a)*∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1), (~x)) + (~b)^2* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2)⨸cos((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_5_25", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + gt((~n), 1) && + lt((~m), -1) ? +-((~a)^2 + (~b)^2)* ∫(sin((~c) + (~d)*(~x))^((~m) + 2)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2), (~x)) + 2*(~b)* ∫(sin((~c) + (~d)*(~x))^((~m) + 1)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1), (~x)) + (~a)^2* ∫(sin((~c) + (~d)*(~x))^(~m)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_5_26", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + gt((~n), 1) && + lt((~m), -1) ? +-((~a)^2 + (~b)^2)* ∫(cos((~c) + (~d)*(~x))^((~m) + 2)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2), (~x)) + 2*(~a)* ∫(cos((~c) + (~d)*(~x))^((~m) + 1)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 1), (~x)) + (~b)^2* ∫(cos((~c) + (~d)*(~x))^(~m)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_1_5_27", +@rule ∫(sin((~!c) + (~!d)*(~x))/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +(~b)*(~x)⨸((~a)^2 + (~b)^2) - (~a)⨸((~a)^2 + (~b)^2)* ∫(((~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)))⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_28", +@rule ∫(cos((~!c) + (~!d)*(~x))/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +(~a)*(~x)⨸((~a)^2 + (~b)^2) + (~b)⨸((~a)^2 + (~b)^2)* ∫(((~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)))⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_29", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~m)/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + gt((~m), 1) ? +-(~a)*sin((~c) + (~d)*(~x))^((~m) - 1)⨸((~d)*((~a)^2 + (~b)^2)*((~m) - 1)) + (~b)⨸((~a)^2 + (~b)^2)*∫(sin((~c) + (~d)*(~x))^((~m) - 1), (~x)) + (~a)^2⨸((~a)^2 + (~b)^2)* ∫(sin((~c) + (~d)*(~x))^((~m) - 2)⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_30", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~m)/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + gt((~m), 1) ? +(~b)*cos((~c) + (~d)*(~x))^((~m) - 1)⨸((~d)*((~a)^2 + (~b)^2)*((~m) - 1)) + (~a)⨸((~a)^2 + (~b)^2)*∫(cos((~c) + (~d)*(~x))^((~m) - 1), (~x)) + (~b)^2⨸((~a)^2 + (~b)^2)* ∫(cos((~c) + (~d)*(~x))^((~m) - 2)⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_31", +@rule ∫(1/(sin( (~!c) + (~!d)*(~x))*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +1⨸(~a)*∫(cot((~c) + (~d)*(~x)), (~x)) - 1⨸(~a)* ∫(((~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)))⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_32", +@rule ∫(1/(cos( (~!c) + (~!d)*(~x))*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +1⨸(~b)*∫(tan((~c) + (~d)*(~x)), (~x)) + 1⨸(~b)* ∫(((~b)*cos((~c) + (~d)*(~x)) - (~a)*sin((~c) + (~d)*(~x)))⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_33", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~m)/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~m), -1) ? +sin((~c) + (~d)*(~x))^((~m) + 1)⨸((~a)*(~d)*((~m) + 1)) - (~b)⨸(~a)^2*∫(sin((~c) + (~d)*(~x))^((~m) + 1), (~x)) + ((~a)^2 + (~b)^2)⨸(~a)^2* ∫(sin((~c) + (~d)*(~x))^((~m) + 2)⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_34", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~m)/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~m), -1) ? +-cos((~c) + (~d)*(~x))^((~m) + 1)⨸((~b)*(~d)*((~m) + 1)) - (~a)⨸(~b)^2*∫(cos((~c) + (~d)*(~x))^((~m) + 1), (~x)) + ((~a)^2 + (~b)^2)⨸(~b)^2* ∫(cos((~c) + (~d)*(~x))^((~m) + 2)⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_35", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n)/ sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) ? +-((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸((~a)*(~d)*((~n) + 1)) - (~b)⨸(~a)^2*∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1), (~x)) + 1⨸(~a)^2* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 2)⨸sin((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_5_36", +@rule ∫(((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n)/ cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) ? +((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1)⨸((~b)*(~d)*((~n) + 1)) - (~a)⨸(~b)^2*∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1), (~x)) + 1⨸(~b)^2* ∫(((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 2)⨸cos((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_1_5_37", +@rule ∫(sin((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) && + lt((~m), -1) ? +((~a)^2 + (~b)^2)⨸(~a)^2* ∫(sin((~c) + (~d)*(~x))^((~m) + 2)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n), (~x)) - 2*(~b)⨸(~a)^2* ∫(sin((~c) + (~d)*(~x))^((~m) + 1)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1), (~x)) + 1⨸(~a)^2* ∫(sin((~c) + (~d)*(~x))^(~m)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_5_38", +@rule ∫(cos((~!c) + (~!d)*(~x))^ (~m)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) && + lt((~m), -1) ? +((~a)^2 + (~b)^2)⨸(~b)^2* ∫(cos((~c) + (~d)*(~x))^((~m) + 2)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~n), (~x)) - 2*(~a)⨸(~b)^2* ∫(cos((~c) + (~d)*(~x))^((~m) + 1)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 1), (~x)) + 1⨸(~b)^2* ∫(cos((~c) + (~d)*(~x))^(~m)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_1_5_39", +@rule ∫(cos((~!c) + (~!d)*(~x))^(~!m)* sin((~!c) + (~!d)*(~x))^ (~!n)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand( cos((~c) + (~d)*(~x))^(~m)*sin((~c) + (~d)*(~x))^(~n)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~p), (~x)), (~x)) : nothing) + +("4_1_5_40", +@rule ∫(cos((~!c) + (~!d)*(~x))^(~!m)* sin((~!c) + (~!d)*(~x))^ (~!n)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + ilt((~p), 0) ? +(~a)^(~p)*(~b)^(~p)* ∫(cos((~c) + (~d)*(~x))^(~m)* sin((~c) + (~d)*(~x))^(~n)*((~b)*cos((~c) + (~d)*(~x)) + (~a)*sin((~c) + (~d)*(~x)))^(-(~p)), (~x)) : nothing) + +("4_1_5_41", +@rule ∫(cos((~!c) + (~!d)*(~x))^(~!m)* sin((~!c) + (~!d)*(~x))^ (~!n)/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + igt((~m), 0) && + igt((~n), 0) ? +(~b)⨸((~a)^2 + (~b)^2)*∫(cos((~c) + (~d)*(~x))^(~m)*sin((~c) + (~d)*(~x))^((~n) - 1), (~x)) + (~a)⨸((~a)^2 + (~b)^2)*∫(cos((~c) + (~d)*(~x))^((~m) - 1)*sin((~c) + (~d)*(~x))^(~n), (~x)) - (~a)*(~b)⨸((~a)^2 + (~b)^2)* ∫(cos((~c) + (~d)*(~x))^((~m) - 1)* sin((~c) + (~d)*(~x))^((~n) - 1)⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_1_5_42", +@rule ∫(cos((~!c) + (~!d)*(~x))^(~!m)* sin((~!c) + (~!d)*(~x))^ (~!n)/((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger((~m), (~n)) ? +∫(ext_expand( cos((~c) + (~d)*(~x))^(~m)*sin((~c) + (~d)*(~x))^(~n)⨸((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x))), (~x)), (~x)) : nothing) + +("4_1_5_43", +@rule ∫(cos((~!c) + (~!d)*(~x))^(~!m)* sin((~!c) + (~!d)*(~x))^ (~!n)*((~!a)*cos((~!c) + (~!d)*(~x)) + (~!b)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + igt((~m), 0) && + igt((~n), 0) && + ilt((~p), 0) ? +(~b)⨸((~a)^2 + (~b)^2)* ∫(cos((~c) + (~d)*(~x))^(~m)* sin((~c) + (~d)*(~x))^((~n) - 1)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~p) + 1), (~x)) + (~a)⨸((~a)^2 + (~b)^2)* ∫(cos((~c) + (~d)*(~x))^((~m) - 1)* sin((~c) + (~d)*(~x))^(~n)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^((~p) + 1), (~x)) - (~a)*(~b)⨸((~a)^2 + (~b)^2)* ∫(cos((~c) + (~d)*(~x))^((~m) - 1)* sin((~c) + (~d)*(~x))^((~n) - 1)*((~a)*cos((~c) + (~d)*(~x)) + (~b)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.6 (a+b cos+c sin)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.6 (a+b cos+c sin)^n.jl new file mode 100644 index 0000000..8a88960 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.6 (a+b cos+c sin)^n.jl @@ -0,0 +1,399 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.6 (a+b cos+c sin)^n *) +("4_1_6_1", +@rule ∫(sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +-2*((~c)*cos((~d) + (~e)*(~x)) - (~b)*sin((~d) + (~e)*(~x)))⨸((~e)* sqrt((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) : nothing) + +("4_1_6_2", +@rule ∫(((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + gt((~n), 0) ? +-((~c)*cos((~d) + (~e)*(~x)) - (~b)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) - 1)⨸((~e)*(~n)) + (~a)*(2*(~n) - 1)⨸(~n)* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_1_6_3", +@rule ∫(1/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +-((~c) - (~a)*sin((~d) + (~e)*(~x)))⨸((~c)*(~e)*((~c)*cos((~d) + (~e)*(~x)) - (~b)*sin((~d) + (~e)*(~x)))) : nothing) + +("4_1_6_4", +@rule ∫(1/sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +∫(1⨸sqrt((~a) + sqrt((~b)^2 + (~c)^2)*cos((~d) + (~e)*(~x) - atan((~b), (~c)))), (~x)) : nothing) + +("4_1_6_5", +@rule ∫(((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + lt((~n), -1) ? +((~c)*cos((~d) + (~e)*(~x)) - (~b)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*(2*(~n) + 1)) + ((~n) + 1)⨸((~a)*(2*(~n) + 1))* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_6_6", +@rule ∫(sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~b)^2 + (~c)^2, 0) ? +(~b)⨸((~c)*(~e))* int_and_subst(sqrt((~a) + (~x))⨸(~x), (~x), (~x), (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)), "4_1_6_6") : nothing) + +("4_1_6_7", +@rule ∫(sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + gt((~a) + sqrt((~b)^2 + (~c)^2), 0) ? +∫(sqrt((~a) + sqrt((~b)^2 + (~c)^2)*cos((~d) + (~e)*(~x) - atan((~b), (~c)))), (~x)) : nothing) + +("4_1_6_8", +@rule ∫(sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~b)^2 + (~c)^2, 0) && + !(gt((~a) + sqrt((~b)^2 + (~c)^2), 0)) ? +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)^2 + (~c)^2)))* ∫( sqrt((~a)⨸((~a) + sqrt((~b)^2 + (~c)^2)) + sqrt((~b)^2 + (~c)^2)⨸((~a) + sqrt((~b)^2 + (~c)^2))* cos((~d) + (~e)*(~x) - atan((~b), (~c)))), (~x)) : nothing) + +("4_1_6_9", +@rule ∫(((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + gt((~n), 1) ? +-((~c)*cos((~d) + (~e)*(~x)) - (~b)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) - 1)⨸((~e)*(~n)) + 1⨸(~n)* ∫(simp( (~n)*(~a)^2 + ((~n) - 1)*((~b)^2 + (~c)^2) + (~a)*(~b)*(2*(~n) - 1)*cos((~d) + (~e)*(~x)) + (~a)*(~c)*(2*(~n) - 1)*sin((~d) + (~e)*(~x)), (~x))* ((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) - 2), (~x)) : nothing) + +#(* Int[1/(a_+b_.*cos[d_.+e_.*x_]+c_.*sin[d_.+e_.*x_]),x_Symbol] := x/Sqrt[a^2-b^2-c^2] + 2/(e*Sqrt[a^2-b^2-c^2])*ArcTan[(c*Cos[d+e*x]-b*Sin[d+e*x])/(a+Sqrt[ a^2-b^2-c^2]+b*Cos[d+e*x]+c*Sin[d+e*x])] /; FreeQ[{a,b,c,d,e},x] && GtQ[a^2-b^2-c^2,0] *) +#(* Int[1/(a_+b_.*cos[d_.+e_.*x_]+c_.*sin[d_.+e_.*x_]),x_Symbol] := Log[RemoveContent[b^2+c^2+(a*b-c*Rt[-a^2+b^2+c^2,2])*Cos[d+e*x]+(a* c+b*Sqrt[-a^2+b^2+c^2])*Sin[d+e*x],x]]/ (2*e*Rt[-a^2+b^2+c^2,2]) - Log[RemoveContent[b^2+c^2+(a*b+c*Rt[-a^2+b^2+c^2,2])*Cos[d+e*x]+(a* c-b*Sqrt[-a^2+b^2+c^2])*Sin[d+e*x],x]]/ (2*e*Rt[-a^2+b^2+c^2,2]) /; FreeQ[{a,b,c,d,e},x] && LtQ[a^2-b^2-c^2,0] *) +("4_1_6_10", +@rule ∫(1/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a) + (~b), 0) ? +-free_factors(cot(((~d) + (~e)*(~x))⨸2), (~x))⨸(~e)*int_and_subst(1⨸((~a) + (~c)*free_factors(cot(((~d) + (~e)*(~x))⨸2), (~x))*(~x)), (~x), (~x), cot(((~d) + (~e)*(~x))⨸2)⨸free_factors(cot(((~d) + (~e)*(~x))⨸2), (~x)), "4_1_6_10") : nothing) + +("4_1_6_11", +@rule ∫(1/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a) + (~c), 0) ? +free_factors(tan(((~d) + (~e)*(~x))⨸2 + π⨸4), (~x))⨸(~e)*int_and_subst(1⨸((~a) + (~b)*free_factors(tan(((~d) + (~e)*(~x))⨸2 + π⨸4), (~x))*(~x)), (~x), (~x), tan(((~d) + (~e)*(~x))⨸2 + π⨸4)⨸free_factors(tan(((~d) + (~e)*(~x))⨸2 + π⨸4), (~x)), "4_1_6_11") : nothing) + +("4_1_6_12", +@rule ∫(1/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~a) - (~c), 0) && + !eq((~a) - (~b), 0) ? +-free_factors(cot(((~d) + (~e)*(~x))⨸2 + π⨸4), (~x))⨸(~e)* int_and_subst(1⨸((~a) + (~b)*free_factors(cot(((~d) + (~e)*(~x))⨸2 + π⨸4), (~x))*(~x)), (~x), (~x), cot(((~d) + (~e)*(~x))⨸2 + π⨸4)⨸free_factors(cot(((~d) + (~e)*(~x))⨸2 + π⨸4), (~x)), "4_1_6_12") : nothing) + +("4_1_6_13", +@rule ∫(1/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +2*free_factors(tan(((~d) + (~e)*(~x))⨸2), (~x))⨸(~e)* int_and_subst(1⨸((~a) + (~b) + 2*(~c)*free_factors(tan(((~d) + (~e)*(~x))⨸2), (~x))*(~x) + ((~a) - (~b))*free_factors(tan(((~d) + (~e)*(~x))⨸2), (~x))^2*(~x)^2), (~x), (~x), tan(((~d) + (~e)*(~x))⨸2)⨸free_factors(tan(((~d) + (~e)*(~x))⨸2), (~x)), "4_1_6_13") : nothing) + +("4_1_6_14", +@rule ∫(1/sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~b)^2 + (~c)^2, 0) ? +(~b)⨸((~c)*(~e))* int_and_subst(1⨸((~x)*sqrt((~a) + (~x))), (~x), (~x), (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)), "4_1_6_14") : nothing) + +("4_1_6_15", +@rule ∫(1/sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + gt((~a) + sqrt((~b)^2 + (~c)^2), 0) ? +∫(1⨸sqrt((~a) + sqrt((~b)^2 + (~c)^2)*cos((~d) + (~e)*(~x) - atan((~b), (~c)))), (~x)) : nothing) + +("4_1_6_16", +@rule ∫(1/sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~b)^2 + (~c)^2, 0) && + !(gt((~a) + sqrt((~b)^2 + (~c)^2), 0)) ? +sqrt(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸((~a) + sqrt((~b)^2 + (~c)^2)))⨸ sqrt((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))* ∫( 1⨸sqrt((~a)⨸((~a) + sqrt((~b)^2 + (~c)^2)) + sqrt((~b)^2 + (~c)^2)⨸((~a) + sqrt((~b)^2 + (~c)^2))* cos((~d) + (~e)*(~x) - atan((~b), (~c)))), (~x)) : nothing) + +("4_1_6_17", +@rule ∫(1/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +2*((~c)*cos((~d) + (~e)*(~x)) - (~b)*sin((~d) + (~e)*(~x)))⨸((~e)*((~a)^2 - (~b)^2 - (~c)^2)* sqrt((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) + 1⨸((~a)^2 - (~b)^2 - (~c)^2)* ∫(sqrt((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_18", +@rule ∫(((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + lt((~n), -1) && + !eq((~n), -3/2) ? +(-(~c)*cos((~d) + (~e)*(~x)) + (~b)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)⨸((~e)*((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2)) + 1⨸(((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2))* ∫(((~a)*((~n) + 1) - (~b)*((~n) + 2)*cos((~d) + (~e)*(~x)) - (~c)*((~n) + 2)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_1_6_19", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + eq((~b)^2 + (~c)^2, 0) ? +(2*(~a)*(~A) - (~b)*(~B) - (~c)*(~C))* (~x)⨸(2*(~a)^2) - ((~b)*(~B) + (~c)*(~C))*((~b)*cos((~d) + (~e)*(~x)) - (~c)*sin((~d) + (~e)*(~x)))⨸(2*(~a)*(~b)*(~c)*(~e)) + ((~a)^2*((~b)*(~B) - (~c)*(~C)) - 2*(~a)*(~A)*(~b)^2 + (~b)^2*((~b)*(~B) + (~c)*(~C)))* log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸(2*(~a)^2* (~b)*(~c)*(~e)) : nothing) + +("4_1_6_20", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~x)) && + eq((~b)^2 + (~c)^2, 0) ? +(2*(~a)*(~A) - (~c)*(~C))*(~x)⨸(2*(~a)^2) - (~C)*cos((~d) + (~e)*(~x))⨸(2*(~a)*(~e)) + (~c)*(~C)*sin((~d) + (~e)*(~x))⨸(2*(~a)*(~b)*(~e)) + (-(~a)^2*(~C) + 2*(~a)*(~c)*(~A) + (~b)^2*(~C))* log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸(2*(~a)^2* (~b)*(~e)) : nothing) + +("4_1_6_21", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))/((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + eq((~b)^2 + (~c)^2, 0) ? +(2*(~a)*(~A) - (~b)*(~B))*(~x)⨸(2*(~a)^2) - (~b)*(~B)*cos((~d) + (~e)*(~x))⨸(2*(~a)*(~c)*(~e)) + (~B)*sin((~d) + (~e)*(~x))⨸(2*(~a)*(~e)) + ((~a)^2*(~B) - 2*(~a)*(~b)*(~A) + (~b)^2*(~B))* log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸(2*(~a)^2* (~c)*(~e)) : nothing) + +("4_1_6_22", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + eq((~A)*((~b)^2 + (~c)^2) - (~a)*((~b)*(~B) + (~c)*(~C)), 0) ? +((~b)*(~B) + (~c)*(~C))*(~x)⨸((~b)^2 + (~c)^2) + ((~c)*(~B) - (~b)*(~C))* log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸((~e)*((~b)^2 + (~c)^2)) : nothing) + +("4_1_6_23", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + eq((~A)*((~b)^2 + (~c)^2) - (~a)*(~c)*(~C), 0) ? +(~c)*(~C)*(~x)⨸((~b)^2 + (~c)^2) - (~b)*(~C)*log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸((~e)*((~b)^2 + (~c)^2)) : nothing) + +("4_1_6_24", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + eq((~A)*((~b)^2 + (~c)^2) - (~a)*(~b)*(~B), 0) ? +(~b)*(~B)*(~x)⨸((~b)^2 + (~c)^2) + (~c)*(~B)*log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸((~e)*((~b)^2 + (~c)^2)) : nothing) + +("4_1_6_25", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + !eq((~A)*((~b)^2 + (~c)^2) - (~a)*((~b)*(~B) + (~c)*(~C)), 0) ? +((~b)*(~B) + (~c)*(~C))*(~x)⨸((~b)^2 + (~c)^2) + ((~c)*(~B) - (~b)*(~C))* log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸((~e)*((~b)^2 + (~c)^2)) + ((~A)*((~b)^2 + (~c)^2) - (~a)*((~b)*(~B) + (~c)*(~C)))⨸((~b)^2 + (~c)^2)* ∫(1⨸((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_26", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + !eq((~A)*((~b)^2 + (~c)^2) - (~a)*(~c)*(~C), 0) ? +(~c)*(~C)*((~d) + (~e)*(~x))⨸((~e)*((~b)^2 + (~c)^2)) - (~b)*(~C)*log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸((~e)*((~b)^2 + (~c)^2)) + ((~A)*((~b)^2 + (~c)^2) - (~a)*(~c)*(~C))⨸((~b)^2 + (~c)^2)* ∫(1⨸((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_27", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~b)^2 + (~c)^2, 0) && + !eq((~A)*((~b)^2 + (~c)^2) - (~a)*(~b)*(~B), 0) ? +(~b)*(~B)*((~d) + (~e)*(~x))⨸((~e)*((~b)^2 + (~c)^2)) + (~c)*(~B)*log((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))⨸((~e)*((~b)^2 + (~c)^2)) + ((~A)*((~b)^2 + (~c)^2) - (~a)*(~b)*(~B))⨸((~b)^2 + (~c)^2)* ∫(1⨸((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_28", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~n), (~x)) && + !eq((~n), -1) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + eq(((~b)*(~B) + (~c)*(~C))*(~n) + (~a)*(~A)*((~n) + 1), 0) ? +((~B)*(~c) - (~b)*(~C) - (~a)*(~C)*cos((~d) + (~e)*(~x)) + (~a)*(~B)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) : nothing) + +("4_1_6_29", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~n), (~x)) && + !eq((~n), -1) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + eq((~c)*(~C)*(~n) + (~a)*(~A)*((~n) + 1), 0) ? +-((~b)*(~C) + (~a)*(~C)*cos((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) : nothing) + +("4_1_6_30", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~x)) && + !eq((~n), -1) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + eq((~b)*(~B)*(~n) + (~a)*(~A)*((~n) + 1), 0) ? +((~B)*(~c) + (~a)*(~B)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) : nothing) + +("4_1_6_31", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~n), (~x)) && + !eq((~n), -1) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq(((~b)*(~B) + (~c)*(~C))*(~n) + (~a)*(~A)*((~n) + 1), 0) ? +((~B)*(~c) - (~b)*(~C) - (~a)*(~C)*cos((~d) + (~e)*(~x)) + (~a)*(~B)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) + (((~b)*(~B) + (~c)*(~C))*(~n) + (~a)*(~A)*((~n) + 1))⨸((~a)*((~n) + 1))* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_32", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~n), (~x)) && + !eq((~n), -1) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~c)*(~C)*(~n) + (~a)*(~A)*((~n) + 1), 0) ? +-((~b)*(~C) + (~a)*(~C)*cos((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) + ((~c)*(~C)*(~n) + (~a)*(~A)*((~n) + 1))⨸((~a)*((~n) + 1))* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_33", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~n), (~x)) && + !eq((~n), -1) && + eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~b)*(~B)*(~n) + (~a)*(~A)*((~n) + 1), 0) ? +((~B)*(~c) + (~a)*(~B)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) + ((~b)*(~B)*(~n) + (~a)*(~A)*((~n) + 1))⨸((~a)*((~n) + 1))* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_34", +@rule ∫(((~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~B), (~C), (~x)) && + !eq((~n), -1) && + !eq((~b)^2 + (~c)^2, 0) && + eq((~b)*(~B) + (~c)*(~C), 0) ? +((~c)*(~B) - (~b)*(~C))*((~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)⨸((~e)*((~n) + 1)*((~b)^2 + (~c)^2)) : nothing) + +("4_1_6_35", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + gt((~n), 0) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +((~B)*(~c) - (~b)*(~C) - (~a)*(~C)*cos((~d) + (~e)*(~x)) + (~a)*(~B)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) + 1⨸((~a)*((~n) + 1))*∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) - 1)* simp((~a)*((~b)*(~B) + (~c)*(~C))*(~n) + (~a)^2*(~A)*((~n) + 1) + ((~n)*((~a)^2*(~B) - (~B)*(~c)^2 + (~b)*(~c)*(~C)) + (~a)*(~b)*(~A)*((~n) + 1))* cos((~d) + (~e)*(~x)) + ((~n)*((~b)*(~B)*(~c) + (~a)^2*(~C) - (~b)^2*(~C)) + (~a)*(~c)*(~A)*((~n) + 1))* sin((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("4_1_6_36", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~x)) && + gt((~n), 0) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +-((~b)*(~C) + (~a)*(~C)*cos((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) + 1⨸((~a)*((~n) + 1))*∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) - 1)* simp((~a)*(~c)*(~C)*(~n) + (~a)^2*(~A)*((~n) + 1) + ((~c)*(~b)*(~C)*(~n) + (~a)*(~b)*(~A)*((~n) + 1))* cos((~d) + (~e)*(~x)) + ((~a)^2*(~C)*(~n) - (~b)^2*(~C)*(~n) + (~a)*(~c)*(~A)*((~n) + 1))* sin((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("4_1_6_37", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + gt((~n), 0) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) ? +((~B)*(~c) + (~a)*(~B)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a)*(~e)*((~n) + 1)) + 1⨸((~a)*((~n) + 1))*∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) - 1)* simp((~a)*(~b)*(~B)*(~n) + (~a)^2*(~A)*((~n) + 1) + ((~a)^2*(~B)*(~n) - (~c)^2*(~B)*(~n) + (~a)*(~b)*(~A)*((~n) + 1))* cos((~d) + (~e)*(~x)) + ((~b)*(~c)*(~B)*(~n) + (~a)*(~c)*(~A)*((~n) + 1))*sin((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("4_1_6_38", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))/ sqrt((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + eq((~B)*(~c) - (~b)*(~C), 0) && + !eq((~A)*(~b) - (~a)*(~B), 0) ? +(~B)⨸(~b)*∫(sqrt((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) + ((~A)*(~b) - (~a)*(~B))⨸(~b)* ∫(1⨸sqrt((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_39", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + eq((~a)*(~A) - (~b)*(~B) - (~c)*(~C), 0) ? +((~c)*(~B) - (~b)*(~C) - ((~a)*(~C) - (~c)*(~A))*cos((~d) + (~e)*(~x)) + ((~a)*(~B) - (~b)*(~A))*sin((~d) + (~e)*(~x)))⨸ ((~e)*((~a)^2 - (~b)^2 - (~c)^2)*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) : nothing) + +("4_1_6_40", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + eq((~a)*(~A) - (~c)*(~C), 0) ? +-((~b)*(~C) + ((~a)*(~C) - (~c)*(~A))*cos((~d) + (~e)*(~x)) + (~b)*(~A)*sin((~d) + (~e)*(~x)))⨸((~e)*((~a)^2 - (~b)^2 - (~c)^2)*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) : nothing) + +("4_1_6_41", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + eq((~a)*(~A) - (~b)*(~B), 0) ? +((~c)*(~B) + (~c)*(~A)*cos((~d) + (~e)*(~x)) + ((~a)*(~B) - (~b)*(~A))* sin((~d) + (~e)*(~x)))⨸((~e)*((~a)^2 - (~b)^2 - (~c)^2)*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) : nothing) + +("4_1_6_42", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~a)*(~A) - (~b)*(~B) - (~c)*(~C), 0) ? +((~c)*(~B) - (~b)*(~C) - ((~a)*(~C) - (~c)*(~A))*cos((~d) + (~e)*(~x)) + ((~a)*(~B) - (~b)*(~A))*sin((~d) + (~e)*(~x)))⨸ ((~e)*((~a)^2 - (~b)^2 - (~c)^2)*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) + ((~a)*(~A) - (~b)*(~B) - (~c)*(~C))⨸((~a)^2 - (~b)^2 - (~c)^2)* ∫(1⨸((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_43", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~a)*(~A) - (~c)*(~C), 0) ? +-((~b)*(~C) + ((~a)*(~C) - (~c)*(~A))*cos((~d) + (~e)*(~x)) + (~b)*(~A)*sin((~d) + (~e)*(~x)))⨸((~e)*((~a)^2 - (~b)^2 - (~c)^2)*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) + ((~a)*(~A) - (~c)*(~C))⨸((~a)^2 - (~b)^2 - (~c)^2)* ∫(1⨸((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_44", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~a)*(~A) - (~b)*(~B), 0) ? +((~c)*(~B) + (~c)*(~A)*cos((~d) + (~e)*(~x)) + ((~a)*(~B) - (~b)*(~A))* sin((~d) + (~e)*(~x)))⨸((~e)*((~a)^2 - (~b)^2 - (~c)^2)*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))) + ((~a)*(~A) - (~b)*(~B))⨸((~a)^2 - (~b)^2 - (~c)^2)* ∫(1⨸((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_45", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~C), (~x)) && + lt((~n), -1) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~n), -2) ? +-((~c)*(~B) - (~b)*(~C) - ((~a)*(~C) - (~c)*(~A))*cos((~d) + (~e)*(~x)) + ((~a)*(~B) - (~b)*(~A))*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)⨸ ((~e)*((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2)) + 1⨸(((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2))* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)* simp(((~n) + 1)*((~a)*(~A) - (~b)*(~B) - (~c)*(~C)) + ((~n) + 2)*((~a)*(~B) - (~b)*(~A))* cos((~d) + (~e)*(~x)) + ((~n) + 2)*((~a)*(~C) - (~c)*(~A))*sin((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("4_1_6_46", +@rule ∫(((~!A) + (~!C)*sin((~!d) + (~!e)*(~x)))*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~C), (~x)) && + lt((~n), -1) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~n), -2) ? +((~b)*(~C) + ((~a)*(~C) - (~c)*(~A))*cos((~d) + (~e)*(~x)) + (~b)*(~A)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)⨸ ((~e)*((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2)) + 1⨸(((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2))* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)* simp(((~n) + 1)*((~a)*(~A) - (~c)*(~C)) - ((~n) + 2)*(~b)*(~A)* cos((~d) + (~e)*(~x)) + ((~n) + 2)*((~a)*(~C) - (~c)*(~A))*sin((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("4_1_6_47", +@rule ∫(((~!A) + (~!B)*cos((~!d) + (~!e)*(~x)))*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + lt((~n), -1) && + !eq((~a)^2 - (~b)^2 - (~c)^2, 0) && + !eq((~n), -2) ? +-((~c)*(~B) + (~c)*(~A)*cos((~d) + (~e)*(~x)) + ((~a)*(~B) - (~b)*(~A))*sin((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)⨸ ((~e)*((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2)) + 1⨸(((~n) + 1)*((~a)^2 - (~b)^2 - (~c)^2))* ∫(((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^((~n) + 1)* simp(((~n) + 1)*((~a)*(~A) - (~b)*(~B)) + ((~n) + 2)*((~a)*(~B) - (~b)*(~A))* cos((~d) + (~e)*(~x)) - ((~n) + 2)*(~c)*(~A)*sin((~d) + (~e)*(~x)), (~x)), (~x)) : nothing) + +("4_1_6_48", +@rule ∫(1/((~!a) + (~!b)*sec((~!d) + (~!e)*(~x)) + (~!c)*tan((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) ? +∫(cos((~d) + (~e)*(~x))⨸((~b) + (~a)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_49", +@rule ∫(1/((~!a) + (~!b)*csc((~!d) + (~!e)*(~x)) + (~!c)*cot((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) ? +∫(sin((~d) + (~e)*(~x))⨸((~b) + (~a)*sin((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_6_50", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~!n)*((~!a) + (~!b)*sec((~!d) + (~!e)*(~x)) + (~!c)*tan((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~n)) ? +∫(((~b) + (~a)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_51", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~!n)*((~!a) + (~!b)*csc((~!d) + (~!e)*(~x)) + (~!c)*cot((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~n)) ? +∫(((~b) + (~a)*sin((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_52", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~n)*((~!a) + (~!b)*sec((~!d) + (~!e)*(~x)) + (~!c)*tan((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !(ext_isinteger((~n))) ? +cos((~d) + (~e)*(~x))^ (~n)*((~a) + (~b)*sec((~d) + (~e)*(~x)) + (~c)*tan((~d) + (~e)*(~x)))^ (~n)⨸((~b) + (~a)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n)* ∫(((~b) + (~a)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_53", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~n)*((~!a) + (~!b)*csc((~!d) + (~!e)*(~x)) + (~!c)*cot((~!d) + (~!e)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !(ext_isinteger((~n))) ? +sin((~d) + (~e)*(~x))^ (~n)*((~a) + (~b)*csc((~d) + (~e)*(~x)) + (~c)*cot((~d) + (~e)*(~x)))^ (~n)⨸((~b) + (~a)*sin((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x)))^(~n)* ∫(((~b) + (~a)*sin((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_54", +@rule ∫(sec((~!d) + (~!e)*(~x))^ (~!n)*((~!a) + (~!b)*sec((~!d) + (~!e)*(~x)) + (~!c)*tan((~!d) + (~!e)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~m) + (~n), 0) && + ext_isinteger((~n)) ? +∫(1⨸((~b) + (~a)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_55", +@rule ∫(csc((~!d) + (~!e)*(~x))^ (~!n)*((~!a) + (~!b)*csc((~!d) + (~!e)*(~x)) + (~!c)*cot((~!d) + (~!e)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~m) + (~n), 0) && + ext_isinteger((~n)) ? +∫(1⨸((~b) + (~a)*sin((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_56", +@rule ∫(sec((~!d) + (~!e)*(~x))^ (~!n)*((~!a) + (~!b)*sec((~!d) + (~!e)*(~x)) + (~!c)*tan((~!d) + (~!e)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~m) + (~n), 0) && + !(ext_isinteger((~n))) ? +sec((~d) + (~e)*(~x))^ (~n)*((~b) + (~a)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^ (~n)⨸((~a) + (~b)*sec((~d) + (~e)*(~x)) + (~c)*tan((~d) + (~e)*(~x)))^(~n)* ∫(1⨸((~b) + (~a)*cos((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + +("4_1_6_57", +@rule ∫(csc((~!d) + (~!e)*(~x))^ (~!n)*((~!a) + (~!b)*csc((~!d) + (~!e)*(~x)) + (~!c)*cot((~!d) + (~!e)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~m) + (~n), 0) && + !(ext_isinteger((~n))) ? +csc((~d) + (~e)*(~x))^ (~n)*((~b) + (~a)*sin((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x)))^ (~n)⨸((~a) + (~b)*csc((~d) + (~e)*(~x)) + (~c)*cot((~d) + (~e)*(~x)))^(~n)* ∫(1⨸((~b) + (~a)*sin((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.7 (d trig)^m (a+b (c sin)^n)^p.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.7 (d trig)^m (a+b (c sin)^n)^p.jl new file mode 100644 index 0000000..49e3ccc --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.7 (d trig)^m (a+b (c sin)^n)^p.jl @@ -0,0 +1,478 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.7 (d trig)^m (a+b (c sin)^n)^p *) +("4_1_7_1", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) ? +(4*(~A)*(2*(~a) + (~b)) + (~B)*(4*(~a) + 3*(~b)))*(~x)⨸8 - (4*(~A)*(~b) + (~B)*(4*(~a) + 3*(~b)))*cos((~e) + (~f)*(~x))*sin((~e) + (~f)*(~x))⨸(8*(~f)) - (~b)*(~B)*cos((~e) + (~f)*(~x))*sin((~e) + (~f)*(~x))^3⨸(4*(~f)) : nothing) + +("4_1_7_2", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) && + gt((~p), 0) ? +-(~B)*cos((~e) + (~f)*(~x))* sin((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^(~p)⨸(2*(~f)*((~p) + 1)) + 1⨸(2*((~p) + 1))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^((~p) - 1)* simp((~a)*(~B) + 2*(~a)*(~A)*((~p) + 1) + (2*(~A)*(~b)*((~p) + 1) + (~B)*((~b) + 2*(~a)*(~p) + 2*(~b)*(~p)))* sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_7_3", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))^2)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) ? +(~B)*(~x)⨸(~b) + ((~A)*(~b) - (~a)*(~B))⨸(~b)*∫(1⨸((~a) + (~b)*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_7_4", +@rule ∫(((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))^2)/ sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) ? +(~B)⨸(~b)*∫(sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))^2), (~x)) + ((~A)*(~b) - (~a)*(~B))⨸(~b)* ∫(1⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_1_7_5", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) && + lt((~p), -1) && + !eq((~a) + (~b), 0) ? +-((~A)*(~b) - (~a)*(~B))*cos((~e) + (~f)*(~x))* sin((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^((~p) + 1)⨸(2*(~a)* (~f)*((~a) + (~b))*((~p) + 1)) - 1⨸(2*(~a)*((~a) + (~b))*((~p) + 1))*∫(((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^((~p) + 1)* simp((~a)*(~B) - (~A)*(2*(~a)*((~p) + 1) + (~b)*(2*(~p) + 3)) + 2*((~A)*(~b) - (~a)*(~B))*((~p) + 2)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_7_6", +@rule ∫(((~!a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^ (~p)*((~!A) + (~!B)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~A), (~B), (~x)) && + !(ext_isinteger((~p))) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))*((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^ (~p)*(sec((~e) + (~f)*(~x))^2)^(~p)⨸((~f)*((~a) + ((~a) + (~b))*tan((~e) + (~f)*(~x))^2)^(~p))* int_and_subst(((~a) + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^ (~p)*((~A) + ((~A) + (~B))*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~p) + 2), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_6") : nothing) + +("4_1_7_7", +@rule ∫((~!u)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + eq((~a) + (~b), 0) && + ext_isinteger((~p)) ? +(~a)^(~p)*∫(ActivateTrig[(~u)*cos((~e) + (~f)*(~x))^(2*(~p))], (~x)) : nothing) + +("4_1_7_8", +@rule ∫((~!u)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + eq((~a) + (~b), 0) ? +∫(ActivateTrig[(~u)*((~a)*cos((~e) + (~f)*(~x))^2)^(~p)], (~x)) : nothing) + +("4_1_7_9", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~a), 0) ? +sqrt((~a))⨸(~f)*elliptic_e((~e) + (~f)*(~x), -(~b)⨸(~a)) : nothing) + +("4_1_7_10", +@rule ∫(sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !(gt((~a), 0)) ? +sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))^2)⨸sqrt(1 + (~b)*sin((~e) + (~f)*(~x))^2⨸(~a))* ∫(sqrt(1 + ((~b)*sin((~e) + (~f)*(~x))^2)⨸(~a)), (~x)) : nothing) + +("4_1_7_11", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^2,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) ? +(8*(~a)^2 + 8*(~a)*(~b) + 3*(~b)^2)*(~x)⨸8 - (~b)*(8*(~a) + 3*(~b))*cos((~e) + (~f)*(~x))*sin((~e) + (~f)*(~x))⨸(8*(~f)) - (~b)^2*cos((~e) + (~f)*(~x))*sin((~e) + (~f)*(~x))^3⨸(4*(~f)) : nothing) + +("4_1_7_12", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a) + (~b), 0) && + gt((~p), 1) ? +-(~b)*cos((~e) + (~f)*(~x))* sin((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^((~p) - 1)⨸(2*(~f)*(~p)) + 1⨸(2*(~p))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^((~p) - 2)* simp((~a)*((~b) + 2*(~a)*(~p)) + (~b)*(2*(~a) + (~b))*(2*(~p) - 1)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_7_13", +@rule ∫(1/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(1⨸((~a) + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_13") : nothing) + +("4_1_7_14", +@rule ∫(1/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + gt((~a), 0) ? +1⨸(sqrt((~a))*(~f))*elliptic_f((~e) + (~f)*(~x), -(~b)⨸(~a)) : nothing) + +("4_1_7_15", +@rule ∫(1/sqrt((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !(gt((~a), 0)) ? +sqrt(1 + (~b)*sin((~e) + (~f)*(~x))^2⨸(~a))⨸sqrt((~a) + (~b)*sin((~e) + (~f)*(~x))^2)* ∫(1⨸sqrt(1 + ((~b)*sin((~e) + (~f)*(~x))^2)⨸(~a)), (~x)) : nothing) + +("4_1_7_16", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a) + (~b), 0) && + lt((~p), -1) ? +-(~b)*cos((~e) + (~f)*(~x))* sin((~e) + (~f)*(~x))*((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^((~p) + 1)⨸(2*(~a)* (~f)*((~p) + 1)*((~a) + (~b))) + 1⨸(2*(~a)*((~p) + 1)*((~a) + (~b)))* ∫(((~a) + (~b)*sin((~e) + (~f)*(~x))^2)^((~p) + 1)* simp(2*(~a)*((~p) + 1) + (~b)*(2*(~p) + 3) - 2*(~b)*((~p) + 2)*sin((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_1_7_17", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + !(ext_isinteger((~p))) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))*sqrt(cos((~e) + (~f)*(~x))^2)⨸((~f)*cos((~e) + (~f)*(~x)))* int_and_subst(((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸sqrt(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_17") : nothing) + +("4_1_7_18", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) ? +-free_factors(cos((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst((1 - free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b) - (~b)*free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p), (~x), (~x), cos((~e) + (~f)*(~x))⨸free_factors(cos((~e) + (~f)*(~x)), (~x)), "4_1_7_18") : nothing) + +("4_1_7_19", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))^((~m) + 1)⨸(~f)* int_and_subst( (~x)^(~m)*((~a) + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + (~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_19") : nothing) + +("4_1_7_20", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~m)/2) && + !(ext_isinteger((~p))) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))^((~m) + 1)*sqrt(cos((~e) + (~f)*(~x))^2)⨸((~f)*cos((~e) + (~f)*(~x)))* int_and_subst((~x)^(~m)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸sqrt(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_20") : nothing) + +("4_1_7_21", +@rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) ? +-free_factors(cos((~e) + (~f)*(~x)), (~x))* (~d)^(2*intpart(((~m) - 1)⨸2) + 1)*((~d)*sin((~e) + (~f)*(~x)))^(2* fracpart(((~m) - 1)⨸2))⨸((~f)*(sin((~e) + (~f)*(~x))^2)^ fracpart(((~m) - 1)⨸2))* int_and_subst((1 - free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b) - (~b)*free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p), (~x), (~x), cos((~e) + (~f)*(~x))⨸free_factors(cos((~e) + (~f)*(~x)), (~x)), "4_1_7_21") : nothing) + +("4_1_7_22", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst((1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_22") : nothing) + +("4_1_7_23", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~a) + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + (~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_23") : nothing) + +("4_1_7_24", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~m)/2) && + !(ext_isinteger((~p))) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))*sqrt(cos((~e) + (~f)*(~x))^2)⨸((~f)*cos((~e) + (~f)*(~x)))* int_and_subst((1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_24") : nothing) + +("4_1_7_25", +@rule ∫(((~!d)*cos((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))*(~d)^(2*intpart(((~m) - 1)⨸2) + 1)*((~d)*cos((~e) + (~f)*(~x)))^(2* fracpart(((~m) - 1)⨸2))⨸((~f)*(cos((~e) + (~f)*(~x))^2)^ fracpart(((~m) - 1)⨸2))* int_and_subst((1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_25") : nothing) + +("4_1_7_26", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) ? +free_factors(sin((~e) + (~f)*(~x))^2, (~x))^(((~m) + 1)⨸2)⨸(2*(~f))* int_and_subst((~x)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x))^2, (~x))*(~x))^(~p)⨸(1 - free_factors(sin((~e) + (~f)*(~x))^2, (~x))*(~x))^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))^2⨸free_factors(sin((~e) + (~f)*(~x))^2, (~x)), "4_1_7_26") : nothing) + +("4_1_7_27", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~d)*free_factors(tan((~e) + (~f)*(~x)), (~x))*(~x))^ (~m)*((~a) + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_27") : nothing) + +("4_1_7_28", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~m)/2) && + !(ext_isinteger((~p))) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))^((~m) + 1)*sqrt(cos((~e) + (~f)*(~x))^2)⨸((~f)*cos((~e) + (~f)*(~x)))* int_and_subst((~x)^(~m)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_28") : nothing) + +("4_1_7_29", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))*((~d)*tan((~e) + (~f)*(~x)))^((~m) + 1)*(cos((~e) + (~f)*(~x))^2)^(((~m) + 1)⨸2)⨸((~d)*(~f)* sin((~e) + (~f)*(~x))^((~m) + 1))* int_and_subst((free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^(~m)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_29") : nothing) + +("4_1_7_30", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!m)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~d)*free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^(~n)*(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^ (~p), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_30") : nothing) + +("4_1_7_31", +@rule ∫(((~!c)*sin((~!e) + (~!f)*(~x)))^(~m)* sin((~!e) + (~!f)*(~x))^(~!n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~m), (~p), (~x)) && + ext_isinteger(((~n) - 1)/2) ? +-free_factors(cos((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~c)*free_factors(cos((~e) + (~f)*(~x)), (~x))*(~x))^ (~m)*(1 - free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~n) - 1)⨸2)*((~a) + (~b) - (~b)*free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p), (~x), (~x), cos((~e) + (~f)*(~x))⨸free_factors(cos((~e) + (~f)*(~x)), (~x)), "4_1_7_31") : nothing) + +("4_1_7_32", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~m)* sin((~!e) + (~!f)*(~x))^(~n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~n)/2) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))^((~n) + 1)⨸(~f)* int_and_subst( (~x)^(~n)*((~a) + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) + (~n))⨸2 + (~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_32") : nothing) + +("4_1_7_33", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~m)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~p), (~x)) && + ext_isinteger((~m)/2) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))*sqrt(cos((~e) + (~f)*(~x))^2)⨸((~f)*cos((~e) + (~f)*(~x)))* int_and_subst(((~d)*free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^(~n)*(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^ (~p), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_33") : nothing) + +("4_1_7_34", +@rule ∫(((~!c)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!d)*sin((~!e) + (~!f)*(~x)))^ (~!n)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))*(~c)^(2*intpart(((~m) - 1)⨸2) + 1)*((~c)*cos((~e) + (~f)*(~x)))^(2* fracpart(((~m) - 1)⨸2))⨸((~f)*(cos((~e) + (~f)*(~x))^2)^ fracpart(((~m) - 1)⨸2))* int_and_subst(((~d)*free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^(~n)*(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(~p), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_34") : nothing) + +("4_1_7_35", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~b), (~e), (~f), (~x)) && + !(ext_isinteger((~p))) && + gt((~p), 1) ? +-cot((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x))^2)^(~p)⨸(2*(~f)*(~p)) + (~b)*(2*(~p) - 1)⨸(2*(~p))*∫(((~b)*sin((~e) + (~f)*(~x))^2)^((~p) - 1), (~x)) : nothing) + +("4_1_7_36", +@rule ∫(((~!b)*sin((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~b), (~e), (~f), (~x)) && + !(ext_isinteger((~p))) && + lt((~p), -1) ? +cot((~e) + (~f)*(~x))*((~b)*sin((~e) + (~f)*(~x))^2)^((~p) + 1)⨸((~b)*(~f)*(2*(~p) + 1)) + 2*((~p) + 1)⨸((~b)*(2*(~p) + 1))*∫(((~b)*sin((~e) + (~f)*(~x))^2)^((~p) + 1), (~x)) : nothing) + +("4_1_7_37", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!m)*((~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ext_isinteger((~n)/2) ? +free_factors(sin((~e) + (~f)*(~x))^2, (~x))^(((~m) + 1)⨸2)⨸(2*(~f))* int_and_subst( (~x)^(((~m) - 1)⨸2)*((~b)*free_factors(sin((~e) + (~f)*(~x))^2, (~x))^((~n)⨸2)*(~x)^((~n)⨸2))^(~p)⨸(1 - free_factors(sin((~e) + (~f)*(~x))^2, (~x))*(~x))^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))^2⨸free_factors(sin((~e) + (~f)*(~x))^2, (~x)), "4_1_7_37") : nothing) + +("4_1_7_38", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!m)*((~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^(~!p),(~x)) => + !contains_var((~b), (~c), (~e), (~f), (~n), (~p), (~x)) && + ilt(((~m) - 1)/2, 0) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))^((~m) + 1)⨸(~f)* int_and_subst((~x)^(~m)*((~b)*((~c)*free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^(~n))^(~p)⨸(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_38") : nothing) + +# ("4_1_7_39", +# @rule ∫((~!u)*((~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => +# ((~b)*free_factors(sin((~e) + (~f)*(~x)), (~x))^(~n))^ intpart((~p))*((~b)*sin((~e) + (~f)*(~x))^(~n))^ fracpart((~p))⨸(sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)))^((~n)*fracpart((~p)))* ∫(ActivateTrig[(~u)]*(sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)))^((~n)*(~p)), (~x))⨸; FreeQ[{(~b), (~e), (~f), (~n), (~p)}, (~x)] && Not[IntegerQ[(~p)]] && IntegerQ[(~n)] && (EqQ[(~u), 1] || MatchQ[(~u), (d_.*trig_[(~e) + (~f)*(~x)])^m_. ⨸; FreeQ[{(~d), (~m)}, (~x)] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]])) +# +# ("4_1_7_40", +# @rule ∫((~!u)*((~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^(~p),(~x)) => +# (~b)^intpart((~p))*((~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^ fracpart((~p))⨸((~c)*sin((~e) + (~f)*(~x)))^((~n)*fracpart((~p)))* ∫(ActivateTrig[(~u)]*((~c)*sin((~e) + (~f)*(~x)))^((~n)*(~p)), (~x)) ⨸; FreeQ[{(~b), (~c), (~e), (~f), (~n), (~p)}, (~x)] && Not[IntegerQ[(~p)]] && Not[IntegerQ[(~n)]] && (EqQ[(~u), 1] || MatchQ[(~u), (d_.*trig_[(~e) + (~f)*(~x)])^m_. ⨸; FreeQ[{(~d), (~m)}, (~x)] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]])) + +#(* Int[(a_+b_.*sin[e_.+f_.*x_]^4)^p_.,x_Symbol] := With[{ff=FreeFactors[Tan[e+f*x],x]}, -ff/f*Subst[Int[(a+b+2*a*ff^2*x^2+a*ff^4*x^4)^p/(1+ff^2*x^2)^(2*p+1) ,x],x,Cot[e+f*x]/ff]] /; FreeQ[{a,b,e,f},x] && IntegerQ[p] *) +("4_1_7_41", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~a) + 2*(~a)*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2 + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^4*(~x)^4)^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(2*(~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_41") : nothing) + +("4_1_7_42", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~p) - 1/2) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))*((~a) + (~b)*sin((~e) + (~f)*(~x))^4)^ (~p)*(sec((~e) + (~f)*(~x))^2)^(2* (~p))⨸((~f)*((~a) + 2*(~a)*tan((~e) + (~f)*(~x))^2 + ((~a) + (~b))*tan((~e) + (~f)*(~x))^4)^(~p))* int_and_subst(((~a) + 2*(~a)*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2 + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^4*(~x)^4)^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(2*(~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_42") : nothing) + +("4_1_7_43", +@rule ∫(1/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n)),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~n)/2) ? +dist(2⨸((~a)*(~n)), sum([∫(1⨸(1 - sin((~e) + (~f)*(~x))^2⨸((-1)^(4*iii⨸(~n))*rt(-(~a)⨸(~b), (~n)⨸2))), (~x)) for iii in 1:( (~n)⨸2)]), (~x)) : nothing) + +#(* Int[(a_+b_.*sin[e_.+f_.*x_]^n_)^p_,x_Symbol] := With[{ff=FreeFactors[Tan[e+f*x],x]}, -ff/f*Subst[Int[(b+a*(1+ff^2*x^2)^(n/2))^p/(1+ff^2*x^2)^(n*p/2+1),x] ,x,Cot[e+f*x]/ff]] /; FreeQ[{a,b,e,f},x] && IntegerQ[n/2] && IGtQ[p,0] *) +("4_1_7_44", +@rule ∫(((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~n)/2) && + igt((~p), 0) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))^(~n)*(~x)^(~n) + (~a)*(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~n)⨸2))^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~n)*(~p)⨸2 + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_44") : nothing) + +("4_1_7_45", +@rule ∫(((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~n), (~x)) && + ( + igt((~p), 0) || + eq((~p), -1) && + ext_isinteger((~n)) + ) ? +∫(ext_expand(((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)), (~x)) : nothing) + +# ("4_1_7_46", +# @rule ∫(((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~e), (~f), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_1_7_47", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) ? +-free_factors(cos((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst((1 - free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b) - 2*(~b)*free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2 + (~b)*free_factors(cos((~e) + (~f)*(~x)), (~x))^4*(~x)^4)^(~p), (~x), (~x), cos((~e) + (~f)*(~x))⨸free_factors(cos((~e) + (~f)*(~x)), (~x)), "4_1_7_47") : nothing) + +("4_1_7_48", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ext_isinteger((~n)/2) ? +-free_factors(cos((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst((1 - free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*(1 - free_factors(cos((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~n)⨸2))^ (~p), (~x), (~x), cos((~e) + (~f)*(~x))⨸free_factors(cos((~e) + (~f)*(~x)), (~x)), "4_1_7_48") : nothing) + +("4_1_7_49", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))^((~m) + 1)⨸(~f)* int_and_subst( (~x)^(~m)*((~a) + 2*(~a)*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2 + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^4*(~x)^4)^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + 2*(~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_49") : nothing) + +("4_1_7_50", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~n)/2) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))^((~m) + 1)⨸(~f)* int_and_subst( (~x)^(~m)*((~a)*(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~n)⨸2) + (~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))^(~n)*(~x)^(~n))^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + (~n)*(~p)⨸2 + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_50") : nothing) + +("4_1_7_51", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~p) - 1/2) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))^((~m) + 1)*((~a) + (~b)*sin((~e) + (~f)*(~x))^4)^ (~p)*(sec((~e) + (~f)*(~x))^2)^(2*(~p))⨸((~f)* Apart[(~a)*(1 + tan((~e) + (~f)*(~x))^2)^2 + (~b)*tan((~e) + (~f)*(~x))^4]^(~p))* int_and_subst((~x)^(~m)*expand_to_sum((~a)*(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^2 + (~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))^4*(~x)^4, (~x))^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + 2*(~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_51") : nothing) + +("4_1_7_52", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m), (~p)) && + ( + eq((~n), 4) || + gt((~p), 0) || + eq((~p), -1) && + ext_isinteger((~n)) + ) ? +∫(ext_expand(sin((~e) + (~f)*(~x))^(~m)*((~a) + (~b)*sin((~e) + (~f)*(~x))^(~n))^(~p), (~x)), (~x)) : nothing) + +("4_1_7_53", +@rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~d)*sin((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)), (~x)) : nothing) + +# ("4_1_7_54", +# @rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*sin((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_1_7_55", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~n), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ( + eq((~n), 4) || + gt((~m), 0) || + igt((~p), 0) || + ext_isinteger((~m), (~p)) + ) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst((1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*((~c)*free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^(~n))^(~p), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_55") : nothing) + +("4_1_7_56", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~a) + 2*(~a)*free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2 + ((~a) + (~b))*free_factors(tan((~e) + (~f)*(~x)), (~x))^4*(~x)^4)^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + 2*(~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_56") : nothing) + +("4_1_7_57", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~n)/2) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))^(~n)*(~x)^(~n) + (~a)*(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~n)⨸2))^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~m)⨸2 + (~n)*(~p)⨸2 + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_57") : nothing) + +("4_1_7_58", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~m)/((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n)),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + igt((~m)/2, 0) && + ext_isinteger(((~n) - 1)/2) ? +∫(ext_expand((1 - sin((~e) + (~f)*(~x))^2)^((~m)⨸2)⨸((~a) + (~b)*sin((~e) + (~f)*(~x))^(~n)), (~x)), (~x)) : nothing) + +#(* Int[cos[e_.+f_.*x_]^m_*(a_+b_.*sin[e_.+f_.*x_]^n_)^p_,x_Symbol] := Int[ExpandTrig[(1-sin[e+f*x]^2)^(m/2)*(a+b*sin[e+f*x]^n)^p,x],x] /; FreeQ[{a,b,e,f},x] && IntegerQ[m/2] && IntegerQ[(n-1)/2] && ILtQ[p,-1] && LtQ[m,0] *) +("4_1_7_59", +@rule ∫(((~!d)*cos((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~d)*cos((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)), (~x)) : nothing) + +# ("4_1_7_60", +# @rule ∫(((~!d)*cos((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*cos((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_1_7_61", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ext_isinteger((~n)/2) ? +free_factors(sin((~e) + (~f)*(~x))^2, (~x))^(((~m) + 1)⨸2)⨸(2*(~f))* int_and_subst( (~x)^(((~m) - 1)⨸2)*((~a) + (~b)*free_factors(sin((~e) + (~f)*(~x))^2, (~x))^((~n)⨸2)*(~x)^((~n)⨸2))^(~p)⨸(1 - free_factors(sin((~e) + (~f)*(~x))^2, (~x))*(~x))^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))^2⨸free_factors(sin((~e) + (~f)*(~x))^2, (~x)), "4_1_7_61") : nothing) + +("4_1_7_62", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~n), (~p), (~x)) && + ilt(((~m) - 1)/2, 0) ? +free_factors(sin((~e) + (~f)*(~x)), (~x))^((~m) + 1)⨸(~f)* int_and_subst((~x)^(~m)*((~a) + (~b)*((~c)*free_factors(sin((~e) + (~f)*(~x)), (~x))*(~x))^(~n))^(~p)⨸(1 - free_factors(sin((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))⨸free_factors(sin((~e) + (~f)*(~x)), (~x)), "4_1_7_62") : nothing) + +("4_1_7_63", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~p)) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))⨸(~f)* int_and_subst(((~d)*free_factors(tan((~e) + (~f)*(~x)), (~x))*(~x))^(~m)* expand_to_sum((~a)*(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^2 + (~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))^4*(~x)^4, (~x))^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(2*(~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_63") : nothing) + +("4_1_7_64", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~p) - 1/2) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))*((~a) + (~b)*sin((~e) + (~f)*(~x))^4)^ (~p)*(sec((~e) + (~f)*(~x))^2)^(2*(~p))⨸((~f)* Apart[(~a)*(1 + tan((~e) + (~f)*(~x))^2)^2 + (~b)*tan((~e) + (~f)*(~x))^4]^(~p))* int_and_subst(((~d)*free_factors(tan((~e) + (~f)*(~x)), (~x))*(~x))^(~m)* expand_to_sum((~a)*(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^2 + (~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))^4*(~x)^4, (~x))^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^(2*(~p) + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_64") : nothing) + +("4_1_7_65", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + ext_isinteger((~n)/2) && + igt((~p), 0) ? +free_factors(tan((~e) + (~f)*(~x)), (~x))^((~m) + 1)⨸(~f)* int_and_subst(((~d)*(~x))^ (~m)*((~b)*free_factors(tan((~e) + (~f)*(~x)), (~x))^(~n)*(~x)^(~n) + (~a)*(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~n)⨸2))^ (~p)⨸(1 + free_factors(tan((~e) + (~f)*(~x)), (~x))^2*(~x)^2)^((~n)*(~p)⨸2 + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸free_factors(tan((~e) + (~f)*(~x)), (~x)), "4_1_7_65") : nothing) + +("4_1_7_66", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + igt((~p), 0) ? +∫(ext_expand(((~d)*tan((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)), (~x)) : nothing) + +# ("4_1_7_67", +# @rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*tan((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_1_7_68", +@rule ∫(((~!d)*cot((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*cot((~e) + (~f)*(~x)))^fracpart((~m))*(tan((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫((tan((~e) + (~f)*(~x))⨸(~d))^(-(~m))*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + +("4_1_7_69", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*sec((~e) + (~f)*(~x)))^fracpart((~m))*(cos((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫((cos((~e) + (~f)*(~x))⨸(~d))^(-(~m))*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + +("4_1_7_70", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sin((~!e) + (~!f)*(~x))^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + ext_isinteger((~n), (~p)) ? +(~d)^((~n)*(~p))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~m) - (~n)*(~p))*((~b) + (~a)*csc((~e) + (~f)*(~x))^(~n))^(~p), (~x)) : nothing) + +("4_1_7_71", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)))^(~n))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*csc((~e) + (~f)*(~x)))^fracpart((~m))*(sin((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫((sin((~e) + (~f)*(~x))⨸(~d))^(-(~m))*((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + +("4_1_7_72", +@rule ∫(((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)) + (~!d)*cos((~!e) + (~!f)*(~x)))^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~p)^2, 1/4) && + gt((~a), 0) ? +∫(((~a) + (~b)*(sqrt((~c)^2 + (~d)^2)*sin(atan((~c), (~d)) + (~e) + (~f)*(~x)))^2)^(~p), (~x)) : nothing) + +("4_1_7_73", +@rule ∫(((~a) + (~!b)*((~!c)*sin((~!e) + (~!f)*(~x)) + (~!d)*cos((~!e) + (~!f)*(~x)))^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~p)^2, 1/4) && + !(gt((~a), 0)) ? +((~a) + (~b)*((~c)*sin((~e) + (~f)*(~x)) + (~d)*cos((~e) + (~f)*(~x)))^2)^ (~p)⨸(1 + ((~b)*((~c)*sin((~e) + (~f)*(~x)) + (~d)*cos((~e) + (~f)*(~x)))^2)⨸(~a))^(~p)* ∫((1 + ((~b)*((~c)*sin((~e) + (~f)*(~x)) + (~d)*cos((~e) + (~f)*(~x)))^2)⨸(~a))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.9 trig^m (a+b sin^n+c sin^(2 n))^p.jl b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.9 trig^m (a+b sin^n+c sin^(2 n))^p.jl new file mode 100644 index 0000000..7b140b2 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.1 Sine/4.1.9 trig^m (a+b sin^n+c sin^(2 n))^p.jl @@ -0,0 +1,433 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.1.9 trig^m (a+b sin^n+c sin^(2 n))^p *) +("4_1_9_1", +@rule ∫(((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_2", +@rule ∫(((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_3", +@rule ∫(((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫((~u)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_4", +@rule ∫(((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫((~u)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_5", +@rule ∫(1/((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n)), (~x)) - 2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n)), (~x)) : nothing) + +("4_1_9_6", +@rule ∫(1/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n)), (~x)) - 2*(~c)⨸rt((~b)^2 - 4*(~a)*(~c), 2)*∫(1⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n)), (~x)) : nothing) + +("4_1_9_7", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(sin((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_8", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(cos((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_9", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(sin((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_10", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(cos((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +# ("4_1_9_11", +# @rule ∫(sin((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~n2))^ (~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger((~m)/2) && +# !eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(cot((~d) + (~e)*(~x)), (~x))}, -(~f)⨸(~e)* int_and_subst( expand_to_sum((~c) + (~b)*(1 + (~x)^2)^((~n)⨸2) + (~a)*(1 + (~x)^2)^(~n), (~x))^ (~p)⨸(1 + (~f)^2*(~x)^2)^((~m)⨸2 + (~n)*(~p) + 1), (~x), (~x), cot((~d) + (~e)*(~x))⨸(~f), "4_1_9_11")] : nothing) +# +# ("4_1_9_12", +# @rule ∫(cos((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~n2))^ (~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger((~m)/2) && +# !eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(tan((~d) + (~e)*(~x)), (~x))}, (~f)⨸(~e)* int_and_subst( expand_to_sum((~c) + (~b)*(1 + (~x)^2)^((~n)⨸2) + (~a)*(1 + (~x)^2)^(~n), (~x))^ (~p)⨸(1 + (~f)^2*(~x)^2)^((~m)⨸2 + (~n)*(~p) + 1), (~x), (~x), tan((~d) + (~e)*(~x))⨸(~f), "4_1_9_12")] : nothing) + +("4_1_9_13", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~m), (~n), (~p)) ? +∫(ext_expand( sin((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^(~p), (~x)), (~x)) : nothing) + +("4_1_9_14", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~m), (~n), (~p)) ? +∫(ext_expand( cos((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^(~p), (~x)), (~x)) : nothing) + +# ("4_1_9_15", +# @rule ∫(cos((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*((~!f)*sin((~!d) + (~!e)*(~x)))^(~!n) + (~!c)*((~!f)*sin((~!d) + (~!e)*(~x)))^(~!n2))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger(((~m) - 1)/2) ? +# Module[{(~g) = free_factors(sin((~d) + (~e)*(~x)), (~x))}, (~g)⨸(~e)* int_and_subst((1 - (~g)^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*((~f)*(~g)*(~x))^(~n) + (~c)*((~f)*(~g)*(~x))^(2*(~n)))^(~p), (~x), (~x), sin((~d) + (~e)*(~x))⨸(~g), "4_1_9_15")] : nothing) +# +# ("4_1_9_16", +# @rule ∫(sin((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*((~!f)*cos((~!d) + (~!e)*(~x)))^(~!n) + (~!c)*((~!f)*cos((~!d) + (~!e)*(~x)))^(~!n2))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~p), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger(((~m) - 1)/2) ? +# Module[{(~g) = free_factors(cos((~d) + (~e)*(~x)), (~x))}, -(~g)⨸(~e)* int_and_subst((1 - (~g)^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*((~f)*(~g)*(~x))^(~n) + (~c)*((~f)*(~g)*(~x))^(2*(~n)))^(~p), (~x), (~x), cos((~d) + (~e)*(~x))⨸(~g), "4_1_9_16")] : nothing) + +("4_1_9_17", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(cos((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_18", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(sin((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_19", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(cos((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_20", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(sin((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +# ("4_1_9_21", +# @rule ∫(cos((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~n2))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger((~m)/2) && +# !eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(cot((~d) + (~e)*(~x)), (~x))}, -(~f)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*expand_to_sum((~c) + (~b)*(1 + (~x)^2)^((~n)⨸2) + (~a)*(1 + (~x)^2)^(~n), (~x))^ (~p)⨸(1 + (~f)^2*(~x)^2)^((~m)⨸2 + (~n)*(~p) + 1), (~x), (~x), cot((~d) + (~e)*(~x))⨸(~f), "4_1_9_21")] : nothing) +# +# ("4_1_9_22", +# @rule ∫(sin((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~n2))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger((~m)/2) && +# !eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(tan((~d) + (~e)*(~x)), (~x))}, (~f)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*expand_to_sum((~c) + (~b)*(1 + (~x)^2)^((~n)⨸2) + (~a)*(1 + (~x)^2)^(~n), (~x))^ (~p)⨸(1 + (~f)^2*(~x)^2)^((~m)⨸2 + (~n)*(~p) + 1), (~x), (~x), tan((~d) + (~e)*(~x))⨸(~f), "4_1_9_22")] : nothing) + +("4_1_9_23", +@rule ∫(cos((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + ext_isinteger((~m)/2) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n), (~p)) ? +∫(ext_expand((1 - sin((~d) + (~e)*(~x))^2)^((~m)⨸2)*((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^(~p), (~x)), (~x)) : nothing) + +("4_1_9_24", +@rule ∫(sin((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + ext_isinteger((~m)/2) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n), (~p)) ? +∫(ext_expand((1 - cos((~d) + (~e)*(~x))^2)^((~m)⨸2)*((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^(~p), (~x)), (~x)) : nothing) + +# ("4_1_9_25", +# @rule ∫(tan((~!d) + (~!e)*(~x))^ (~!m)*((~a) + (~!b)*((~!f)*sin((~!d) + (~!e)*(~x)))^(~n) + (~!c)*((~!f)*sin((~!d) + (~!e)*(~x)))^(~!n2))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && +# ext_isinteger(((~m) - 1)/2) && +# ext_isinteger(2*(~p)) ? +# Module[{(~g) = free_factors(sin((~d) + (~e)*(~x)), (~x))}, (~g)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*((~a) + (~b)*((~f)*(~g)*(~x))^(~n) + (~c)*((~f)*(~g)*(~x))^(2*(~n)))^ (~p)⨸(1 - (~g)^2*(~x)^2)^(((~m) + 1)⨸2), (~x), (~x), sin((~d) + (~e)*(~x))⨸(~g), "4_1_9_25")] : nothing) +# +# ("4_1_9_26", +# @rule ∫(cot((~!d) + (~!e)*(~x))^ (~!m)*((~a) + (~!b)*((~!f)*cos((~!d) + (~!e)*(~x)))^(~n) + (~!c)*((~!f)*cos((~!d) + (~!e)*(~x)))^(~!n2))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && +# ext_isinteger(((~m) - 1)/2) && +# ext_isinteger(2*(~p)) ? +# Module[{(~g) = free_factors(cos((~d) + (~e)*(~x)), (~x))}, -(~g)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*((~a) + (~b)*((~f)*(~g)*(~x))^(~n) + (~c)*((~f)*(~g)*(~x))^(2*(~n)))^ (~p)⨸(1 - (~g)^2*(~x)^2)^(((~m) + 1)⨸2), (~x), (~x), cos((~d) + (~e)*(~x))⨸(~g), "4_1_9_26")] : nothing) + +("4_1_9_27", +@rule ∫(tan((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(tan((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_28", +@rule ∫(cot((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(cot((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_29", +@rule ∫(tan((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(tan((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_30", +@rule ∫(cot((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(cot((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +# ("4_1_9_31", +# @rule ∫(tan((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~n2))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# eq((~n2), 2*(~n)) && +# !(ext_isinteger(((~m) - 1)/2)) && +# !eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(tan((~d) + (~e)*(~x)), (~x))}, (~f)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*expand_to_sum( (~c)*(~x)^(2*(~n)) + (~b)*(~x)^(~n)*(1 + (~x)^2)^((~n)⨸2) + (~a)*(1 + (~x)^2)^(~n), (~x))^ (~p)⨸(1 + (~f)^2*(~x)^2)^((~n)*(~p) + 1), (~x), (~x), tan((~d) + (~e)*(~x))⨸(~f), "4_1_9_31")] : nothing) +# +# ("4_1_9_32", +# @rule ∫(cot((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~n2))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# eq((~n2), 2*(~n)) && +# !(ext_isinteger(((~m) - 1)/2)) && +# !eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(cot((~d) + (~e)*(~x)), (~x))}, -(~f)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*expand_to_sum( (~c)*(~x)^(2*(~n)) + (~b)*(~x)^(~n)*(1 + (~x)^2)^((~n)⨸2) + (~a)*(1 + (~x)^2)^(~n), (~x))^ (~p)⨸(1 + (~f)^2*(~x)^2)^((~n)*(~p) + 1), (~x), (~x), cot((~d) + (~e)*(~x))⨸(~f), "4_1_9_32")] : nothing) + +("4_1_9_33", +@rule ∫(tan((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + ext_isinteger((~m)/2) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n), (~p)) ? +∫(ext_expand( sin((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸(1 - sin((~d) + (~e)*(~x))^2)^((~m)⨸2), (~x)), (~x)) : nothing) + +("4_1_9_34", +@rule ∫(cot((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + ext_isinteger((~m)/2) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n), (~p)) ? +∫(ext_expand( cos((~d) + (~e)*(~x))^ (~m)*((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸(1 - cos((~d) + (~e)*(~x))^2)^((~m)⨸2), (~x)), (~x)) : nothing) + +# ("4_1_9_35", +# @rule ∫(cot((~!d) + (~!e)*(~x))^ (~!m)*((~a) + (~!b)*((~!f)*sin((~!d) + (~!e)*(~x)))^(~n) + (~!c)*((~!f)*sin((~!d) + (~!e)*(~x)))^(~!n2))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && +# ext_isinteger(((~m) - 1)/2) && +# ext_isinteger(2*(~p)) ? +# Module[{(~g) = free_factors(sin((~d) + (~e)*(~x)), (~x))}, (~g)^((~m) + 1)⨸(~e)* int_and_subst((1 - (~g)^2*(~x)^2)^(((~m) - 1)⨸ 2)*((~a) + (~b)*((~f)*(~g)*(~x))^(~n) + (~c)*((~f)*(~g)*(~x))^(2*(~n)))^(~p)⨸(~x)^(~m), (~x), (~x), sin((~d) + (~e)*(~x))⨸(~g), "4_1_9_35")] : nothing) +# +# ("4_1_9_36", +# @rule ∫(tan((~!d) + (~!e)*(~x))^ (~!m)*((~a) + (~!b)*((~!f)*cos((~!d) + (~!e)*(~x)))^(~n) + (~!c)*((~!f)*cos((~!d) + (~!e)*(~x)))^(~!n2))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~n), (~x)) && +# ext_isinteger(((~m) - 1)/2) && +# ext_isinteger(2*(~p)) ? +# Module[{(~g) = free_factors(cos((~d) + (~e)*(~x)), (~x))}, -(~g)^((~m) + 1)⨸(~e)* int_and_subst((1 - (~g)^2*(~x)^2)^(((~m) - 1)⨸ 2)*((~a) + (~b)*((~f)*(~g)*(~x))^(~n) + (~c)*((~f)*(~g)*(~x))^(2*(~n)))^(~p)⨸(~x)^(~m), (~x), (~x), cos((~d) + (~e)*(~x))⨸(~g), "4_1_9_36")] : nothing) + +("4_1_9_37", +@rule ∫(cot((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(cot((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_38", +@rule ∫(tan((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^ (~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~p)) ? +1⨸(4^(~p)*(~c)^(~p))*∫(tan((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_39", +@rule ∫(cot((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(cot((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*sin((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +("4_1_9_40", +@rule ∫(tan((~!d) + (~!e)*(~x))^ (~m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + eq((~n2), 2*(~n)) && + !(ext_isinteger(((~m) - 1)/2)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~p))) ? +((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^ (~p)⨸((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p))* ∫(tan((~d) + (~e)*(~x))^(~m)*((~b) + 2*(~c)*cos((~d) + (~e)*(~x))^(~n))^(2*(~p)), (~x)) : nothing) + +# ("4_1_9_41", +# @rule ∫(cot((~!d) + (~!e)*(~x))^ (~!m)*((~a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~n2))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(cot((~d) + (~e)*(~x)), (~x))}, -(~f)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*expand_to_sum((~c) + (~b)*(1 + (~f)^2*(~x)^2)^((~n)⨸2) + (~a)*(1 + (~f)^2*(~x)^2)^(~n), (~x))^(~p)⨸(1 + (~f)^2*(~x)^2)^((~n)*(~p) + 1), (~x), (~x), cot((~d) + (~e)*(~x))⨸(~f), "4_1_9_41")] : nothing) +# +# ("4_1_9_42", +# @rule ∫(tan((~!d) + (~!e)*(~x))^ (~!m)*((~a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~n2))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && +# eq((~n2), 2*(~n)) && +# ext_isinteger((~n)/2) && +# ext_isinteger((~p)) ? +# Module[{(~f) = free_factors(tan((~d) + (~e)*(~x)), (~x))}, (~f)^((~m) + 1)⨸(~e)* int_and_subst( (~x)^(~m)*expand_to_sum((~c) + (~b)*(1 + (~f)^2*(~x)^2)^((~n)⨸2) + (~a)*(1 + (~f)^2*(~x)^2)^(~n), (~x))^(~p)⨸(1 + (~f)^2*(~x)^2)^((~n)*(~p) + 1), (~x), (~x), tan((~d) + (~e)*(~x))⨸(~f), "4_1_9_42")] : nothing) + +("4_1_9_43", +@rule ∫(cot((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x))^(~!n) + (~!c)*sin((~!d) + (~!e)*(~x))^(~!n2))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + ext_isinteger((~m)/2) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n), (~p)) ? +∫(ext_expand((1 - sin((~d) + (~e)*(~x))^2)^((~m)⨸ 2)*((~a) + (~b)*sin((~d) + (~e)*(~x))^(~n) + (~c)*sin((~d) + (~e)*(~x))^(2*(~n)))^(~p)⨸ sin((~d) + (~e)*(~x))^(~m), (~x)), (~x)) : nothing) + +("4_1_9_44", +@rule ∫(tan((~!d) + (~!e)*(~x))^ (~!m)*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x))^(~!n) + (~!c)*cos((~!d) + (~!e)*(~x))^(~!n2))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~n2), 2*(~n)) && + ext_isinteger((~m)/2) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n), (~p)) ? +∫(ext_expand((1 - cos((~d) + (~e)*(~x))^2)^((~m)⨸ 2)*((~a) + (~b)*cos((~d) + (~e)*(~x))^(~n) + (~c)*cos((~d) + (~e)*(~x))^(2*(~n)))^(~p)⨸ cos((~d) + (~e)*(~x))^(~m), (~x)), (~x)) : nothing) + +("4_1_9_45", +@rule ∫(((~A) + (~!B)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*sin((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))^2)^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n)) ? +1⨸(4^(~n)*(~c)^(~n))* ∫(((~A) + (~B)*sin((~d) + (~e)*(~x)))*((~b) + 2*(~c)*sin((~d) + (~e)*(~x)))^(2*(~n)), (~x)) : nothing) + +("4_1_9_46", +@rule ∫(((~A) + (~!B)*cos((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*cos((~!d) + (~!e)*(~x))^2)^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n)) ? +1⨸(4^(~n)*(~c)^(~n))* ∫(((~A) + (~B)*cos((~d) + (~e)*(~x)))*((~b) + 2*(~c)*cos((~d) + (~e)*(~x)))^(2*(~n)), (~x)) : nothing) + +("4_1_9_47", +@rule ∫(((~A) + (~!B)*sin((~!d) + (~!e)*(~x)))*((~a) + (~!b)*sin((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))^2)^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~n))) ? +((~a) + (~b)*sin((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))^2)^ (~n)⨸((~b) + 2*(~c)*sin((~d) + (~e)*(~x)))^(2*(~n))* ∫(((~A) + (~B)*sin((~d) + (~e)*(~x)))*((~b) + 2*(~c)*sin((~d) + (~e)*(~x)))^(2*(~n)), (~x)) : nothing) + +("4_1_9_48", +@rule ∫(((~A) + (~!B)*cos((~!d) + (~!e)*(~x)))*((~a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*cos((~!d) + (~!e)*(~x))^2)^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + eq((~b)^2 - 4*(~a)*(~c), 0) && + !(ext_isinteger((~n))) ? +((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x))^2)^ (~n)⨸((~b) + 2*(~c)*cos((~d) + (~e)*(~x)))^(2*(~n))* ∫(((~A) + (~B)*cos((~d) + (~e)*(~x)))*((~b) + 2*(~c)*cos((~d) + (~e)*(~x)))^(2*(~n)), (~x)) : nothing) + +("4_1_9_49", +@rule ∫(((~A) + (~!B)*sin((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*sin((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +((~B) + ((~b)*(~B) - 2*(~A)*(~c))⨸rt((~b)^2 - 4*(~a)*(~c), 2))*∫(1⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*sin((~d) + (~e)*(~x))), (~x)) + ((~B) - ((~b)*(~B) - 2*(~A)*(~c))⨸rt((~b)^2 - 4*(~a)*(~c), 2))*∫(1⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*sin((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_9_50", +@rule ∫(((~A) + (~!B)*cos((~!d) + (~!e)*(~x)))/((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*cos((~!d) + (~!e)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) ? +((~B) + ((~b)*(~B) - 2*(~A)*(~c))⨸rt((~b)^2 - 4*(~a)*(~c), 2))*∫(1⨸((~b) + rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*cos((~d) + (~e)*(~x))), (~x)) + ((~B) - ((~b)*(~B) - 2*(~A)*(~c))⨸rt((~b)^2 - 4*(~a)*(~c), 2))*∫(1⨸((~b) - rt((~b)^2 - 4*(~a)*(~c), 2) + 2*(~c)*cos((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_1_9_51", +@rule ∫(((~A) + (~!B)*sin((~!d) + (~!e)*(~x)))*((~!a) + (~!b)*sin((~!d) + (~!e)*(~x)) + (~!c)*sin((~!d) + (~!e)*(~x))^2)^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n)) ? +∫(ext_expand(((~A) + (~B)*sin((~d) + (~e)*(~x)))*((~a) + (~b)*sin((~d) + (~e)*(~x)) + (~c)*sin((~d) + (~e)*(~x))^2)^(~n), (~x)), (~x)) : nothing) + +("4_1_9_52", +@rule ∫(((~A) + (~!B)*cos((~!d) + (~!e)*(~x)))*((~!a) + (~!b)*cos((~!d) + (~!e)*(~x)) + (~!c)*cos((~!d) + (~!e)*(~x))^2)^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~A), (~B), (~x)) && + !eq((~b)^2 - 4*(~a)*(~c), 0) && + ext_isinteger((~n)) ? +∫(ext_expand(((~A) + (~B)*cos((~d) + (~e)*(~x)))*((~a) + (~b)*cos((~d) + (~e)*(~x)) + (~c)*cos((~d) + (~e)*(~x))^2)^(~n), (~x)), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.1 (a+b tan)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.1 (a+b tan)^n.jl new file mode 100644 index 0000000..3985b38 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.1 (a+b tan)^n.jl @@ -0,0 +1,87 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.3.1.1 (a+b tan)^n *) +("4_3_1_1_1", +@rule ∫(((~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + gt((~n), 1) ? +(~b)*((~b)*tan((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)) - (~b)^2*∫(((~b)*tan((~c) + (~d)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_3_1_1_2", +@rule ∫(((~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + lt((~n), -1) ? +((~b)*tan((~c) + (~d)*(~x)))^((~n) + 1)⨸((~b)*(~d)*((~n) + 1)) - 1⨸(~b)^2*∫(((~b)*tan((~c) + (~d)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_3_1_1_3", +@rule ∫(tan((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~x)) ? +-log(cos((~c) + (~d)*(~x)))⨸(~d) : nothing) + +#(* Int[1/tan[c_.+d_.*x_],x_Symbol] := Log[RemoveContent[Sin[c+d*x],x]]/d /; FreeQ[{c,d},x] *) +("4_3_1_1_4", +@rule ∫(((~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~n), (~x)) && + !(ext_isinteger((~n))) ? +(~b)⨸(~d)*int_and_subst((~x)^(~n)⨸((~b)^2 + (~x)^2), (~x), (~x), (~b)*tan((~c) + (~d)*(~x)), "4_3_1_1_4") : nothing) + +("4_3_1_1_5", +@rule ∫(((~a) + (~!b)*tan((~!c) + (~!d)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) ? +((~a)^2 - (~b)^2)*(~x) + (~b)^2*tan((~c) + (~d)*(~x))⨸(~d) + 2*(~a)*(~b)*∫(tan((~c) + (~d)*(~x)), (~x)) : nothing) + +#(* Int[(a_+b_.*tan[c_.+d_.*x_])^n_,x_Symbol] := Int[ExpandIntegrand[(a+b*Tan[c+d*x])^n,x],x] /; FreeQ[{a,b,c,d},x] && IGtQ[n,0] *) +("4_3_1_1_6", +@rule ∫(((~a) + (~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + gt((~n), 1) ? +(~b)*((~a) + (~b)*tan((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)) + 2*(~a)*∫(((~a) + (~b)*tan((~c) + (~d)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_3_1_1_7", +@rule ∫(((~a) + (~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + lt((~n), 0) ? +(~a)*((~a) + (~b)*tan((~c) + (~d)*(~x)))^(~n)⨸(2*(~b)*(~d)*(~n)) + 1⨸(2*(~a))*∫(((~a) + (~b)*tan((~c) + (~d)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_3_1_1_8", +@rule ∫(sqrt((~a) + (~!b)*tan((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +-2*(~b)⨸(~d)*int_and_subst(1⨸(2*(~a) - (~x)^2), (~x), (~x), sqrt((~a) + (~b)*tan((~c) + (~d)*(~x))), "4_3_1_1_8") : nothing) + +("4_3_1_1_9", +@rule ∫(((~a) + (~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +-(~b)⨸(~d)*int_and_subst(((~a) + (~x))^((~n) - 1)⨸((~a) - (~x)), (~x), (~x), (~b)*tan((~c) + (~d)*(~x)), "4_3_1_1_9") : nothing) + +("4_3_1_1_10", +@rule ∫(((~a) + (~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + gt((~n), 1) ? +(~b)*((~a) + (~b)*tan((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)) + ∫(((~a)^2 - (~b)^2 + 2*(~a)*(~b)*tan((~c) + (~d)*(~x)))*((~a) + (~b)*tan((~c) + (~d)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_3_1_1_11", +@rule ∫(((~a) + (~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) ? +(~b)*((~a) + (~b)*tan((~c) + (~d)*(~x)))^((~n) + 1)⨸((~d)*((~n) + 1)*((~a)^2 + (~b)^2)) + 1⨸((~a)^2 + (~b)^2)* ∫(((~a) - (~b)*tan((~c) + (~d)*(~x)))*((~a) + (~b)*tan((~c) + (~d)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_3_1_1_12", +@rule ∫(1/((~a) + (~!b)*tan((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +(~a)*(~x)⨸((~a)^2 + (~b)^2) + (~b)⨸((~a)^2 + (~b)^2)*∫(((~b) - (~a)*tan((~c) + (~d)*(~x)))⨸((~a) + (~b)*tan((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_3_1_1_13", +@rule ∫(((~a) + (~!b)*tan((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +(~b)⨸(~d)*int_and_subst(((~a) + (~x))^(~n)⨸((~b)^2 + (~x)^2), (~x), (~x), (~b)*tan((~c) + (~d)*(~x)), "4_3_1_1_13") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.2 (d sec)^m (a+b tan)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.2 (d sec)^m (a+b tan)^n.jl new file mode 100644 index 0000000..9cb713d --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.2 (d sec)^m (a+b tan)^n.jl @@ -0,0 +1,248 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.3.1.2 (d sec)^m (a+b tan)^n *) +("4_3_1_2_1", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + ( + ext_isinteger(2*(~m)) || + !eq((~a)^2 + (~b)^2, 0) + ) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)⨸((~f)*(~m)) + (~a)*∫(((~d)*sec((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_3_1_2_2", +@rule ∫(sec((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + ext_isinteger((~m)/2) ? +1⨸((~a)^((~m) - 2)*(~b)*(~f))* int_and_subst(((~a) - (~x))^((~m)⨸2 - 1)*((~a) + (~x))^((~n) + (~m)⨸2 - 1), (~x), (~x), (~b)*tan((~e) + (~f)*(~x)), "4_3_1_2_2") : nothing) + +("4_3_1_2_3", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + eq(simplify((~m) + (~n)), 0) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(~m)) : nothing) + +("4_3_1_2_4", +@rule ∫(sec((~!e) + (~!f)*(~x))/sqrt((~a) + (~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +-2*(~a)⨸((~b)*(~f))* int_and_subst(1⨸(2 - (~a)*(~x)^2), (~x), (~x), sec((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*tan((~e) + (~f)*(~x))), "4_3_1_2_4") : nothing) + +("4_3_1_2_5", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + eq((~m)/2 + (~n), 0) && + gt((~n), 0) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(~m)) + (~a)⨸(2*(~d)^2)* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) + 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_3_1_2_6", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + eq((~m)/2 + (~n), 0) && + lt((~n), -1) ? +2*(~d)^2*((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)* (~f)*((~m) - 2)) + 2*(~d)^2⨸(~a)* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_3_1_2_7", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + eq(simplify((~m)/2 + (~n)), 0) ? +((~a)⨸(~d))^(2*intpart((~n)))*((~a) + (~b)*tan((~e) + (~f)*(~x)))^ fracpart((~n))*((~a) - (~b)*tan((~e) + (~f)*(~x)))^ fracpart((~n))⨸((~d)*sec((~e) + (~f)*(~x)))^(2*fracpart((~n)))* ∫(1⨸((~a) - (~b)*tan((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_3_1_2_8", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + eq(simplify((~m)/2 + (~n) - 1), 0) ? +2*(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~m)) : nothing) + +("4_3_1_2_9", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + igt(simplify((~m)/2 + (~n) - 1), 0) && + !(ext_isinteger((~n))) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) + (~n) - 1)) + (~a)*((~m) + 2*(~n) - 2)⨸((~m) + (~n) - 1)* ∫(((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_3_1_2_10", +@rule ∫(sqrt((~!d)*sec((~!e) + (~!f)*(~x)))*sqrt((~a) + (~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +-4*(~b)*(~d)^2⨸(~f)* int_and_subst((~x)^2⨸((~a)^2 + (~d)^2*(~x)^4), (~x), (~x), sqrt((~a) + (~b)*tan((~e) + (~f)*(~x)))⨸sqrt((~d)*sec((~e) + (~f)*(~x))), "4_3_1_2_10") : nothing) + +("4_3_1_2_11", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + gt((~n), 1) && + ( + igt((~n)/2, 0) && + ilt((~m) - 1/2, 0) || + eq((~n), 2) && + lt((~m), 0) || + le((~m), -1) && + gt((~m) + (~n), 0) || + ilt((~m), 0) && + lt((~m)/2 + (~n) - 1, 0) && + ext_isinteger((~n)) || + eq((~n), 3/2) && + eq((~m), -1/2) + ) && + ext_isinteger(2*(~m)) ? +2*(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(~m)) - (~b)^2*((~m) + 2*(~n) - 2)⨸((~d)^2*(~m))* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) + 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_3_1_2_12", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + gt((~n), 0) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(~m)) + (~a)*((~m) + (~n))⨸((~m)*(~d)^2)* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) + 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_3_1_2_13", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + gt((~n), 0) && + !eq((~m) + (~n) - 1, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) + (~n) - 1)) + (~a)*((~m) + 2*(~n) - 2)⨸((~m) + (~n) - 1)* ∫(((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_3_1_2_14", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(3//2)/sqrt((~a) + (~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +(~d)*sec((~e) + (~f)*(~x))⨸(sqrt((~a) - (~b)*tan((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*tan((~e) + (~f)*(~x))))* ∫(sqrt((~d)*sec((~e) + (~f)*(~x)))*sqrt((~a) - (~b)*tan((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_3_1_2_15", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + lt((~n), -1) && + ( + ilt((~n)/2, 0) && + igt((~m) - 1/2, 0) || + eq((~n), -2) || + igt((~m) + (~n), 0) || + ext_isinteger((~n), (~m) + 1/2) && + gt(2*(~m) + (~n) + 1, 0) + ) && + ext_isinteger(2*(~m)) ? +2*(~d)^2*((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)* (~f)*((~m) + 2*(~n))) - (~d)^2*((~m) - 2)⨸((~b)^2*((~m) + 2*(~n)))* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 2), (~x)) : nothing) + +("4_3_1_2_16", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + lt((~n), 0) && + gt((~m), 1) && + !(ilt((~m) + (~n), 0)) && + !eq((~m) + (~n) - 1, 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~d)^2*((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 1)⨸((~b)* (~f)*((~m) + (~n) - 1)) + (~d)^2*((~m) - 2)⨸((~a)*((~m) + (~n) - 1))* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_3_1_2_17", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + lt((~n), 0) && + !eq((~m) + 2*(~n), 0) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~a)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n)⨸((~b)*(~f)*((~m) + 2*(~n))) + simplify((~m) + (~n))⨸((~a)*((~m) + 2*(~n)))* ∫(((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_3_1_2_18", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + igt(simplify((~m) + (~n) - 1), 0) && + isrational((~n)) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^ (~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*simplify((~m) + (~n) - 1)) + (~a)*((~m) + 2*(~n) - 2)⨸simplify((~m) + (~n) - 1)* ∫(((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_3_1_2_19", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) && + ilt(simplify((~m) + (~n)), 0) && + !eq((~m) + 2*(~n), 0) ? +(~a)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n)⨸((~b)*(~f)*((~m) + 2*(~n))) + simplify((~m) + (~n))⨸((~a)*((~m) + 2*(~n)))* ∫(((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +#(* Int[(d_.*sec[e_.+f_.*x_])^m_.*(a_+b_.*tan[e_.+f_.*x_])^n_,x_Symbol] := a^n*(d*Sec[e+f*x])^m/(b*f*(Sec[e+f*x]^2)^(m/2))*Subst[Int[(1+x/a)^( n+m/2-1)*(1-x/a)^(m/2-1),x],x,b*Tan[e+f*x]] /; FreeQ[{a,b,d,e,f,m},x] && EqQ[a^2+b^2,0] && IntegerQ[n] *) +#(* Int[(d_.*sec[e_.+f_.*x_])^m_.*(a_+b_.*tan[e_.+f_.*x_])^n_,x_Symbol] := (d*Sec[e+f*x])^m/(b*f*(Sec[e+f*x]^2)^(m/2))*Subst[Int[(a+x)^n*(1+x^ 2/b^2)^(m/2-1),x],x,b*Tan[e+f*x]] /; FreeQ[{a,b,d,e,f,m,n},x] && EqQ[a^2+b^2,0] *) +("4_3_1_2_20", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +((~d)*sec((~e) + (~f)*(~x)))^ (~m)⨸(((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~m)⨸2)*((~a) - (~b)*tan((~e) + (~f)*(~x)))^((~m)⨸2))* ∫(((~a) + (~b)*tan((~e) + (~f)*(~x)))^((~m)⨸2 + (~n))*((~a) - (~b)*tan((~e) + (~f)*(~x)))^((~m)⨸2), (~x)) : nothing) + +("4_3_1_2_21", +@rule ∫(sec((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + ext_isinteger((~m)/2) ? +1⨸((~b)*(~f))* int_and_subst(((~a) + (~x))^(~n)*(1 + (~x)^2⨸(~b)^2)^((~m)⨸2 - 1), (~x), (~x), (~b)*tan((~e) + (~f)*(~x)), "4_3_1_2_21") : nothing) + +("4_3_1_2_22", +@rule ∫(((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^2/sec((~!e) + (~!f)*(~x)),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +(~b)^2*atanh(sin((~e) + (~f)*(~x)))⨸(~f) - 2*(~a)*(~b)*cos((~e) + (~f)*(~x))⨸(~f) + ((~a)^2 - (~b)^2)*sin((~e) + (~f)*(~x))⨸(~f) : nothing) + +("4_3_1_2_23", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + !eq((~m), -1) ? +(~b)*((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))⨸((~f)*((~m) + 1)) + 1⨸((~m) + 1)* ∫(((~d)*sec((~e) + (~f)*(~x)))^ (~m)*((~a)^2*((~m) + 1) - (~b)^2 + (~a)*(~b)*((~m) + 2)*tan((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_3_1_2_24", +@rule ∫(sec((~!e) + (~!f)*(~x))/((~a) + (~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 + (~b)^2, 0) ? +-1⨸(~f)*int_and_subst(1⨸((~a)^2 + (~b)^2 - (~x)^2), (~x), (~x), ((~b) - (~a)*tan((~e) + (~f)*(~x)))⨸sec((~e) + (~f)*(~x)), "4_3_1_2_24") : nothing) + +("4_3_1_2_25", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~m)/((~a) + (~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + igt((~m), 1) ? +-(~d)^2⨸(~b)^2*∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)*((~a) - (~b)*tan((~e) + (~f)*(~x))), (~x)) + (~d)^2*((~a)^2 + (~b)^2)⨸(~b)^2* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) - 2)⨸((~a) + (~b)*tan((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_3_1_2_26", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~m)/((~a) + (~!b)*tan((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + ilt((~m), 0) ? +1⨸((~a)^2 + (~b)^2)*∫(((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) - (~b)*tan((~e) + (~f)*(~x))), (~x)) + (~b)^2⨸((~d)^2*((~a)^2 + (~b)^2))* ∫(((~d)*sec((~e) + (~f)*(~x)))^((~m) + 2)⨸((~a) + (~b)*tan((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_3_1_2_27", +@rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + !eq((~a)^2 + (~b)^2, 0) && + !(ext_isinteger((~m)/2)) ? +(~d)^(2*intpart((~m)⨸2))*((~d)*sec((~e) + (~f)*(~x)))^(2*fracpart((~m)⨸2))⨸((~b)* (~f)*(sec((~e) + (~f)*(~x))^2)^fracpart((~m)⨸2))* int_and_subst(((~a) + (~x))^(~n)*(1 + (~x)^2⨸(~b)^2)^((~m)⨸2 - 1), (~x), (~x), (~b)*tan((~e) + (~f)*(~x)), "4_3_1_2_27") : nothing) + +("4_3_1_2_28", +@rule ∫(sqrt((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))/sqrt((~!d)*cos((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +-4*(~b)⨸(~f)* int_and_subst((~x)^2⨸((~a)^2*(~d)^2 + (~x)^4), (~x), (~x), sqrt((~d)*cos((~e) + (~f)*(~x)))*sqrt((~a) + (~b)*tan((~e) + (~f)*(~x))), "4_3_1_2_28") : nothing) + +("4_3_1_2_29", +@rule ∫(1/(((~!d)*cos((~!e) + (~!f)*(~x)))^(3//2)* sqrt((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 + (~b)^2, 0) ? +1⨸((~d)*cos((~e) + (~f)*(~x))*sqrt((~a) - (~b)*tan((~e) + (~f)*(~x)))* sqrt((~a) + (~b)*tan((~e) + (~f)*(~x))))* ∫(sqrt((~a) - (~b)*tan((~e) + (~f)*(~x)))⨸sqrt((~d)*cos((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_3_1_2_30", +@rule ∫(((~!d)*cos((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*cos((~e) + (~f)*(~x)))^(~m)*((~d)*sec((~e) + (~f)*(~x)))^(~m)* ∫(((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n)⨸((~d)*sec((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.3 (d sin)^m (a+b tan)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.3 (d sin)^m (a+b tan)^n.jl new file mode 100644 index 0000000..1f8042f --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.3 Tangent/4.3.1.3 (d sin)^m (a+b tan)^n.jl @@ -0,0 +1,49 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.3.1.3 (d sin)^m (a+b tan)^n *) +("4_3_1_3_1", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~n), (~x)) && + ext_isinteger((~m)/2) ? +(~b)⨸(~f)*int_and_subst((~x)^(~m)*((~a) + (~x))^(~n)⨸((~b)^2 + (~x)^2)^((~m)⨸2 + 1), (~x), (~x), (~b)*tan((~e) + (~f)*(~x)), "4_3_1_3_1") : nothing) + +("4_3_1_3_2", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger(((~m) - 1)/2) && + igt((~n), 0) ? +∫(ext_expand(sin((~e) + (~f)*(~x))^(~m)*((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_3_1_3_3", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ilt((~n), 0) && + ( + lt((~m), 5) && + gt((~n), -4) || + eq((~m), 5) && + eq((~n), -1) + ) ? +∫(sin((~e) + (~f)*(~x))^(~m)*((~a)*cos((~e) + (~f)*(~x)) + (~b)*sin((~e) + (~f)*(~x)))^(~n)⨸ cos((~e) + (~f)*(~x))^(~n), (~x)) : nothing) + +("4_3_1_3_4", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*csc((~e) + (~f)*(~x)))^fracpart((~m))*(sin((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫(((~a) + (~b)*tan((~e) + (~f)*(~x)))^(~n)⨸(sin((~e) + (~f)*(~x))⨸(~d))^(~m), (~x)) : nothing) + +("4_3_1_3_5", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!m)* sin((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*tan((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~p), (~x)) && + ext_isinteger((~n)) ? +∫(cos((~e) + (~f)*(~x))^((~m) - (~n))* sin((~e) + (~f)*(~x))^(~p)*((~a)*cos((~e) + (~f)*(~x)) + (~b)*sin((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_3_1_3_6", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)* cos((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*cot((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~p), (~x)) && + ext_isinteger((~n)) ? +∫(sin((~e) + (~f)*(~x))^((~m) - (~n))* cos((~e) + (~f)*(~x))^(~p)*((~a)*sin((~e) + (~f)*(~x)) + (~b)*cos((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.1 (a+b sec)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.1 (a+b sec)^n.jl new file mode 100644 index 0000000..9164483 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.1 (a+b sec)^n.jl @@ -0,0 +1,145 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.5.1.1 (a+b sec)^n *) +("4_5_1_1_1", +@rule ∫(csc((~!c) + (~!d)*(~x))^(~n),(~x)) => + !contains_var((~c), (~d), (~x)) && + igt((~n)/2, 0) ? +-1⨸(~d)*int_and_subst(ext_expand((1 + (~x)^2)^((~n)⨸2 - 1), (~x)), (~x), (~x), cot((~c) + (~d)*(~x)), "4_5_1_1_1") : nothing) + +("4_5_1_1_2", +@rule ∫(((~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + gt((~n), 1) && + ext_isinteger(2*(~n)) ? +-(~b)*cos((~c) + (~d)*(~x))*((~b)*csc((~c) + (~d)*(~x)))^((~n) - 1)⨸((~d)*((~n) - 1)) + (~b)^2*((~n) - 2)⨸((~n) - 1)*∫(((~b)*csc((~c) + (~d)*(~x)))^((~n) - 2), (~x)) : nothing) + +("4_5_1_1_3", +@rule ∫(((~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + lt((~n), -1) && + ext_isinteger(2*(~n)) ? +cos((~c) + (~d)*(~x))*((~b)*csc((~c) + (~d)*(~x)))^((~n) + 1)⨸((~b)*(~d)*(~n)) + ((~n) + 1)⨸((~b)^2*(~n))*∫(((~b)*csc((~c) + (~d)*(~x)))^((~n) + 2), (~x)) : nothing) + +#(* original line: Int[csc[c_. + d_.*x_], x_Symbol] := (* -ArcCoth[Cos[c+d*x]]/d /; *) -ArcTanh[Cos[c + d*x]]/d /; FreeQ[{c, d}, x] *) +("4_5_1_1_4", +@rule ∫(csc((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~x)) ? +-atanh(cos((~c) + (~d)*(~x)))⨸(~d) : nothing) + +("4_5_1_1_4_1", +@rule ∫(sec((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~c), (~d), (~x)) ? +atanh(sin((~c) + (~d)*(~x)))⨸(~d) : nothing) + +#(* Int[1/csc[c_.+d_.*x_],x_Symbol] := -Cos[c+d*x]/d /; FreeQ[{c,d},x] *) +("4_5_1_1_5", +@rule ∫(((~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~x)) && + eq((~n)^2, 1/4) ? +((~b)*csc((~c) + (~d)*(~x)))^(~n)*sin((~c) + (~d)*(~x))^(~n)*∫(1⨸sin((~c) + (~d)*(~x))^(~n), (~x)) : nothing) + +("4_5_1_1_6", +@rule ∫(((~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~b), (~c), (~d), (~n), (~x)) && + !(ext_isinteger((~n))) ? +((~b)*csc((~c) + (~d)*(~x)))^((~n) - 1)*((sin((~c) + (~d)*(~x))⨸(~b))^((~n) - 1)* ∫(1⨸(sin((~c) + (~d)*(~x))⨸(~b))^(~n), (~x))) : nothing) + +("4_5_1_1_7", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) ? +(~a)^2*(~x) + 2*(~a)*(~b)*∫(csc((~c) + (~d)*(~x)), (~x)) + (~b)^2*∫(csc((~c) + (~d)*(~x))^2, (~x)) : nothing) + +("4_5_1_1_8", +@rule ∫(sqrt((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-2*(~b)⨸(~d)* int_and_subst(1⨸((~a) + (~x)^2), (~x), (~x), (~b)*cot((~c) + (~d)*(~x))⨸sqrt((~a) + (~b)*csc((~c) + (~d)*(~x))), "4_5_1_1_8") : nothing) + +("4_5_1_1_9", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~n), 1) && + ext_isinteger(2*(~n)) ? +-(~b)^2*cot((~c) + (~d)*(~x))*((~a) + (~b)*csc((~c) + (~d)*(~x)))^((~n) - 2)⨸((~d)*((~n) - 1)) + (~a)⨸((~n) - 1)* ∫(((~a) + (~b)*csc((~c) + (~d)*(~x)))^((~n) - 2)*((~a)*((~n) - 1) + (~b)*(3*(~n) - 4)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_1_10", +@rule ∫(1/sqrt((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +1⨸(~a)*∫(sqrt((~a) + (~b)*csc((~c) + (~d)*(~x))), (~x)) - (~b)⨸(~a)*∫(csc((~c) + (~d)*(~x))⨸sqrt((~a) + (~b)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_1_11", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + le((~n), -1) && + ext_isinteger(2*(~n)) ? +-cot((~c) + (~d)*(~x))*((~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n)⨸((~d)*(2*(~n) + 1)) + 1⨸((~a)^2*(2*(~n) + 1))* ∫(((~a) + (~b)*csc((~c) + (~d)*(~x)))^((~n) + 1)*((~a)*(2*(~n) + 1) - (~b)*((~n) + 1)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_1_12", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger(2*(~n))) && + gt((~a), 0) ? +(~a)^(~n)*cot( (~c) + (~d)*(~x))⨸((~d)*sqrt(1 + csc((~c) + (~d)*(~x)))*sqrt(1 - csc((~c) + (~d)*(~x))))* int_and_subst((1 + (~b)*(~x)⨸(~a))^((~n) - 1⨸2)⨸((~x)*sqrt(1 - (~b)*(~x)⨸(~a))), (~x), (~x), csc((~c) + (~d)*(~x)), "4_5_1_1_12") : nothing) + +("4_5_1_1_13", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger(2*(~n))) && + !(gt((~a), 0)) ? +(~a)^intpart((~n))*((~a) + (~b)*csc((~c) + (~d)*(~x)))^ fracpart((~n))⨸(1 + (~b)⨸(~a)*csc((~c) + (~d)*(~x)))^fracpart((~n))* ∫((1 + (~b)⨸(~a)*csc((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + +("4_5_1_1_14", +@rule ∫(sqrt((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*((~a) + (~b)*csc((~c) + (~d)*(~x)))⨸((~d)*rt((~a) + (~b), 2)*cot((~c) + (~d)*(~x)))* sqrt((~b)*(1 + csc((~c) + (~d)*(~x)))⨸((~a) + (~b)*csc((~c) + (~d)*(~x))))* sqrt(-(~b)*(1 - csc((~c) + (~d)*(~x)))⨸((~a) + (~b)*csc((~c) + (~d)*(~x))))* elliptic_pi((~a)⨸((~a) + (~b)), asin(rt((~a) + (~b), 2)⨸sqrt((~a) + (~b)*csc((~c) + (~d)*(~x)))), ((~a) - (~b))⨸((~a) + (~b))) : nothing) + +("4_5_1_1_15", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +∫(((~a)^2 + (~b)*(2*(~a) - (~b))*csc((~c) + (~d)*(~x)))⨸sqrt((~a) + (~b)*csc((~c) + (~d)*(~x))), (~x)) + (~b)^2* ∫(csc((~c) + (~d)*(~x))*(1 + csc((~c) + (~d)*(~x)))⨸sqrt((~a) + (~b)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_1_16", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~n), 2) && + ext_isinteger(2*(~n)) ? +-(~b)^2*cot((~c) + (~d)*(~x))*((~a) + (~b)*csc((~c) + (~d)*(~x)))^((~n) - 2)⨸((~d)*((~n) - 1)) + 1⨸((~n) - 1)*∫(((~a) + (~b)*csc((~c) + (~d)*(~x)))^((~n) - 3)* simp((~a)^3*((~n) - 1) + ((~b)*((~b)^2*((~n) - 2) + 3*(~a)^2*((~n) - 1)))* csc((~c) + (~d)*(~x)) + ((~a)*(~b)^2*(3*(~n) - 4))*csc((~c) + (~d)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_1_17", +@rule ∫(1/((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~x)⨸(~a) - 1⨸(~a)*∫(1⨸(1 + (~a)⨸(~b)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_1_18", +@rule ∫(1/sqrt((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +2*rt((~a) + (~b), 2)⨸((~a)*(~d)*cot((~c) + (~d)*(~x)))* sqrt((~b)*(1 - csc((~c) + (~d)*(~x)))⨸((~a) + (~b)))* sqrt(-(~b)*(1 + csc((~c) + (~d)*(~x)))⨸((~a) - (~b)))* elliptic_pi(((~a) + (~b))⨸(~a), asin(sqrt((~a) + (~b)*csc((~c) + (~d)*(~x)))⨸rt((~a) + (~b), 2)), ((~a) + (~b))⨸((~a) - (~b))) : nothing) + +("4_5_1_1_19", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~n), -1) && + ext_isinteger(2*(~n)) ? +(~b)^2*cot( (~c) + (~d)*(~x))*((~a) + (~b)*csc((~c) + (~d)*(~x)))^((~n) + 1)⨸((~a)*(~d)*((~n) + 1)*((~a)^2 - (~b)^2)) + 1⨸((~a)*((~n) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*csc((~c) + (~d)*(~x)))^((~n) + 1)* simp(((~a)^2 - (~b)^2)*((~n) + 1) - (~a)*(~b)*((~n) + 1)*csc((~c) + (~d)*(~x)) + (~b)^2*((~n) + 2)*csc((~c) + (~d)*(~x))^2, (~x)), (~x)) : nothing) + +# ("4_5_1_1_20", +# @rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && +# !eq((~a)^2 - (~b)^2, 0) && +# !(ext_isinteger(2*(~n))) ? +# Unintegrable[((~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.2 (d sec)^n (a+b sec)^m.jl b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.2 (d sec)^n (a+b sec)^m.jl new file mode 100644 index 0000000..555e05f --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.2 (d sec)^n (a+b sec)^m.jl @@ -0,0 +1,663 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.5.1.2 (d sec)^n (a+b sec)^m *) +("4_5_1_2_1", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*((~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) ? +(~a)*∫(((~d)*csc((~e) + (~f)*(~x)))^(~n), (~x)) + (~b)⨸(~d)*∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_5_1_2_2", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^2*((~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) ? +2*(~a)*(~b)⨸(~d)*∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1), (~x)) + ∫(((~d)*csc((~e) + (~f)*(~x)))^(~n)*((~a)^2 + (~b)^2*csc((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_5_1_2_3", +@rule ∫(csc((~!e) + (~!f)*(~x))^2/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) ? +1⨸(~b)*∫(csc((~e) + (~f)*(~x)), (~x)) - (~a)⨸(~b)*∫(csc((~e) + (~f)*(~x))⨸((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_4", +@rule ∫(csc((~!e) + (~!f)*(~x))^3/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) ? +-cot((~e) + (~f)*(~x))⨸((~b)*(~f)) - (~a)⨸(~b)*∫(csc((~e) + (~f)*(~x))^2⨸((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_5", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + igt((~m), 0) && + isrational((~n)) ? +∫(ext_expand(((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)*((~d)*csc((~e) + (~f)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_5_1_2_6", +@rule ∫(csc((~!e) + (~!f)*(~x))*sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-2*(~b)*cot((~e) + (~f)*(~x))⨸((~f)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))) : nothing) + +("4_5_1_2_7", +@rule ∫(csc((~!e) + (~!f)*(~x))*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 1/2) && + ext_isinteger(2*(~m)) ? +-(~b)*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1)⨸((~f)*(~m)) + (~a)*(2*(~m) - 1)⨸(~m)*∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1), (~x)) : nothing) + +("4_5_1_2_8", +@rule ∫(csc((~!e) + (~!f)*(~x))/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-cot((~e) + (~f)*(~x))⨸((~f)*((~b) + (~a)*csc((~e) + (~f)*(~x)))) : nothing) + +("4_5_1_2_9", +@rule ∫(csc((~!e) + (~!f)*(~x))/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-2⨸(~f)*int_and_subst(1⨸(2*(~a) + (~x)^2), (~x), (~x), (~b)*cot((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), "4_5_1_2_9") : nothing) + +("4_5_1_2_10", +@rule ∫(csc((~!e) + (~!f)*(~x))*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1/2) && + ext_isinteger(2*(~m)) ? +(~b)*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)⨸((~a)*(~f)*(2*(~m) + 1)) + ((~m) + 1)⨸((~a)*(2*(~m) + 1))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_5_1_2_11", +@rule ∫(csc((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1/2) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)⨸((~f)*(2*(~m) + 1)) + (~m)⨸((~b)*(2*(~m) + 1))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_5_1_2_12", +@rule ∫(csc((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)⨸((~f)*((~m) + 1)) + (~a)*(~m)⨸((~b)*((~m) + 1))*∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m), (~x)) : nothing) + +("4_5_1_2_13", +@rule ∫(csc((~!e) + (~!f)*(~x))^3*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1/2) ? +(~b)*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)⨸((~a)*(~f)*(2*(~m) + 1)) - 1⨸((~a)^2*(2*(~m) + 1))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~a)*(~m) - (~b)*(2*(~m) + 1)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_14", +@rule ∫(csc((~!e) + (~!f)*(~x))^3*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1/2)) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + 1⨸((~b)*((~m) + 2))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~b)*((~m) + 1) - (~a)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_15", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*sqrt((~!d)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~a)*(~d)/(~b), 0) ? +-2*(~a)⨸((~b)*(~f))*sqrt((~a)*(~d)⨸(~b))* int_and_subst(1⨸sqrt(1 + (~x)^2⨸(~a)), (~x), (~x), (~b)*cot((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), "4_5_1_2_15") : nothing) + +("4_5_1_2_16", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*sqrt((~!d)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(gt((~a)*(~d)/(~b), 0)) ? +-2*(~b)*(~d)⨸(~f)* int_and_subst(1⨸((~b) - (~d)*(~x)^2), (~x), (~x), (~b)*cot((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*sqrt((~d)*csc((~e) + (~f)*(~x)))), "4_5_1_2_16") : nothing) + +("4_5_1_2_17", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~n), 1) && + ext_isinteger(2*(~n)) ? +-2*(~b)*(~d)* cot((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(2*(~n) - 1)* sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))) + 2*(~a)*(~d)*((~n) - 1)⨸((~b)*(2*(~n) - 1))* ∫(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_5_1_2_18", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))/sqrt((~!d)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-2*(~a)*cot( (~e) + (~f)*(~x))⨸((~f)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*sqrt((~d)*csc((~e) + (~f)*(~x)))) : nothing) + +("4_5_1_2_19", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~n), -1/2) && + ext_isinteger(2*(~n)) ? +(~a)*cot( (~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~n)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))) + (~a)*(2*(~n) + 1)⨸(2*(~b)*(~d)*(~n))* ∫(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_5_1_2_20", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +(~a)^2*(~d)* cot((~e) + (~f)*(~x))⨸((~f)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*sqrt((~a) - (~b)*csc((~e) + (~f)*(~x))))* int_and_subst(((~d)*(~x))^((~n) - 1)⨸sqrt((~a) - (~b)*(~x)), (~x), (~x), csc((~e) + (~f)*(~x)), "4_5_1_2_20") : nothing) + +("4_5_1_2_21", +@rule ∫(sqrt((~!d)*csc((~!e) + (~!f)*(~x)))/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~d) - (~a)/(~b), 0) && + gt((~a), 0) ? +-sqrt(2)*sqrt((~a))⨸((~b)*(~f))* int_and_subst(1⨸sqrt(1 + (~x)^2), (~x), (~x), (~b)*cot((~e) + (~f)*(~x))⨸((~a) + (~b)*csc((~e) + (~f)*(~x))), "4_5_1_2_21") : nothing) + +("4_5_1_2_22", +@rule ∫(sqrt((~!d)*csc((~!e) + (~!f)*(~x)))/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-2*(~b)*(~d)⨸((~a)*(~f))* int_and_subst(1⨸(2*(~b) - (~d)*(~x)^2), (~x), (~x), (~b)*cot((~e) + (~f)*(~x))⨸(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*sqrt((~d)*csc((~e) + (~f)*(~x)))), "4_5_1_2_22") : nothing) + +("4_5_1_2_23", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~n), 0) && + gt((~m), 1/2) && + ext_isinteger(2*(~m)) ? +-(~a)*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)⨸((~f)*(~m)) + (~b)*(2*(~m) - 1)⨸((~d)*(~m))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_5_1_2_24", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~n), 0) && + lt((~m), -1/2) && + ext_isinteger(2*(~m)) ? +(~b)*(~d)*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)*(~f)*(2*(~m) + 1)) + (~d)*((~m) + 1)⨸((~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1), (~x)) : nothing) + +("4_5_1_2_25", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~n) + 1, 0) && + lt((~m), -1/2) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*(2*(~m) + 1)) + (~m)⨸((~a)*(2*(~m) + 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_5_1_2_26", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + eq((~m) + (~n) + 1, 0) && + !(lt((~m), -1/2)) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*((~m) + 1)) + (~a)*(~m)⨸((~b)*(~d)*((~m) + 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1), (~x)) : nothing) + +("4_5_1_2_27", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 1) && + ( + lt((~n), -1) || + eq((~m), 3/2) && + eq((~n), -1/2) + ) && + ext_isinteger(2*(~m)) ? +(~b)^2*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)⨸((~f)*(~n)) - (~a)⨸((~d)*(~n))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)*((~b)*((~m) - 2*(~n) - 2) - (~a)*((~m) + 2*(~n) - 1)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_28", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~m), 1) && + !eq((~m) + (~n) - 1, 0) && + ext_isinteger(2*(~m)) ? +-(~b)^2*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)⨸((~f)*((~m) + (~n) - 1)) + (~b)⨸((~m) + (~n) - 1)* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)*((~b)*((~m) + 2*(~n) - 1) + (~a)*(3*(~m) + 2*(~n) - 4)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_29", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + lt(1, (~n), 2) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m)) + ) ? +(~b)*(~d)*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)*(~f)*(2*(~m) + 1)) - (~d)⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)*((~a)*((~n) - 1) - (~b)*((~m) + (~n))*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_30", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + gt((~n), 2) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m)) + ) ? +-(~d)^2*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)⨸((~f)*(2*(~m) + 1)) + (~d)^2⨸((~a)*(~b)*(2*(~m) + 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)*((~b)*((~n) - 2) + (~a)*((~m) - (~n) + 2)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_31", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ( + ext_isinteger(2*(~m), 2*(~n)) || + ext_isinteger((~m)) + ) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*(2*(~m) + 1)) + 1⨸((~a)^2*(2*(~m) + 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)*((~a)*(2*(~m) + (~n) + 1) - (~b)*((~m) + (~n) + 1)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_32", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~n), 1) ? +(~d)^2*cot( (~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)⨸((~f)*((~a) + (~b)*csc((~e) + (~f)*(~x)))) - (~d)^2⨸((~a)*(~b))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)*((~b)*((~n) - 2) - (~a)*((~n) - 1)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_33", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~n), 0) ? +cot((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*((~a) + (~b)*csc((~e) + (~f)*(~x)))) - 1⨸(~a)^2*∫(((~d)*csc((~e) + (~f)*(~x)))^(~n)*((~a)*((~n) - 1) - (~b)*(~n)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_34", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +-(~b)*(~d)*cot( (~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)⨸((~a)*(~f)*((~a) + (~b)*csc((~e) + (~f)*(~x)))) + (~d)*((~n) - 1)⨸((~a)*(~b))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)*((~a) - (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_35", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(3//2)/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) ? +(~d)⨸(~b)*∫(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*sqrt((~d)*csc((~e) + (~f)*(~x))), (~x)) - (~a)*(~d)⨸(~b)*∫(sqrt((~d)*csc((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_36", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~n), 2) && + ext_isinteger(2*(~n)) ? +-2*(~d)^2* cot((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)⨸((~f)*(2*(~n) - 3)* sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))) + (~d)^2⨸((~b)*(2*(~n) - 3))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)*(2*(~b)*((~n) - 2) - (~a)*csc((~e) + (~f)*(~x)))⨸ sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_37", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + lt((~n), 0) && + ext_isinteger(2*(~n)) ? +cot((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~n)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))) + 1⨸(2*(~b)*(~d)*(~n))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)*((~a) + (~b)*(2*(~n) + 1)*csc((~e) + (~f)*(~x)))⨸ sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_38", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + gt((~n), 2) && + !eq((~m) + (~n) - 1, 0) && + ext_isinteger((~n)) ? +-(~d)^2*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)⨸((~f)*((~m) + (~n) - 1)) + (~d)^2⨸((~b)*((~m) + (~n) - 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)*((~b)*((~n) - 2) + (~a)*(~m)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_39", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + gt((~a), 0) && + !(ext_isinteger((~n))) && + gt((~a)*(~d)/(~b), 0) ? +-((~a)*(~d)⨸(~b))^(~n)* cot((~e) + (~f)*(~x))⨸((~a)^((~n) - 2)*(~f)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* sqrt((~a) - (~b)*csc((~e) + (~f)*(~x))))* int_and_subst(((~a) - (~x))^((~n) - 1)*(2*(~a) - (~x))^((~m) - 1⨸2)⨸sqrt((~x)), (~x), (~x), (~a) - (~b)*csc((~e) + (~f)*(~x)), "4_5_1_2_39") : nothing) + +("4_5_1_2_40", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + gt((~a), 0) && + !(ext_isinteger((~n))) && + lt((~a)*(~d)/(~b), 0) ? +-(-(~a)*(~d)⨸(~b))^(~n)* cot((~e) + (~f)*(~x))⨸((~a)^((~n) - 1)*(~f)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* sqrt((~a) - (~b)*csc((~e) + (~f)*(~x))))* int_and_subst((~x)^((~m) - 1⨸2)*((~a) - (~x))^((~n) - 1)⨸sqrt(2*(~a) - (~x)), (~x), (~x), (~a) + (~b)*csc((~e) + (~f)*(~x)), "4_5_1_2_40") : nothing) + +("4_5_1_2_41", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + gt((~a), 0) ? +(~a)^2*(~d)* cot((~e) + (~f)*(~x))⨸((~f)*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* sqrt((~a) - (~b)*csc((~e) + (~f)*(~x))))* int_and_subst(((~d)*(~x))^((~n) - 1)*((~a) + (~b)*(~x))^((~m) - 1⨸2)⨸sqrt((~a) - (~b)*(~x)), (~x), (~x), csc((~e) + (~f)*(~x)), "4_5_1_2_41") : nothing) + +("4_5_1_2_42", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~m))) && + !(gt((~a), 0)) ? +(~a)^intpart((~m))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ fracpart((~m))⨸(1 + (~b)⨸(~a)*csc((~e) + (~f)*(~x)))^fracpart((~m))* ∫((1 + (~b)⨸(~a)*csc((~e) + (~f)*(~x)))^(~m)*((~d)*csc((~e) + (~f)*(~x)))^(~n), (~x)) : nothing) + +("4_5_1_2_43", +@rule ∫(csc((~!e) + (~!f)*(~x))*sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +((~a) - (~b))*∫(csc((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) + (~b)*∫(csc((~e) + (~f)*(~x))*(1 + csc((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_44", +@rule ∫(csc((~!e) + (~!f)*(~x))*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 1) && + ext_isinteger(2*(~m)) ? +-(~b)*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1)⨸((~f)*(~m)) + 1⨸(~m)* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~b)^2*((~m) - 1) + (~a)^2*(~m) + (~a)*(~b)*(2*(~m) - 1)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +#(* Int[csc[e_.+f_.*x_]/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] := -2/f*Subst[Int[1/(a+b-(a-b)*x^2),x],x,Cot[e+f*x]/(1+Csc[e+f*x])] /; FreeQ[{a,b,e,f},x] && NeQ[a^2-b^2,0] *) +("4_5_1_2_45", +@rule ∫(csc((~!e) + (~!f)*(~x))/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +1⨸(~b)*∫(1⨸(1 + (~a)⨸(~b)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_46", +@rule ∫(csc((~!e) + (~!f)*(~x))/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-2*rt((~a) + (~b), 2)⨸((~b)*(~f)*cot((~e) + (~f)*(~x)))* sqrt(((~b)*(1 - csc((~e) + (~f)*(~x))))⨸((~a) + (~b)))* sqrt(-(~b)*(1 + csc((~e) + (~f)*(~x)))⨸((~a) - (~b)))* elliptic_f( asin(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))⨸rt((~a) + (~b), 2)), ((~a) + (~b))⨸((~a) - (~b))) : nothing) + +("4_5_1_2_47", +@rule ∫(csc((~!e) + (~!f)*(~x))*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ext_isinteger(2*(~m)) ? +-(~b)*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~a)*((~m) + 1) - (~b)*((~m) + 2)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_48", +@rule ∫(csc((~!e) + (~!f)*(~x))*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger(2*(~m))) ? +cot((~e) + (~f)*(~x))⨸((~f)*sqrt(1 + csc((~e) + (~f)*(~x)))*sqrt(1 - csc((~e) + (~f)*(~x))))* int_and_subst(((~a) + (~b)*(~x))^(~m)⨸(sqrt(1 + (~x))*sqrt(1 - (~x))), (~x), (~x), csc((~e) + (~f)*(~x)), "4_5_1_2_48") : nothing) + +("4_5_1_2_49", +@rule ∫(csc((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 0) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)⨸((~f)*((~m) + 1)) + (~m)⨸((~m) + 1)* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~b) + (~a)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_50", +@rule ∫(csc((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) ? +(~a)*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) - 1⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*((~m) + 1) - (~a)*((~m) + 2)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_51", +@rule ∫(csc((~!e) + (~!f)*(~x))^2/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-∫(csc((~e) + (~f)*(~x))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) + ∫(csc((~e) + (~f)*(~x))*(1 + csc((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_52", +@rule ∫(csc((~!e) + (~!f)*(~x))^2*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-(~a)⨸(~b)*∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m), (~x)) + 1⨸(~b)*∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1), (~x)) : nothing) + +("4_5_1_2_53", +@rule ∫(csc((~!e) + (~!f)*(~x))^3*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) ? +-(~a)^2*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸((~b)*((~m) + 1)*((~a)^2 - (~b)^2))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)* simp((~a)*(~b)*((~m) + 1) - ((~a)^2 + (~b)^2*((~m) + 1))*csc((~e) + (~f)*(~x)), (~x)), (~x)) : nothing) + +("4_5_1_2_54", +@rule ∫(csc((~!e) + (~!f)*(~x))^3*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + !(lt((~m), -1)) ? +-cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)⨸((~b)*(~f)*((~m) + 2)) + 1⨸((~b)*((~m) + 2))* ∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~b)*((~m) + 1) - (~a)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_55", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 2) && + ( + ext_isinteger((~m)) && + lt((~n), -1) || + ext_isinteger((~m) + 1/2, 2*(~n)) && + le((~n), -1) + ) ? +(~a)^2*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)⨸((~f)*(~n)) - 1⨸((~d)*(~n))*∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 3)*((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)* simp((~a)^2*(~b)*((~m) - 2*(~n) - 2) - (~a)*(3*(~b)^2*(~n) + (~a)^2*((~n) + 1))*csc((~e) + (~f)*(~x)) - (~b)*((~b)^2*(~n) + (~a)^2*((~m) + (~n) - 1))*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_56", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~m), 2) && + ( + ext_isinteger((~m)) || + ext_isinteger(2*(~m), 2*(~n)) + ) && + !( + igt((~n), 2) && + !(ext_isinteger((~m))) + ) ? +-(~b)^2*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)⨸((~f)*((~m) + (~n) - 1)) + 1⨸((~d)*((~m) + (~n) - 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 3)*((~d)*csc((~e) + (~f)*(~x)))^(~n)* simp((~a)^3*(~d)*((~m) + (~n) - 1) + (~a)*(~b)^2*(~d)*(~n) + (~b)*((~b)^2*(~d)*((~m) + (~n) - 2) + 3*(~a)^2*(~d)*((~m) + (~n) - 1))*csc((~e) + (~f)*(~x)) + (~a)*(~b)^2*(~d)*(3*(~m) + 2*(~n) - 4)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_57", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + lt(0, (~n), 1) && + ext_isinteger(2*(~m), 2*(~n)) ? +-(~b)*(~d)*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)* simp((~b)*(~d)*((~n) - 1) + (~a)*(~d)*((~m) + 1)*csc((~e) + (~f)*(~x)) - (~b)*(~d)*((~m) + (~n) + 1)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_58", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + lt(1, (~n), 2) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~a)*(~d)^2* cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)⨸((~f)*((~m) + 1)*((~a)^2 - (~b)^2)) - (~d)^2⨸(((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)*((~a)*((~n) - 2) + (~b)*((~m) + 1)*csc((~e) + (~f)*(~x)) - (~a)*((~m) + (~n))*csc((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_5_1_2_59", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ( + igt((~n), 3) || + ext_isinteger((~n) + 1/2, 2*(~m)) && + gt((~n), 2) + ) ? +-(~a)^2*(~d)^3* cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 3)⨸((~b)*(~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + (~d)^3⨸((~b)*((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 3)* simp((~a)^2*((~n) - 3) + (~a)*(~b)*((~m) + 1)*csc((~e) + (~f)*(~x)) - ((~a)^2*((~n) - 2) + (~b)^2*((~m) + 1))* csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_60", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ilt((~m) + 1/2, 0) && + ilt((~n), 0) ? +cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)⨸((~a)*(~f)*(~n)) - 1⨸((~a)*(~d)*(~n))*∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)* simp((~b)*((~m) + (~n) + 1) - (~a)*((~n) + 1)*csc((~e) + (~f)*(~x)) - (~b)*((~m) + (~n) + 2)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_61", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~m), -1) && + ext_isinteger(2*(~m), 2*(~n)) ? +(~b)^2*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^ (~n)⨸((~a)*(~f)*((~m) + 1)*((~a)^2 - (~b)^2)) + 1⨸((~a)*((~m) + 1)*((~a)^2 - (~b)^2))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^(~n)* ((~a)^2*((~m) + 1) - (~b)^2*((~m) + (~n) + 1) - (~a)*(~b)*((~m) + 1)*csc((~e) + (~f)*(~x)) + (~b)^2*((~m) + (~n) + 2)*csc((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_5_1_2_62", +@rule ∫(sqrt((~!d)*csc((~!e) + (~!f)*(~x)))/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +sqrt((~d)*sin((~e) + (~f)*(~x)))*sqrt((~d)*csc((~e) + (~f)*(~x)))⨸(~d)* ∫(sqrt((~d)*sin((~e) + (~f)*(~x)))⨸((~b) + (~a)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_63", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(3//2)/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~d)*sqrt((~d)*sin((~e) + (~f)*(~x)))*sqrt((~d)*csc((~e) + (~f)*(~x)))* ∫(1⨸(sqrt((~d)*sin((~e) + (~f)*(~x)))*((~b) + (~a)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_5_1_2_64", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(5//2)/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~d)⨸(~b)*∫(((~d)*csc((~e) + (~f)*(~x)))^(3⨸2), (~x)) - (~a)*(~d)⨸(~b)*∫(((~d)*csc((~e) + (~f)*(~x)))^(3⨸2)⨸((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_65", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~n), 3) ? +-(~d)^3*cot((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 3)⨸((~b)*(~f)*((~n) - 2)) + (~d)^3⨸((~b)*((~n) - 2))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) - 3)* simp((~a)*((~n) - 3) + (~b)*((~n) - 3)*csc((~e) + (~f)*(~x)) - (~a)*((~n) - 2)*csc((~e) + (~f)*(~x))^2, (~x))⨸((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_66", +@rule ∫(1/(sqrt((~!d)*csc((~!e) + (~!f)*(~x)))*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~b)^2⨸((~a)^2*(~d)^2)*∫(((~d)*csc((~e) + (~f)*(~x)))^(3⨸2)⨸((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) + 1⨸(~a)^2*∫(((~a) - (~b)*csc((~e) + (~f)*(~x)))⨸sqrt((~d)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_67", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + le((~n), -1) && + ext_isinteger(2*(~n)) ? +cot((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~a)*(~f)*(~n)) - 1⨸((~a)*(~d)*(~n))*∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)⨸((~a) + (~b)*csc((~e) + (~f)*(~x)))* simp((~b)*(~n) - (~a)*((~n) + 1)*csc((~e) + (~f)*(~x)) - (~b)*((~n) + 1)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_68", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*sqrt((~!d)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~a)*∫(sqrt((~d)*csc((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) + (~b)⨸(~d)*∫(((~d)*csc((~e) + (~f)*(~x)))^(3⨸2)⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_69", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~n), 1) && + ext_isinteger(2*(~n)) ? +-2*(~d)*cos((~e) + (~f)*(~x))* sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*(2*(~n) - 1)) + (~d)^2⨸(2*(~n) - 1)* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)* simp(2*(~a)*((~n) - 2) + (~b)*(2*(~n) - 3)*csc((~e) + (~f)*(~x)) + (~a)*csc((~e) + (~f)*(~x))^2, (~x))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_70", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))/sqrt((~!d)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))⨸(sqrt((~d)*csc((~e) + (~f)*(~x)))* sqrt((~b) + (~a)*sin((~e) + (~f)*(~x))))*∫(sqrt((~b) + (~a)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_71", +@rule ∫(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + le((~n), -1) && + ext_isinteger(2*(~n)) ? +cot((~e) + (~f)*(~x))*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~n)) - 1⨸(2*(~d)*(~n))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)* simp((~b) - 2*(~a)*((~n) + 1)*csc((~e) + (~f)*(~x)) - (~b)*(2*(~n) + 3)*csc((~e) + (~f)*(~x))^2, (~x))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_72", +@rule ∫(sqrt((~!d)*csc((~!e) + (~!f)*(~x)))/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +sqrt((~d)*csc((~e) + (~f)*(~x)))* sqrt((~b) + (~a)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* ∫(1⨸sqrt((~b) + (~a)*sin((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_73", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(3//2)/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~d)*sqrt((~d)*csc((~e) + (~f)*(~x)))* sqrt((~b) + (~a)*sin((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* ∫(1⨸(sin((~e) + (~f)*(~x))*sqrt((~b) + (~a)*sin((~e) + (~f)*(~x)))), (~x)) : nothing) + +("4_5_1_2_74", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~n), 2) && + ext_isinteger(2*(~n)) ? +-2*(~d)^2*cos((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)* sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))⨸((~b)*(~f)*(2*(~n) - 3)) + (~d)^3⨸((~b)*(2*(~n) - 3))* ∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) - 3)⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* simp(2*(~a)*((~n) - 3) + (~b)*(2*(~n) - 5)*csc((~e) + (~f)*(~x)) - 2*(~a)*((~n) - 2)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_75", +@rule ∫(1/(csc((~!e) + (~!f)*(~x))*sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +-cos((~e) + (~f)*(~x))*sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))⨸((~a)*(~f)) - (~b)⨸(2*(~a))*∫((1 + csc((~e) + (~f)*(~x))^2)⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_76", +@rule ∫(1/(sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))*sqrt((~!d)*csc((~!e) + (~!f)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +1⨸(~a)*∫(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))⨸sqrt((~d)*csc((~e) + (~f)*(~x))), (~x)) - (~b)⨸((~a)*(~d))*∫(sqrt((~d)*csc((~e) + (~f)*(~x)))⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_77", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~n)/sqrt((~a) + (~!b)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt((~n), -1) && + ext_isinteger(2*(~n)) ? +cos((~e) + (~f)*(~x))*((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)* sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))⨸((~a)*(~d)*(~f)*(~n)) + 1⨸(2*(~a)*(~d)*(~n))*∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* simp(-(~b)*(2*(~n) + 1) + 2*(~a)*((~n) + 1)*csc((~e) + (~f)*(~x)) + (~b)*(2*(~n) + 3)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_78", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(3//2)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + le((~n), -1) && + ext_isinteger(2*(~n)) ? +(~a)*cot((~e) + (~f)*(~x))* sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*((~d)*csc((~e) + (~f)*(~x)))^(~n)⨸((~f)*(~n)) + 1⨸(2*(~d)*(~n))*∫(((~d)*csc((~e) + (~f)*(~x)))^((~n) + 1)⨸sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))* simp((~a)*(~b)*(2*(~n) - 1) + 2*((~b)^2*(~n) + (~a)^2*((~n) + 1))*csc((~e) + (~f)*(~x)) + (~a)*(~b)*(2*(~n) + 3)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_79", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + gt((~n), 3) && + ( + ext_isinteger((~n)) || + ext_isinteger(2*(~m), 2*(~n)) + ) && + !(igt((~m), 2)) ? +-(~d)^3*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) + 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 3)⨸((~b)*(~f)*((~m) + (~n) - 1)) + (~d)^3⨸((~b)*((~m) + (~n) - 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 3)* simp((~a)*((~n) - 3) + (~b)*((~m) + (~n) - 2)*csc((~e) + (~f)*(~x)) - (~a)*((~n) - 2)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_80", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt(0, (~m), 2) && + lt(0, (~n), 3) && + !eq((~m) + (~n) - 1, 0) && + ( + ext_isinteger((~m)) || + ext_isinteger(2*(~m), 2*(~n)) + ) ? +-(~b)*(~d)*cot( (~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)⨸((~f)*((~m) + (~n) - 1)) + (~d)⨸((~m) + (~n) - 1)* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 2)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 1)* simp((~a)*(~b)*((~n) - 1) + ((~b)^2*((~m) + (~n) - 2) + (~a)^2*((~m) + (~n) - 1))* csc((~e) + (~f)*(~x)) + (~a)*(~b)*(2*(~m) + (~n) - 2)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_81", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + lt(-1, (~m), 2) && + lt(1, (~n), 3) && + !eq((~m) + (~n) - 1, 0) && + ( + ext_isinteger((~n)) || + ext_isinteger(2*(~m), 2*(~n)) + ) ? +-(~d)^2*cot((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^ (~m)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)⨸((~f)*((~m) + (~n) - 1)) + (~d)^2⨸((~b)*((~m) + (~n) - 1))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1)*((~d)*csc((~e) + (~f)*(~x)))^((~n) - 2)* simp((~a)*(~b)*((~n) - 2) + (~b)^2*((~m) + (~n) - 2)*csc((~e) + (~f)*(~x)) + (~a)*(~b)*(~m)*csc((~e) + (~f)*(~x))^2, (~x)), (~x)) : nothing) + +("4_5_1_2_82", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(3//2)/sqrt((~!d)*csc((~!e) + (~!f)*(~x))),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +(~a)*∫(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))⨸sqrt((~d)*csc((~e) + (~f)*(~x))), (~x)) + (~b)⨸(~d)*∫(sqrt((~a) + (~b)*csc((~e) + (~f)*(~x)))*sqrt((~d)*csc((~e) + (~f)*(~x))), (~x)) : nothing) + +("4_5_1_2_83", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~!n)*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)) ? +sin((~e) + (~f)*(~x))^(~n)*((~d)*csc((~e) + (~f)*(~x)))^(~n)* ∫(((~b) + (~a)*sin((~e) + (~f)*(~x)))^(~m)⨸sin((~e) + (~f)*(~x))^((~m) + (~n)), (~x)) : nothing) + +# ("4_5_1_2_84", +# @rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~!m)*((~!d)*csc((~!e) + (~!f)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~x)) ? +# Unintegrable[((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)*((~d)*csc((~e) + (~f)*(~x)))^(~n), (~x)] : nothing) + +("4_5_1_2_85", +@rule ∫(((~!d)*cos((~!e) + (~!f)*(~x)))^(~m)*((~!a) + (~!b)*sec((~!e) + (~!f)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~p), (~x)) && + !(ext_isinteger((~m))) && + !(ext_isinteger((~p))) ? +((~d)*cos((~e) + (~f)*(~x)))^fracpart((~m))*(sec((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫((sec((~e) + (~f)*(~x))⨸(~d))^(-(~m))*((~a) + (~b)*sec((~e) + (~f)*(~x)))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.3 (d sin)^n (a+b sec)^m.jl b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.3 (d sin)^n (a+b sec)^m.jl new file mode 100644 index 0000000..89d9cc0 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.3 (d sin)^n (a+b sec)^m.jl @@ -0,0 +1,51 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.5.1.3 (d sin)^n (a+b sec)^m *) +("4_5_1_3_1", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~p), (~x)) && + ext_isinteger((~m)) ? +∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~b) + (~a)*sin((~e) + (~f)*(~x)))^(~m)⨸sin((~e) + (~f)*(~x))^(~m), (~x)) : nothing) + +("4_5_1_3_2", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~p) - 1)/2) && + eq((~a)^2 - (~b)^2, 0) ? +-1⨸((~f)*(~b)^((~p) - 1))* int_and_subst((-(~a) + (~b)*(~x))^(((~p) - 1)⨸2)*((~a) + (~b)*(~x))^((~m) + ((~p) - 1)⨸2)⨸ (~x)^((~p) + 1), (~x), (~x), csc((~e) + (~f)*(~x)), "4_5_1_3_2") : nothing) + +("4_5_1_3_3", +@rule ∫(cos((~!e) + (~!f)*(~x))^(~!p)*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) && + ext_isinteger(((~p) - 1)/2) && + !eq((~a)^2 - (~b)^2, 0) ? +-1⨸(~f)*int_and_subst((-1 + (~x))^(((~p) - 1)⨸2)*(1 + (~x))^(((~p) - 1)⨸2)*((~a) + (~b)*(~x))^(~m)⨸ (~x)^((~p) + 1), (~x), (~x), csc((~e) + (~f)*(~x)), "4_5_1_3_3") : nothing) + +("4_5_1_3_4", +@rule ∫(((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m)/cos((~!e) + (~!f)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~m), (~x)) ? +tan((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)⨸(~f) + (~b)*(~m)*∫(csc((~e) + (~f)*(~x))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^((~m) - 1), (~x)) : nothing) + +("4_5_1_3_5", +@rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + ( + eq((~a)^2 - (~b)^2, 0) || + ext_isinteger(2*(~m), (~p)) + ) ? +sin((~e) + (~f)*(~x))^ fracpart((~m))*((~a) + (~b)*csc((~e) + (~f)*(~x)))^fracpart((~m))⨸((~b) + (~a)*sin((~e) + (~f)*(~x)))^ fracpart((~m))* ∫(((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~b) + (~a)*sin((~e) + (~f)*(~x)))^(~m)⨸sin((~e) + (~f)*(~x))^(~m), (~x)) : nothing) + +# ("4_5_1_3_6", +# @rule ∫(((~!g)*cos((~!e) + (~!f)*(~x)))^(~!p)*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~!m),(~x)) => +# !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) ? +# Unintegrable[((~g)*cos((~e) + (~f)*(~x)))^(~p)*((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m), (~x)] : nothing) + +#(* Int[(g_.*sec[e_.+f_.*x_])^p_*(a_+b_.*csc[e_.+f_.*x_])^m_.,x_Symbol] := Int[(g*Sec[e+f*x])^p*(b+a*Sin[e+f*x])^m/Sin[e+f*x]^m,x] /; FreeQ[{a,b,e,f,g,p},x] && Not[IntegerQ[p]] && IntegerQ[m] *) +("4_5_1_3_7", +@rule ∫(((~!g)*sec((~!e) + (~!f)*(~x)))^(~p)*((~a) + (~!b)*csc((~!e) + (~!f)*(~x)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~g), (~m), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~g)^intpart((~p))*((~g)*sec((~e) + (~f)*(~x)))^fracpart((~p))*cos((~e) + (~f)*(~x))^fracpart((~p))* ∫(((~a) + (~b)*csc((~e) + (~f)*(~x)))^(~m)⨸cos((~e) + (~f)*(~x))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.4 (d tan)^n (a+b sec)^m.jl b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.4 (d tan)^n (a+b sec)^m.jl new file mode 100644 index 0000000..f23f433 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.1.4 (d tan)^n (a+b sec)^m.jl @@ -0,0 +1,169 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.5.1.4 (d tan)^n (a+b sec)^m *) +("4_5_1_4_1", +@rule ∫(cot((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + ext_isinteger(((~m) - 1)/2) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~n)) ? +1⨸((~a)^((~m) - (~n) - 1)*(~b)^(~n)*(~d))* int_and_subst(((~a) - (~b)*(~x))^(((~m) - 1)⨸2)*((~a) + (~b)*(~x))^(((~m) - 1)⨸2 + (~n))⨸ (~x)^((~m) + (~n)), (~x), (~x), sin((~c) + (~d)*(~x)), "4_5_1_4_1") : nothing) + +("4_5_1_4_2", +@rule ∫(cot((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + ext_isinteger(((~m) - 1)/2) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~n))) ? +-1⨸((~d)*(~b)^((~m) - 1))* int_and_subst((-(~a) + (~b)*(~x))^(((~m) - 1)⨸2)*((~a) + (~b)*(~x))^(((~m) - 1)⨸2 + (~n))⨸(~x), (~x), (~x), csc((~c) + (~d)*(~x)), "4_5_1_4_2") : nothing) + +("4_5_1_4_3", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + gt((~m), 1) ? +-(~e)*((~e)*cot((~c) + (~d)*(~x)))^((~m) - 1)*((~a)*(~m) + (~b)*((~m) - 1)*csc((~c) + (~d)*(~x)))⨸((~d)* (~m)*((~m) - 1)) - (~e)^2⨸(~m)* ∫(((~e)*cot((~c) + (~d)*(~x)))^((~m) - 2)*((~a)*(~m) + (~b)*((~m) - 1)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_4_4", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + lt((~m), -1) ? +-((~e)*cot((~c) + (~d)*(~x)))^((~m) + 1)*((~a) + (~b)*csc((~c) + (~d)*(~x)))⨸((~d)*(~e)*((~m) + 1)) - 1⨸((~e)^2*((~m) + 1))* ∫(((~e)*cot((~c) + (~d)*(~x)))^((~m) + 2)*((~a)*((~m) + 1) + (~b)*((~m) + 2)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_4_5", +@rule ∫(((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))/cot((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) ? +∫(((~b) + (~a)*sin((~c) + (~d)*(~x)))⨸cos((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_5_1_4_6", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~!m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) ? +(~a)*∫(((~e)*cot((~c) + (~d)*(~x)))^(~m), (~x)) + (~b)*∫(((~e)*cot((~c) + (~d)*(~x)))^(~m)*csc((~c) + (~d)*(~x)), (~x)) : nothing) + +("4_5_1_4_7", +@rule ∫(cot((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + ext_isinteger(((~m) - 1)/2) && + !eq((~a)^2 - (~b)^2, 0) ? +-(-1)^(((~m) - 1)⨸2)⨸((~d)*(~b)^((~m) - 1))* int_and_subst(((~b)^2 - (~x)^2)^(((~m) - 1)⨸2)*((~a) + (~x))^(~n)⨸(~x), (~x), (~x), (~b)*csc((~c) + (~d)*(~x)), "4_5_1_4_7") : nothing) + +("4_5_1_4_8", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + igt((~n), 0) ? +∫(ext_expand(((~e)*cot((~c) + (~d)*(~x)))^(~m), ((~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_5_1_4_9", +@rule ∫(cot((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~m)/2) && + ext_isinteger((~n) - 1/2) ? +-2*(~a)^((~m)⨸2 + (~n) + 1⨸2)⨸(~d)* int_and_subst((~x)^(~m)*(2 + (~a)*(~x)^2)^((~m)⨸2 + (~n) - 1⨸2)⨸(1 + (~a)*(~x)^2), (~x), (~x), cot((~c) + (~d)*(~x))⨸sqrt((~a) + (~b)*csc((~c) + (~d)*(~x))), "4_5_1_4_9") : nothing) + +("4_5_1_4_10", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + ilt((~n), 0) ? +(~a)^(2*(~n))*(~e)^(-2*(~n))* ∫(((~e)*cot((~c) + (~d)*(~x)))^((~m) + 2*(~n))⨸(-(~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + +("4_5_1_4_11", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + eq((~a)^2 - (~b)^2, 0) && + !(ext_isinteger((~n))) ? +-2^((~m) + (~n) + 1)*((~e)*cot((~c) + (~d)*(~x)))^((~m) + 1)*((~a) + (~b)*csc((~c) + (~d)*(~x)))^ (~n)⨸((~d)*(~e)*((~m) + 1))*((~a)⨸((~a) + (~b)*csc((~c) + (~d)*(~x))))^((~m) + (~n) + 1)* appell_f1(((~m) + 1)⨸2, (~m) + (~n), 1, ((~m) + 3)⨸ 2, -((~a) - (~b)*csc((~c) + (~d)*(~x)))⨸((~a) + (~b)*csc((~c) + (~d)*(~x))), ((~a) - (~b)*csc((~c) + (~d)*(~x)))⨸((~a) + (~b)*csc((~c) + (~d)*(~x)))) : nothing) + +("4_5_1_4_12", +@rule ∫(sqrt((~!e)*cot((~!c) + (~!d)*(~x)))/((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +1⨸(~a)*∫(sqrt((~e)*cot((~c) + (~d)*(~x))), (~x)) - (~b)⨸(~a)*∫(sqrt((~e)*cot((~c) + (~d)*(~x)))⨸((~b) + (~a)*sin((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_4_13", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)/((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~m) - 1/2, 0) ? +-(~e)^2⨸(~b)^2*∫(((~e)*cot((~c) + (~d)*(~x)))^((~m) - 2)*((~a) - (~b)*csc((~c) + (~d)*(~x))), (~x)) + (~e)^2*((~a)^2 - (~b)^2)⨸(~b)^2* ∫(((~e)*cot((~c) + (~d)*(~x)))^((~m) - 2)⨸((~a) + (~b)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_4_14", +@rule ∫(1/(sqrt((~!e)*cot((~!c) + (~!d)*(~x)))*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +1⨸(~a)*∫(1⨸sqrt((~e)*cot((~c) + (~d)*(~x))), (~x)) - (~b)⨸(~a)*∫(1⨸(sqrt((~e)*cot((~c) + (~d)*(~x)))*((~b) + (~a)*sin((~c) + (~d)*(~x)))), (~x)) : nothing) + +("4_5_1_4_15", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)/((~a) + (~!b)*csc((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ilt((~m) + 1/2, 0) ? +1⨸((~a)^2 - (~b)^2)*∫(((~e)*cot((~c) + (~d)*(~x)))^(~m)*((~a) - (~b)*csc((~c) + (~d)*(~x))), (~x)) + (~b)^2⨸((~e)^2*((~a)^2 - (~b)^2))* ∫(((~e)*cot((~c) + (~d)*(~x)))^((~m) + 2)⨸((~a) + (~b)*csc((~c) + (~d)*(~x))), (~x)) : nothing) + +("4_5_1_4_16", +@rule ∫(cot((~!c) + (~!d)*(~x))^2*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) ? +∫((-1 + csc((~c) + (~d)*(~x))^2)*((~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + +("4_5_1_4_17", +@rule ∫(cot((~!c) + (~!d)*(~x))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~m)/2, 0) && + ext_isinteger((~n) - 1/2) ? +∫(ext_expand(((~a) + (~b)*csc((~c) + (~d)*(~x)))^ (~n), (-1 + csc((~c) + (~d)*(~x))^2)^((~m)⨸2), (~x)), (~x)) : nothing) + +("4_5_1_4_18", +@rule ∫(cot((~!c) + (~!d)*(~x))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ilt((~m)/2, 0) && + ext_isinteger((~n) - 1/2) && + eq((~m), -2) ? +∫(ext_expand(((~a) + (~b)*csc((~c) + (~d)*(~x)))^ (~n), (-1 + sec((~c) + (~d)*(~x))^2)^(-(~m)⨸2), (~x)), (~x)) : nothing) + +("4_5_1_4_19", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + igt((~n), 0) ? +∫(ext_expand(((~e)*cot((~c) + (~d)*(~x)))^(~m), ((~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("4_5_1_4_20", +@rule ∫(cot((~!c) + (~!d)*(~x))^(~!m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~a)^2 - (~b)^2, 0) && + ext_isinteger((~n)) && + ext_isinteger((~m)) && + ( + ext_isinteger((~m)/2) || + le((~m), 1) + ) ? +∫(cos((~c) + (~d)*(~x))^(~m)*((~b) + (~a)*sin((~c) + (~d)*(~x)))^(~n)⨸sin((~c) + (~d)*(~x))^((~m) + (~n)), (~x)) : nothing) + +# ("4_5_1_4_21", +# @rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~!m)*((~!a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) ? +# Unintegrable[((~e)*cot((~c) + (~d)*(~x)))^(~m)*((~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n), (~x)] : nothing) + +("4_5_1_4_22", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x)))^(~m)*((~a) + (~!b)*sec((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !(ext_isinteger((~m))) ? +((~e)*cot((~c) + (~d)*(~x)))^(~m)*tan((~c) + (~d)*(~x))^(~m)* ∫(((~a) + (~b)*sec((~c) + (~d)*(~x)))^(~n)⨸tan((~c) + (~d)*(~x))^(~m), (~x)) : nothing) + +("4_5_1_4_23", +@rule ∫(((~!e)*tan((~!c) + (~!d)*(~x))^(~p))^(~m)*((~a) + (~!b)*sec((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~e)*tan((~c) + (~d)*(~x))^(~p))^(~m)⨸((~e)*tan((~c) + (~d)*(~x)))^((~m)*(~p))* ∫(((~e)*tan((~c) + (~d)*(~x)))^((~m)*(~p))*((~a) + (~b)*sec((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + +("4_5_1_4_24", +@rule ∫(((~!e)*cot((~!c) + (~!d)*(~x))^(~p))^(~m)*((~a) + (~!b)*csc((~!c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~e)*cot((~c) + (~d)*(~x))^(~p))^(~m)⨸((~e)*cot((~c) + (~d)*(~x)))^((~m)*(~p))* ∫(((~e)*cot((~c) + (~d)*(~x)))^((~m)*(~p))*((~a) + (~b)*csc((~c) + (~d)*(~x)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.7 (d trig)^m (a+b (c sec)^n)^p.jl b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.7 (d trig)^m (a+b (c sec)^n)^p.jl new file mode 100644 index 0000000..f8a8f41 --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.5 Secant/4.5.7 (d trig)^m (a+b (c sec)^n)^p.jl @@ -0,0 +1,281 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.5.7 (d trig)^m (a+b (c sec)^n)^p *) +# ("4_5_7_1", +# @rule ∫((~!u)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => +# !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && +# eq((~a) + (~b), 0) && +# ext_isinteger((~p)) ? +# (~b)^(~p)*∫(ActivateTrig[(~u)*tan((~e) + (~f)*(~x))^(2*(~p))], (~x)) : nothing) +# +# ("4_5_7_2", +# @rule ∫((~!u)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => +# !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && +# eq((~a) + (~b), 0) ? +# ∫(ActivateTrig[(~u)*((~b)*tan((~e) + (~f)*(~x))^2)^(~p)], (~x)) : nothing) + +("4_5_7_3", +@rule ∫(((~!b)*sec((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~b), (~e), (~f), (~p), (~x)) && + !(ext_isinteger((~p))) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + (~b)*ff⨸(~f)* int_and_subst(((~b) + (~b)*ff^2*(~x)^2)^((~p) - 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_3") +end : nothing) + +("4_5_7_4", +@rule ∫(((~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^(~p),(~x)) => + !contains_var((~b), (~c), (~e), (~f), (~n), (~p), (~x)) && + !(ext_isinteger((~p))) ? +(~b)^intpart((~p))*((~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^ fracpart((~p))⨸((~c)*sec((~e) + (~f)*(~x)))^((~n)*fracpart((~p)))* ∫(((~c)*sec((~e) + (~f)*(~x)))^((~n)*(~p)), (~x)) : nothing) + +("4_5_7_5", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!m)*((~!b)*sec((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~b), (~e), (~f), (~p), (~x)) && + !(ext_isinteger((~p))) && + ext_isinteger(((~m) - 1)/2) ? +(~b)⨸(2*(~f))* int_and_subst((-1 + (~x))^(((~m) - 1)⨸2)*((~b)*(~x))^((~p) - 1), (~x), (~x), sec((~e) + (~f)*(~x))^2, "4_5_7_5") : nothing) + +# ("4_5_7_6", +# @rule ∫((~!u)*((~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => +# !contains_var((~b), (~e), (~f), (~n), (~p), (~x)) && +# !(ext_isinteger((~p))) && +# ext_isinteger((~n)) && +# ( +# eq((~u), 1) || +# MatchQ[(~u), (d_.*trig_[(~e) + (~f)*(~x)])^m_. /; !contains_var((~d), (~m), (~x)) && +# in( trig, [sin, cos, tan, cot, sec, csc])] +# ) ? +# let +# ff = free_factors(sec((~e) + (~f)*(~x)), (~x)) +# +# ((~b)*ff^(~n))^ intpart((~p))*((~b)*sec((~e) + (~f)*(~x))^(~n))^ fracpart((~p))⨸(sec((~e) + (~f)*(~x))⨸ff)^((~n)*fracpart((~p)))* ∫(ActivateTrig[(~u)]*(sec((~e) + (~f)*(~x))⨸ff)^((~n)*(~p)), (~x)) +# end : nothing) + +# Error in translation of the line: +# Int[u_.*(b_.*(c_.*sec[e_. + f_.*x_])^n_)^p_, x_Symbol] := b^IntPart[p]*(b*(c*Sec[e + f*x])^n)^ FracPart[p]/(c*Sec[e + f*x])^(n*FracPart[p])* Int[ActivateTrig[u]*(c*Sec[e + f*x])^(n*p), x] /; FreeQ[{b, c, e, f, n, p}, x] && Not[IntegerQ[p]] && Not[IntegerQ[n]] && (EqQ[u, 1] || MatchQ[u, (d_.*trig_[e + f*x])^m_. /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig]]) + +("4_5_7_8", +@rule ∫(1/((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^2),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + !eq((~a) + (~b), 0) ? +(~x)⨸(~a) - (~b)⨸(~a)*∫(1⨸((~b) + (~a)*cos((~e) + (~f)*(~x))^2), (~x)) : nothing) + +("4_5_7_9", +@rule ∫(((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^2)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + !eq((~a) + (~b), 0) && + !eq((~p), -1) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + ff⨸(~f)* int_and_subst(((~a) + (~b) + (~b)*ff^2*(~x)^2)^(~p)⨸(1 + ff^2*(~x)^2), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_9") +end : nothing) + +("4_5_7_10", +@rule ∫(((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^4)^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(2*(~p)) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + ff⨸(~f)* int_and_subst(((~a) + (~b) + 2*(~b)*ff^2*(~x)^2 + (~b)*ff^4*(~x)^4)^(~p)⨸(1 + ff^2*(~x)^2), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_10") +end : nothing) + +("4_5_7_11", +@rule ∫(((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~n)/2) && + igt((~p), -2) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + ff⨸(~f)* int_and_subst(((~a) + (~b)*(1 + ff^2*(~x)^2)^((~n)⨸2))^(~p)⨸(1 + ff^2*(~x)^2), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_11") +end : nothing) + +# ("4_5_7_12", +# @rule ∫(((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~e), (~f), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_5_7_13", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~n)/2) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + ff^((~m) + 1)⨸(~f)* int_and_subst( (~x)^(~m)*expand_to_sum((~a) + (~b)*(1 + ff^2*(~x)^2)^((~n)⨸2), (~x))^ (~p)⨸(1 + ff^2*(~x)^2)^((~m)⨸2 + 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_13") +end : nothing) + +("4_5_7_14", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ext_isinteger((~n)) && + ext_isinteger((~p)) ? +let + ff = free_factors(cos((~e) + (~f)*(~x)), (~x)) + + -ff⨸(~f)* int_and_subst((1 - ff^2*(~x)^2)^(((~m) - 1)⨸2)*((~b) + (~a)*(ff*(~x))^(~n))^ (~p)⨸(ff*(~x))^((~n)*(~p)), (~x), (~x), cos((~e) + (~f)*(~x))⨸ff, "4_5_7_14") +end : nothing) + +("4_5_7_15", +@rule ∫(sin((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~n), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ( + gt((~m), 0) || + eq((~n), 2) || + eq((~n), 4) + ) ? +let + ff = free_factors(cos((~e) + (~f)*(~x)), (~x)) + + 1⨸((~f)*ff^(~m))* int_and_subst((-1 + ff^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*((~c)*ff*(~x))^(~n))^(~p)⨸ (~x)^((~m) + 1), (~x), (~x), sec((~e) + (~f)*(~x))⨸ff, "4_5_7_15") +end : nothing) + +# ("4_5_7_16", +# @rule ∫(((~!d)*sin((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*sin((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_5_7_17", +@rule ∫(((~!d)*cos((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~!n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) && + ext_isinteger((~n), (~p)) ? +(~d)^((~n)*(~p))* ∫(((~d)*cos((~e) + (~f)*(~x)))^((~m) - (~n)*(~p))*((~b) + (~a)*cos((~e) + (~f)*(~x))^(~n))^(~p), (~x)) : nothing) + +("4_5_7_18", +@rule ∫(((~!d)*cos((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*cos((~e) + (~f)*(~x)))^fracpart((~m))*(sec((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫((sec((~e) + (~f)*(~x))⨸(~d))^(-(~m))*((~a) + (~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + +# Rule skipped because of "Module": +# Int[tan[e_. + f_.*x_]^m_.*(a_ + b_.*sec[e_. + f_.*x_]^n_)^p_., x_Symbol] := Module[{ff = FreeFactors[Cos[e + f*x], x]}, -1/(f*ff^(m + n*p - 1))* Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p/ x^(m + n*p), x], x, Cos[e + f*x]/ff]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p] + +("4_5_7_20", +@rule ∫(tan((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~e), (~f), (~n), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ( + gt((~m), 0) || + eq((~n), 2) || + eq((~n), 4) || + igt((~p), 0) || + ext_isinteger(2*(~n), (~p)) + ) ? +let + ff = free_factors(sec((~e) + (~f)*(~x)), (~x)) + + 1⨸(~f)* int_and_subst((-1 + ff^2*(~x)^2)^(((~m) - 1)⨸2)*((~a) + (~b)*((~c)*ff*(~x))^(~n))^(~p)⨸(~x), (~x), (~x), sec((~e) + (~f)*(~x))⨸ff, "4_5_7_20") +end : nothing) + +("4_5_7_21", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~!b)*sec((~!e) + (~!f)*(~x))^2)^(~!p),(~x)) => + !contains_var((~b), (~d), (~e), (~f), (~m), (~p), (~x)) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + (~b)*ff⨸(~f)* int_and_subst(((~d)*ff*(~x))^(~m)*((~b) + (~b)*ff^2*(~x)^2)^((~p) - 1), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_21") +end : nothing) + +("4_5_7_22", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~!p),(~x)) => + !contains_var((~a), (~b), (~d), (~e), (~f), (~m), (~p), (~x)) && + ext_isinteger((~n)/2) && + ( + ext_isinteger((~m)/2) || + eq((~n), 2) + ) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + ff⨸(~f)* int_and_subst(((~d)*ff*(~x))^ (~m)*((~a) + (~b)*(1 + ff^2*(~x)^2)^((~n)⨸2))^(~p)⨸(1 + ff^2*(~x)^2), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_22") +end : nothing) + +("4_5_7_23", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^(~!p),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~p), (~n), (~x)) && + gt((~m), 1) && + !eq((~p)*(~n) + (~m) - 1, 0) && + ext_isinteger(2*(~p)*(~n), 2*(~m)) ? +(~d)*((~d)*tan((~e) + (~f)*(~x)))^((~m) - 1)*((~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^ (~p)⨸((~f)*((~p)*(~n) + (~m) - 1)) - (~d)^2*((~m) - 1)⨸((~p)*(~n) + (~m) - 1)* ∫(((~d)*tan((~e) + (~f)*(~x)))^((~m) - 2)*((~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + +("4_5_7_24", +@rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~m)*((~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^(~!p),(~x)) => + !contains_var((~b), (~c), (~d), (~e), (~f), (~p), (~n), (~x)) && + lt((~m), -1) && + !eq((~p)*(~n) + (~m) + 1, 0) && + ext_isinteger(2*(~p)*(~n), 2*(~m)) ? +((~d)*tan((~e) + (~f)*(~x)))^((~m) + 1)*((~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p)⨸((~d)*(~f)*((~m) + 1)) - ((~p)*(~n) + (~m) + 1)⨸((~d)^2*((~m) + 1))* ∫(((~d)*tan((~e) + (~f)*(~x)))^((~m) + 2)*((~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + +# ("4_5_7_25", +# @rule ∫(((~!d)*tan((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*tan((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_5_7_26", +@rule ∫(((~!d)*cot((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*cot((~e) + (~f)*(~x)))^fracpart((~m))*(tan((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫((tan((~e) + (~f)*(~x))⨸(~d))^(-(~m))*((~a) + (~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + +("4_5_7_27", +@rule ∫(sec((~!e) + (~!f)*(~x))^(~m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger((~m)/2) && + ext_isinteger((~n)/2) ? +let + ff = free_factors(tan((~e) + (~f)*(~x)), (~x)) + + ff⨸(~f)* int_and_subst((1 + ff^2*(~x)^2)^((~m)⨸2 - 1)* expand_to_sum((~a) + (~b)*(1 + ff^2*(~x)^2)^((~n)⨸2), (~x))^(~p), (~x), (~x), tan((~e) + (~f)*(~x))⨸ff, "4_5_7_27") +end : nothing) + +("4_5_7_28", +@rule ∫(sec((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ext_isinteger((~n)/2) && + ext_isinteger((~p)) ? +let + ff = free_factors(sin((~e) + (~f)*(~x)), (~x)) + + ff⨸(~f)* int_and_subst( expand_to_sum((~b) + (~a)*(1 - ff^2*(~x)^2)^((~n)⨸2), (~x))^ (~p)⨸(1 - ff^2*(~x)^2)^(((~m) + (~n)*(~p) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))⨸ff, "4_5_7_28") +end : nothing) + +("4_5_7_29", +@rule ∫(sec((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~p), (~x)) && + ext_isinteger(((~m) - 1)/2) && + ext_isinteger((~n)/2) && + !(ext_isinteger((~p))) ? +let + ff = free_factors(sin((~e) + (~f)*(~x)), (~x)) + + ff⨸(~f)* int_and_subst(((~a) + (~b)⨸(1 - ff^2*(~x)^2)^((~n)⨸2))^ (~p)⨸(1 - ff^2*(~x)^2)^(((~m) + 1)⨸2), (~x), (~x), sin((~e) + (~f)*(~x))⨸ff, "4_5_7_29") +end : nothing) + +("4_5_7_30", +@rule ∫(sec((~!e) + (~!f)*(~x))^(~!m)*((~a) + (~!b)*sec((~!e) + (~!f)*(~x))^(~n))^(~p),(~x)) => + !contains_var((~a), (~b), (~e), (~f), (~x)) && + ext_isinteger((~m), (~n), (~p)) ? +∫(ext_expand(sec((~e) + (~f)*(~x))^(~m)*((~a) + (~b)*sec((~e) + (~f)*(~x))^(~n))^(~p), (~x)), (~x)) : nothing) + +# ("4_5_7_31", +# @rule ∫(((~!d)*sec((~!e) + (~!f)*(~x)))^(~!m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^ (~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*sec((~e) + (~f)*(~x)))^(~m)*((~a) + (~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)] : nothing) + +("4_5_7_32", +@rule ∫(((~!d)*csc((~!e) + (~!f)*(~x)))^(~m)*((~a) + (~!b)*((~!c)*sec((~!e) + (~!f)*(~x)))^(~n))^ (~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) && + !(ext_isinteger((~m))) ? +((~d)*csc((~e) + (~f)*(~x)))^fracpart((~m))*(sin((~e) + (~f)*(~x))⨸(~d))^fracpart((~m))* ∫((sin((~e) + (~f)*(~x))⨸(~d))^(-(~m))*((~a) + (~b)*((~c)*sec((~e) + (~f)*(~x)))^(~n))^(~p), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/(a sin(m x) + b cos(n x))^p.pdf b/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/(a sin(m x) + b cos(n x))^p.pdf new file mode 100755 index 0000000..3ecd18b Binary files /dev/null and b/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/(a sin(m x) + b cos(n x))^p.pdf differ diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/4.7.4 (c trig)^m (d trig)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/4.7.4 (c trig)^m (d trig)^n.jl new file mode 100644 index 0000000..e9d091b --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/4.7.4 (c trig)^m (d trig)^n.jl @@ -0,0 +1,533 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.7.4 (c trig)^m (d trig)^n *) +("4_7_4_1", +@rule ∫(sin((~!a) + (~!b)*(~x))*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - (~d)^2, 0) ? +sin((~a) - (~c) + ((~b) - (~d))*(~x))⨸(2*((~b) - (~d))) - sin((~a) + (~c) + ((~b) + (~d))*(~x))⨸(2*((~b) + (~d))) : nothing) + +("4_7_4_2", +@rule ∫(cos((~!a) + (~!b)*(~x))*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - (~d)^2, 0) ? +sin((~a) - (~c) + ((~b) - (~d))*(~x))⨸(2*((~b) - (~d))) + sin((~a) + (~c) + ((~b) + (~d))*(~x))⨸(2*((~b) + (~d))) : nothing) + +("4_7_4_3", +@rule ∫(sin((~!a) + (~!b)*(~x))*cos((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + !eq((~b)^2 - (~d)^2, 0) ? +-cos((~a) - (~c) + ((~b) - (~d))*(~x))⨸(2*((~b) - (~d))) - cos((~a) + (~c) + ((~b) + (~d))*(~x))⨸(2*((~b) + (~d))) : nothing) + +("4_7_4_4", +@rule ∫(cos((~!a) + (~!b)*(~x))^2*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + igt((~p)/2, 0) ? +1⨸2*∫(((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) + 1⨸2*∫(cos((~c) + (~d)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_5", +@rule ∫(sin((~!a) + (~!b)*(~x))^2*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + igt((~p)/2, 0) ? +1⨸2*∫(((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) - 1⨸2*∫(cos((~c) + (~d)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_6", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*sin((~!c) + (~!d)*(~x))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + ext_isinteger((~p)) ? +2^(~p)⨸(~e)^(~p)*∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + (~p))*sin((~a) + (~b)*(~x))^(~p), (~x)) : nothing) + +("4_7_4_7", +@rule ∫(((~!f)*sin((~!a) + (~!b)*(~x)))^(~!n)*sin((~!c) + (~!d)*(~x))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~f), (~n), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + ext_isinteger((~p)) ? +2^(~p)⨸(~f)^(~p)*∫(cos((~a) + (~b)*(~x))^(~p)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + (~p)), (~x)) : nothing) + +("4_7_4_8", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~m), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) ? +(~e)^2*((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)* (~g)*((~p) + 1)) : nothing) + +("4_7_4_9", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~m), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) - 1, 0) ? +-(~e)^2*((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)* (~g)*((~p) + 1)) : nothing) + +("4_7_4_10", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~m), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + eq((~m) + 2*(~p) + 2, 0) ? +-((~e)*cos((~a) + (~b)*(~x)))^(~m)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸((~b)*(~g)*(~m)) : nothing) + +("4_7_4_11", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~!m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~m), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + eq((~m) + 2*(~p) + 2, 0) ? +((~e)*sin((~a) + (~b)*(~x)))^(~m)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸((~b)*(~g)*(~m)) : nothing) + +("4_7_4_12", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 2) && + lt((~p), -1) && + ( + gt((~m), 3) || + eq((~p), -3/2) + ) && + ext_isinteger(2*(~m), 2*(~p)) ? +(~e)^2*((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)* (~g)*((~p) + 1)) + (~e)^4*((~m) + (~p) - 1)⨸(4*(~g)^2*((~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) - 4)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_13", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 2) && + lt((~p), -1) && + ( + gt((~m), 3) || + eq((~p), -3/2) + ) && + ext_isinteger(2*(~m), 2*(~p)) ? +-(~e)^2*((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)* (~g)*((~p) + 1)) + (~e)^4*((~m) + (~p) - 1)⨸(4*(~g)^2*((~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) - 4)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_14", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + lt((~p), -1) && + !eq((~m) + 2*(~p) + 2, 0) && + ( + lt((~p), -2) || + eq((~m), 2) + ) && + ext_isinteger(2*(~m), 2*(~p)) ? +((~e)*cos((~a) + (~b)*(~x)))^(~m)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~p) + 1)) + (~e)^2*((~m) + 2*(~p) + 2)⨸(4*(~g)^2*((~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_15", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + lt((~p), -1) && + !eq((~m) + 2*(~p) + 2, 0) && + ( + lt((~p), -2) || + eq((~m), 2) + ) && + ext_isinteger(2*(~m), 2*(~p)) ? +-((~e)*sin((~a) + (~b)*(~x)))^(~m)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~p) + 1)) + (~e)^2*((~m) + 2*(~p) + 2)⨸(4*(~g)^2*((~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_16", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + !eq((~m) + 2*(~p), 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +(~e)^2*((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)* (~g)*((~m) + 2*(~p))) + (~e)^2*((~m) + (~p) - 1)⨸((~m) + 2*(~p))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_17", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + !eq((~m) + 2*(~p), 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +-(~e)^2*((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)* (~g)*((~m) + 2*(~p))) + (~e)^2*((~m) + (~p) - 1)⨸((~m) + 2*(~p))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_18", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + !eq((~m) + 2*(~p) + 2, 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +-((~e)*cos((~a) + (~b)*(~x)))^ (~m)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~m) + (~p) + 1)) + ((~m) + 2*(~p) + 2)⨸((~e)^2*((~m) + (~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + 2)*((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_19", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + !eq((~m) + 2*(~p) + 2, 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~p)) ? +((~e)*sin((~a) + (~b)*(~x)))^(~m)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~m) + (~p) + 1)) + ((~m) + 2*(~p) + 2)⨸((~e)^2*((~m) + (~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) + 2)*((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_20", +@rule ∫(cos((~!a) + (~!b)*(~x))*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~p), 0) && + ext_isinteger(2*(~p)) ? +2*sin((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~d)*(2*(~p) + 1)) + 2*(~p)*(~g)⨸(2*(~p) + 1)*∫(sin((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) - 1), (~x)) : nothing) + +("4_7_4_21", +@rule ∫(sin((~!a) + (~!b)*(~x))*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~p), 0) && + ext_isinteger(2*(~p)) ? +-2*cos((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~d)*(2*(~p) + 1)) + 2*(~p)*(~g)⨸(2*(~p) + 1)*∫(cos((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) - 1), (~x)) : nothing) + +("4_7_4_22", +@rule ∫(cos((~!a) + (~!b)*(~x))*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~p), -1) && + ext_isinteger(2*(~p)) ? +cos((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~p) + 1)) + (2*(~p) + 3)⨸(2*(~g)*((~p) + 1))* ∫(sin((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1), (~x)) : nothing) + +("4_7_4_23", +@rule ∫(sin((~!a) + (~!b)*(~x))*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~p), -1) && + ext_isinteger(2*(~p)) ? +-sin((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~p) + 1)) + (2*(~p) + 3)⨸(2*(~g)*((~p) + 1))* ∫(cos((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1), (~x)) : nothing) + +("4_7_4_24", +@rule ∫(cos((~!a) + (~!b)*(~x))/sqrt(sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) ? +-asin(cos((~a) + (~b)*(~x)) - sin((~a) + (~b)*(~x)))⨸(~d) + log(cos((~a) + (~b)*(~x)) + sin((~a) + (~b)*(~x)) + sqrt(sin((~c) + (~d)*(~x))))⨸(~d) : nothing) + +("4_7_4_25", +@rule ∫(sin((~!a) + (~!b)*(~x))/sqrt(sin((~!c) + (~!d)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) ? +-asin(cos((~a) + (~b)*(~x)) - sin((~a) + (~b)*(~x)))⨸(~d) - log(cos((~a) + (~b)*(~x)) + sin((~a) + (~b)*(~x)) + sqrt(sin((~c) + (~d)*(~x))))⨸(~d) : nothing) + +("4_7_4_26", +@rule ∫(((~!g)*sin((~!c) + (~!d)*(~x)))^(~p)/cos((~!a) + (~!b)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + ext_isinteger(2*(~p)) ? +2*(~g)*∫(sin((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) - 1), (~x)) : nothing) + +("4_7_4_27", +@rule ∫(((~!g)*sin((~!c) + (~!d)*(~x)))^(~p)/sin((~!a) + (~!b)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + ext_isinteger(2*(~p)) ? +2*(~g)*∫(cos((~a) + (~b)*(~x))*((~g)*sin((~c) + (~d)*(~x)))^((~p) - 1), (~x)) : nothing) + +#(* Int[(e_.*cos[a_.+b_.*x_])^m_*(g_.*sin[c_.+d_.*x_])^p_,x_Symbol] := -(e*Cos[a+b*x])^(m+1)*Sin[a+b*x]*(g*Sin[c+d*x])^p/(b*e*(m+p+1)*(Sin[ a+b*x]^2)^((p+1)/2))* Hypergeometric2F1[-(p-1)/2,(m+p+1)/2,(m+p+3)/2,Cos[a+b*x]^2] /; FreeQ[{a,b,c,d,e,g,m,p},x] && EqQ[b*c-a*d,0] && EqQ[d/b,2] && Not[IntegerQ[p]] && Not[IntegerQ[m+p]] *) +#(* Int[(f_.*sin[a_.+b_.*x_])^n_.*(g_.*sin[c_.+d_.*x_])^p_,x_Symbol] := -Cos[a+b*x]*(f*Sin[a+b*x])^(n+1)*(g*Sin[c+d*x])^p/(b*f*(p+1)*(Sin[a+ b*x]^2)^((n+p+1)/2))* Hypergeometric2F1[-(n+p-1)/2,(p+1)/2,(p+3)/2,Cos[a+b*x]^2] /; FreeQ[{a,b,c,d,f,g,n,p},x] && EqQ[b*c-a*d,0] && EqQ[d/b,2] && Not[IntegerQ[p]] && Not[IntegerQ[n+p]] *) +("4_7_4_28", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~g), (~m), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) ? +((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸(((~e)*cos((~a) + (~b)*(~x)))^(~p)*sin((~a) + (~b)*(~x))^(~p))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + (~p))*sin((~a) + (~b)*(~x))^(~p), (~x)) : nothing) + +("4_7_4_29", +@rule ∫(((~!f)*sin((~!a) + (~!b)*(~x)))^(~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) ? +((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸(cos((~a) + (~b)*(~x))^(~p)*((~f)*sin((~a) + (~b)*(~x)))^(~p))* ∫(cos((~a) + (~b)*(~x))^(~p)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + (~p)), (~x)) : nothing) + +("4_7_4_30", +@rule ∫(cos((~!a) + (~!b)*(~x))^2* sin((~!a) + (~!b)*(~x))^2*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + igt((~p)/2, 0) ? +1⨸4*∫(((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) - 1⨸4*∫(cos((~c) + (~d)*(~x))^2*((~g)*sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_31", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*((~!f)*sin((~!a) + (~!b)*(~x)))^(~!n)* sin((~!c) + (~!d)*(~x))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + ext_isinteger((~p)) ? +2^(~p)⨸((~e)^(~p)*(~f)^(~p))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + (~p))*((~f)*sin((~a) + (~b)*(~x)))^((~n) + (~p)), (~x)) : nothing) + +("4_7_4_32", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) + 1, 0) ? +(~e)*((~e)*cos((~a) + (~b)*(~x)))^((~m) - 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~f)*((~n) + (~p) + 1)) : nothing) + +("4_7_4_33", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + eq((~m) + (~p) + 1, 0) ? +-(~e)*((~e)*sin((~a) + (~b)*(~x)))^((~m) - 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~f)*((~n) + (~p) + 1)) : nothing) + +("4_7_4_34", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + eq((~m) + (~n) + 2*(~p) + 2, 0) && + !eq((~m) + (~p) + 1, 0) ? +-((~e)*cos((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~e)*(~f)*((~m) + (~p) + 1)) : nothing) + +("4_7_4_35", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 3) && + lt((~p), -1) && + !eq((~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~e)^2*((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*sin((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~n) + (~p) + 1)) + (~e)^4*((~m) + (~p) - 1)⨸(4*(~g)^2*((~n) + (~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) - 4)*((~f)*sin((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_36", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 3) && + lt((~p), -1) && + !eq((~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-(~e)^2*((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*cos((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~n) + (~p) + 1)) + (~e)^4*((~m) + (~p) - 1)⨸(4*(~g)^2*((~n) + (~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) - 4)*((~f)*cos((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_37", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + lt((~p), -1) && + !eq((~m) + (~n) + 2*(~p) + 2, 0) && + !eq((~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) && + ( + lt((~p), -2) || + eq((~m), 2) || + eq((~m), 3) + ) ? +((~e)*cos((~a) + (~b)*(~x)))^(~m)*((~f)*sin((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~n) + (~p) + 1)) + (~e)^2*((~m) + (~n) + 2*(~p) + 2)⨸(4*(~g)^2*((~n) + (~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*sin((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_38", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + lt((~p), -1) && + !eq((~m) + (~n) + 2*(~p) + 2, 0) && + !eq((~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) && + ( + lt((~p), -2) || + eq((~m), 2) || + eq((~m), 3) + ) ? +-((~e)*sin((~a) + (~b)*(~x)))^(~m)*((~f)*cos((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 1)⨸(2*(~b)*(~g)*((~n) + (~p) + 1)) + (~e)^2*((~m) + (~n) + 2*(~p) + 2)⨸(4*(~g)^2*((~n) + (~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*cos((~a) + (~b)*(~x)))^ (~n)*((~g)*sin((~c) + (~d)*(~x)))^((~p) + 2), (~x)) : nothing) + +("4_7_4_39", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + lt((~n), -1) && + !eq((~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~e)*((~e)*cos((~a) + (~b)*(~x)))^((~m) - 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~f)*((~n) + (~p) + 1)) + (~e)^2*((~m) + (~p) - 1)⨸((~f)^2*((~n) + (~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + 2)*((~g)* sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_40", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + lt((~n), -1) && + !eq((~n) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-(~e)*((~e)*sin((~a) + (~b)*(~x)))^((~m) - 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~f)*((~n) + (~p) + 1)) + (~e)^2*((~m) + (~p) - 1)⨸((~f)^2*((~n) + (~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*cos((~a) + (~b)*(~x)))^((~n) + 2)*((~g)* sin((~c) + (~d)*(~x)))^(~p), (~x)) : nothing) + +("4_7_4_41", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + !eq((~m) + (~n) + 2*(~p), 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~e)*((~e)*cos((~a) + (~b)*(~x)))^((~m) - 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~f)*((~m) + (~n) + 2*(~p))) + (~e)^2*((~m) + (~p) - 1)⨸((~m) + (~n) + 2*(~p))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*sin((~a) + (~b)*(~x)))^(~n)*((~g)*sin((~c) + (~d)*(~x)))^ (~p), (~x)) : nothing) + +("4_7_4_42", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + gt((~m), 1) && + !eq((~m) + (~n) + 2*(~p), 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-(~e)*((~e)*sin((~a) + (~b)*(~x)))^((~m) - 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~f)*((~m) + (~n) + 2*(~p))) + (~e)^2*((~m) + (~p) - 1)⨸((~m) + (~n) + 2*(~p))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) - 2)*((~f)*cos((~a) + (~b)*(~x)))^(~n)*((~g)*sin((~c) + (~d)*(~x)))^ (~p), (~x)) : nothing) + +("4_7_4_43", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + gt((~n), 0) && + gt((~p), 0) && + !eq((~m) + (~n) + 2*(~p), 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-(~f)*((~e)*cos((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) - 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~e)*((~m) + (~n) + 2*(~p))) + 2*(~f)*(~g)*((~n) + (~p) - 1)⨸((~e)*((~m) + (~n) + 2*(~p)))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) - 1)*((~g)* sin((~c) + (~d)*(~x)))^((~p) - 1), (~x)) : nothing) + +("4_7_4_44", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + gt((~n), 0) && + gt((~p), 0) && + !eq((~m) + (~n) + 2*(~p), 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +(~f)*((~e)*sin((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) - 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~e)*((~m) + (~n) + 2*(~p))) + 2*(~f)*(~g)*((~n) + (~p) - 1)⨸((~e)*((~m) + (~n) + 2*(~p)))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) - 1)*((~g)* sin((~c) + (~d)*(~x)))^((~p) - 1), (~x)) : nothing) + +("4_7_4_45", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + gt((~n), 0) && + lt((~p), -1) && + !eq((~m) + (~n) + 2*(~p) + 2, 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-((~e)*cos((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~e)*(~f)*((~m) + (~p) + 1)) + (~f)*((~m) + (~n) + 2*(~p) + 2)⨸(2*(~e)*(~g)*((~m) + (~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) - 1)*((~g)* sin((~c) + (~d)*(~x)))^((~p) + 1), (~x)) : nothing) + +("4_7_4_46", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + gt((~n), 0) && + lt((~p), -1) && + !eq((~m) + (~n) + 2*(~p) + 2, 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +((~e)*sin((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^ (~p)⨸((~b)*(~e)*(~f)*((~m) + (~p) + 1)) + (~f)*((~m) + (~n) + 2*(~p) + 2)⨸(2*(~e)*(~g)*((~m) + (~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) - 1)*((~g)* sin((~c) + (~d)*(~x)))^((~p) + 1), (~x)) : nothing) + +("4_7_4_47", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + !eq((~m) + (~n) + 2*(~p) + 2, 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +-((~e)*cos((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*sin((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸((~b)*(~e)*(~f)*((~m) + (~p) + 1)) + ((~m) + (~n) + 2*(~p) + 2)⨸((~e)^2*((~m) + (~p) + 1))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + 2)*((~f)*sin((~a) + (~b)*(~x)))^(~n)*((~g)*sin((~c) + (~d)*(~x)))^ (~p), (~x)) : nothing) + +("4_7_4_48", +@rule ∫(((~!e)*sin((~!a) + (~!b)*(~x)))^(~m)*((~!f)*cos((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) && + lt((~m), -1) && + !eq((~m) + (~n) + 2*(~p) + 2, 0) && + !eq((~m) + (~p) + 1, 0) && + ext_isinteger(2*(~m), 2*(~n), 2*(~p)) ? +((~e)*sin((~a) + (~b)*(~x)))^((~m) + 1)*((~f)*cos((~a) + (~b)*(~x)))^((~n) + 1)*((~g)*sin((~c) + (~d)*(~x)))^ (~p)⨸((~b)*(~e)*(~f)*((~m) + (~p) + 1)) + ((~m) + (~n) + 2*(~p) + 2)⨸((~e)^2*((~m) + (~p) + 1))* ∫(((~e)*sin((~a) + (~b)*(~x)))^((~m) + 2)*((~f)*cos((~a) + (~b)*(~x)))^(~n)*((~g)*sin((~c) + (~d)*(~x)))^ (~p), (~x)) : nothing) + +#(* Int[(e_.*cos[a_.+b_.*x_])^m_*(f_.*sin[a_.+b_.*x_])^n_.*(g_.*sin[c_. +d_.*x_])^p_,x_Symbol] := -(e*Cos[a+b*x])^(m+1)*(f*Sin[a+b*x])^(n+1)*(g*Sin[c+d*x])^p/(b*e*f*( m+p+1)*(Sin[a+b*x]^2)^((n+p+1)/2))* Hypergeometric2F1[-(n+p-1)/2,(m+p+1)/2,(m+p+3)/2,Cos[a+b*x]^2] /; FreeQ[{a,b,c,d,e,f,g,m,n,p},x] && EqQ[b*c-a*d,0] && EqQ[d/b,2] && Not[IntegerQ[p]] && Not[IntegerQ[m+p]] && Not[IntegerQ[n+p]] *) +("4_7_4_49", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*((~!f)*sin((~!a) + (~!b)*(~x)))^ (~!n)*((~!g)*sin((~!c) + (~!d)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~m), (~n), (~p), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), 2) && + !(ext_isinteger((~p))) ? +((~g)*sin((~c) + (~d)*(~x)))^(~p)⨸(((~e)*cos((~a) + (~b)*(~x)))^(~p)*((~f)*sin((~a) + (~b)*(~x)))^(~p))* ∫(((~e)*cos((~a) + (~b)*(~x)))^((~m) + (~p))*((~f)*sin((~a) + (~b)*(~x)))^((~n) + (~p)), (~x)) : nothing) + +("4_7_4_50", +@rule ∫(((~!e)*cos((~!a) + (~!b)*(~x)))^(~!m)*sin((~!c) + (~!d)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + eq((~b)*(~c) - (~a)*(~d), 0) && + eq((~d)/(~b), Abs[(~m) + 2]) ? +-((~m) + 2)*((~e)*cos((~a) + (~b)*(~x)))^((~m) + 1)* cos(((~m) + 1)*((~a) + (~b)*(~x)))⨸((~d)*(~e)*((~m) + 1)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/4.7.7 F^(c (a+b x)) trig(d+e x)^n.jl b/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/4.7.7 F^(c (a+b x)) trig(d+e x)^n.jl new file mode 100644 index 0000000..167bd7e --- /dev/null +++ b/src/methods/rule_based/rules2/4 Trig functions/4.7 Miscellaneous/4.7.7 F^(c (a+b x)) trig(d+e x)^n.jl @@ -0,0 +1,356 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 4.7.7 F^(c (a+b x)) trig(d+e*x)^n *) +("4_7_7_1", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) ? +(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* sin((~d) + (~e)*(~x))⨸((~e)^2 + (~b)^2*(~c)^2*log((~F))^2) - (~e)*(~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x))⨸((~e)^2 + (~b)^2*(~c)^2*log((~F))^2) : nothing) + +("4_7_7_2", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*cos((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) ? +(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* cos((~d) + (~e)*(~x))⨸((~e)^2 + (~b)^2*(~c)^2*log((~F))^2) + (~e)*(~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x))⨸((~e)^2 + (~b)^2*(~c)^2*log((~F))^2) : nothing) + +("4_7_7_3", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + gt((~n), 1) ? +(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* sin((~d) + (~e)*(~x))^(~n)⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2) - (~e)*(~n)*(~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x))* sin((~d) + (~e)*(~x))^((~n) - 1)⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2) + ((~n)*((~n) - 1)*(~e)^2)⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2)* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x))^((~n) - 2), (~x)) : nothing) + +("4_7_7_4", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*cos((~!d) + (~!e)*(~x))^(~m),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2*(~m)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + gt((~m), 1) ? +(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* cos((~d) + (~e)*(~x))^(~m)⨸((~e)^2*(~m)^2 + (~b)^2*(~c)^2*log((~F))^2) + (~e)*(~m)*(~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x))* cos((~d) + (~e)*(~x))^((~m) - 1)⨸((~e)^2*(~m)^2 + (~b)^2*(~c)^2*log((~F))^2) + ((~m)*((~m) - 1)*(~e)^2)⨸((~e)^2*(~m)^2 + (~b)^2*(~c)^2*log((~F))^2)* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x))^((~m) - 2), (~x)) : nothing) + +("4_7_7_5", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~e)^2*((~n) + 2)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + !eq((~n), -1) && + !eq((~n), -2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* sin((~d) + (~e)*(~x))^((~n) + 2)⨸((~e)^2*((~n) + 1)*((~n) + 2)) + (~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x))*sin((~d) + (~e)*(~x))^((~n) + 1)⨸((~e)*((~n) + 1)) : nothing) + +("4_7_7_6", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*cos((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~e)^2*((~n) + 2)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + !eq((~n), -1) && + !eq((~n), -2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* cos((~d) + (~e)*(~x))^((~n) + 2)⨸((~e)^2*((~n) + 1)*((~n) + 2)) - (~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x))*cos((~d) + (~e)*(~x))^((~n) + 1)⨸((~e)*((~n) + 1)) : nothing) + +("4_7_7_7", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2*((~n) + 2)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + lt((~n), -1) && + !eq((~n), -2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* sin((~d) + (~e)*(~x))^((~n) + 2)⨸((~e)^2*((~n) + 1)*((~n) + 2)) + (~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x))*sin((~d) + (~e)*(~x))^((~n) + 1)⨸((~e)*((~n) + 1)) + ((~e)^2*((~n) + 2)^2 + (~b)^2*(~c)^2*log((~F))^2)⨸((~e)^2*((~n) + 1)*((~n) + 2))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x))^((~n) + 2), (~x)) : nothing) + +("4_7_7_8", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*cos((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2*((~n) + 2)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + lt((~n), -1) && + !eq((~n), -2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* cos((~d) + (~e)*(~x))^((~n) + 2)⨸((~e)^2*((~n) + 1)*((~n) + 2)) - (~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x))*cos((~d) + (~e)*(~x))^((~n) + 1)⨸((~e)*((~n) + 1)) + ((~e)^2*((~n) + 2)^2 + (~b)^2*(~c)^2*log((~F))^2)⨸((~e)^2*((~n) + 1)*((~n) + 2))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x))^((~n) + 2), (~x)) : nothing) + +("4_7_7_9", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + !(ext_isinteger((~n))) ? +ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))*sin((~d) + (~e)*(~x))^(~n)⨸(-1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n)* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*(-1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n)⨸ℯ^((~I)*(~n)*((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_7_7_10", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*cos((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + !(ext_isinteger((~n))) ? +ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))*cos((~d) + (~e)*(~x))^(~n)⨸(1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n)* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*(1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n)⨸ℯ^((~I)*(~n)*((~d) + (~e)*(~x))), (~x)) : nothing) + +("4_7_7_11", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*tan((~!d) + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~n)) ? +(~I)^(~n)*∫( ext_expand( (~F)^((~c)*((~a) + (~b)*(~x)))*(1 - ℯ^(2*(~I)*((~d) + (~e)*(~x))))^ (~n)⨸(1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n), (~x)), (~x)) : nothing) + +("4_7_7_12", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*cot((~!d) + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~n)) ? +(-(~I))^(~n)* ∫(ext_expand( (~F)^((~c)*((~a) + (~b)*(~x)))*(1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^ (~n)⨸(1 - ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n), (~x)), (~x)) : nothing) + +("4_7_7_13", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sec((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + lt((~n), -1) ? +(~b)*(~c)*log((~F))* (~F)^((~c)*((~a) + (~b)*(~x)))*(sec((~d) + (~e)*(~x))^(~n)⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2)) - (~e)*(~n)*(~F)^((~c)*((~a) + (~b)*(~x)))* sec((~d) + (~e)*(~x))^((~n) + 1)*(sin((~d) + (~e)*(~x))⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2)) + (~e)^2*(~n)*(((~n) + 1)⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*sec((~d) + (~e)*(~x))^((~n) + 2), (~x)) : nothing) + +("4_7_7_14", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*csc((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2, 0) && + lt((~n), -1) ? +(~b)*(~c)*log((~F))* (~F)^((~c)*((~a) + (~b)*(~x)))*(csc((~d) + (~e)*(~x))^(~n)⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2)) + (~e)*(~n)*(~F)^((~c)*((~a) + (~b)*(~x)))* csc((~d) + (~e)*(~x))^((~n) + 1)*(cos((~d) + (~e)*(~x))⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2)) + (~e)^2*(~n)*(((~n) + 1)⨸((~e)^2*(~n)^2 + (~b)^2*(~c)^2*log((~F))^2))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*csc((~d) + (~e)*(~x))^((~n) + 2), (~x)) : nothing) + +("4_7_7_15", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sec((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~b)^2*(~c)^2*log((~F))^2 + (~e)^2*((~n) - 2)^2, 0) && + !eq((~n), 1) && + !eq((~n), 2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* sec((~d) + (~e)*(~x))^((~n) - 2)⨸((~e)^2*((~n) - 1)*((~n) - 2)) + (~F)^((~c)*((~a) + (~b)*(~x)))*sec((~d) + (~e)*(~x))^((~n) - 1)*sin((~d) + (~e)*(~x))⨸((~e)*((~n) - 1)) : nothing) + +("4_7_7_16", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*csc((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~b)^2*(~c)^2*log((~F))^2 + (~e)^2*((~n) - 2)^2, 0) && + !eq((~n), 1) && + !eq((~n), 2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* csc((~d) + (~e)*(~x))^((~n) - 2)⨸((~e)^2*((~n) - 1)*((~n) - 2)) + (~F)^((~c)*((~a) + (~b)*(~x)))*csc((~d) + (~e)*(~x))^((~n) - 1)*cos((~d) + (~e)*(~x))⨸((~e)*((~n) - 1)) : nothing) + +("4_7_7_17", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sec((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2*(~c)^2*log((~F))^2 + (~e)^2*((~n) - 2)^2, 0) && + gt((~n), 1) && + !eq((~n), 2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* sec((~d) + (~e)*(~x))^((~n) - 2)⨸((~e)^2*((~n) - 1)*((~n) - 2)) + (~F)^((~c)*((~a) + (~b)*(~x)))*sec((~d) + (~e)*(~x))^((~n) - 1)*sin((~d) + (~e)*(~x))⨸((~e)*((~n) - 1)) + ((~e)^2*((~n) - 2)^2 + (~b)^2*(~c)^2*log((~F))^2)⨸((~e)^2*((~n) - 1)*((~n) - 2))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*sec((~d) + (~e)*(~x))^((~n) - 2), (~x)) : nothing) + +("4_7_7_18", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*csc((~!d) + (~!e)*(~x))^(~n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~b)^2*(~c)^2*log((~F))^2 + (~e)^2*((~n) - 2)^2, 0) && + gt((~n), 1) && + !eq((~n), 2) ? +-(~b)*(~c)*log((~F))*(~F)^((~c)*((~a) + (~b)*(~x)))* csc((~d) + (~e)*(~x))^((~n) - 2)⨸((~e)^2*((~n) - 1)*((~n) - 2)) - (~F)^((~c)*((~a) + (~b)*(~x)))*csc((~d) + (~e)*(~x))^((~n) - 1)*cos((~d) + (~e)*(~x))⨸((~e)*((~n) - 1)) + ((~e)^2*((~n) - 2)^2 + (~b)^2*(~c)^2*log((~F))^2)⨸((~e)^2*((~n) - 1)*((~n) - 2))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*csc((~d) + (~e)*(~x))^((~n) - 2), (~x)) : nothing) + +#(* Int[F_^(c_.*(a_.+b_.*x_))*Sec[d_.+e_.*x_]^n_.,x_Symbol] := 2^n*Int[SimplifyIntegrand[F^(c*(a+b*x))*E^(I*n*(d+e*x))/(1+E^(2*I*( d+e*x)))^n,x],x] /; FreeQ[{F,a,b,c,d,e},x] && IntegerQ[n] *) +#(* Int[F_^(c_.*(a_.+b_.*x_))*Csc[d_.+e_.*x_]^n_.,x_Symbol] := (2*I)^n*Int[SimplifyIntegrand[F^(c*(a+b*x))*E^(-I*n*(d+e*x))/(1-E^(- 2*I*(d+e*x)))^n,x],x] /; FreeQ[{F,a,b,c,d,e},x] && IntegerQ[n] *) +("4_7_7_19", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sec((~!d) + (~!k)*π + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger(4*(~k)) && + ext_isinteger((~n)) ? +2^(~n)*ℯ^((~I)*(~k)*(~n)*π)*ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))* (~F)^((~c)*((~a) + (~b)*(~x)))⨸((~I)*(~e)*(~n) + (~b)*(~c)*log((~F)))* hypergeometric2f1((~n), (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), 1 + (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), -ℯ^(2*(~I)*(~k)*π)*ℯ^(2*(~I)*((~d) + (~e)*(~x)))) : nothing) + +("4_7_7_20", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sec((~!d) + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~n)) ? +2^(~n)*ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))*(~F)^((~c)*((~a) + (~b)*(~x)))⨸((~I)*(~e)*(~n) + (~b)*(~c)*log((~F)))* hypergeometric2f1((~n), (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), 1 + (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), -ℯ^(2*(~I)*((~d) + (~e)*(~x)))) : nothing) + +("4_7_7_21", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*csc((~!d) + (~!k)*π + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger(4*(~k)) && + ext_isinteger((~n)) ? +(-2*(~I))^(~n)*ℯ^((~I)*(~k)*(~n)*π)* ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))*((~F)^((~c)*((~a) + (~b)*(~x)))⨸((~I)*(~e)*(~n) + (~b)*(~c)*log((~F))))* hypergeometric2f1((~n), (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), 1 + (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), ℯ^(2*(~I)*(~k)*π)*ℯ^(2*(~I)*((~d) + (~e)*(~x)))) : nothing) + +("4_7_7_22", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*csc((~!d) + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + ext_isinteger((~n)) ? +(-2*(~I))^(~n)*ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))*((~F)^((~c)*((~a) + (~b)*(~x)))⨸((~I)*(~e)*(~n) + (~b)*(~c)*log((~F))))* hypergeometric2f1((~n), (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), 1 + (~n)⨸2 - (~I)*(~b)*(~c)*log((~F))⨸(2*(~e)), ℯ^(2*(~I)*((~d) + (~e)*(~x)))) : nothing) + +("4_7_7_23", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sec((~!d) + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !(ext_isinteger((~n))) ? +(1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n)*sec((~d) + (~e)*(~x))^(~n)⨸ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))* ∫(ext_simplify( (~F)^((~c)*((~a) + (~b)*(~x)))*ℯ^((~I)*(~n)*((~d) + (~e)*(~x)))⨸(1 + ℯ^(2*(~I)*((~d) + (~e)*(~x))))^(~n), (~x)), (~x)) : nothing) + +("4_7_7_24", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*csc((~!d) + (~!e)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && + !(ext_isinteger((~n))) ? +(1 - ℯ^(-2*(~I)*((~d) + (~e)*(~x))))^(~n)*csc((~d) + (~e)*(~x))^(~n)⨸ℯ^(-(~I)*(~n)*((~d) + (~e)*(~x)))* ∫(ext_simplify( (~F)^((~c)*((~a) + (~b)*(~x)))*ℯ^(-(~I)*(~n)*((~d) + (~e)*(~x)))⨸(1 - ℯ^(-2*(~I)*((~d) + (~e)*(~x))))^(~n), (~x)), (~x)) : nothing) + +("4_7_7_25", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~f) + (~!g)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~f)^2 - (~g)^2, 0) && + ilt((~n), 0) ? +2^(~n)*(~f)^(~n)* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d)⨸2 - (~f)*π⨸(4*(~g)) + (~e)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +("4_7_7_26", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~f) + (~!g)*cos((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~f) - (~g), 0) && + ilt((~n), 0) ? +2^(~n)*(~f)^(~n)*∫((~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d)⨸2 + (~e)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +("4_7_7_27", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~f) + (~!g)*cos((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~f) + (~g), 0) && + ilt((~n), 0) ? +2^(~n)*(~f)^(~n)*∫((~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d)⨸2 + (~e)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +("4_7_7_28", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~f) + (~!g)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~f)^2 - (~g)^2, 0) && + !(ext_isinteger((~n))) ? +((~f) + (~g)*sin((~d) + (~e)*(~x)))^(~n)⨸cos((~d)⨸2 - (~f)*π⨸(4*(~g)) + (~e)*(~x)⨸2)^(2*(~n))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d)⨸2 - (~f)*π⨸(4*(~g)) + (~e)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +("4_7_7_29", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~f) + (~!g)*cos((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~f) - (~g), 0) && + !(ext_isinteger((~n))) ? +((~f) + (~g)*cos((~d) + (~e)*(~x)))^(~n)⨸cos((~d)⨸2 + (~e)*(~x)⨸2)^(2*(~n))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d)⨸2 + (~e)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +("4_7_7_30", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~f) + (~!g)*cos((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~f) + (~g), 0) && + !(ext_isinteger((~n))) ? +((~f) + (~g)*cos((~d) + (~e)*(~x)))^(~n)⨸sin((~d)⨸2 + (~e)*(~x)⨸2)^(2*(~n))* ∫((~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d)⨸2 + (~e)*(~x)⨸2)^(2*(~n)), (~x)) : nothing) + +("4_7_7_31", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))* cos((~!d) + (~!e)*(~x))^(~!m)*((~f) + (~!g)*sin((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~f)^2 - (~g)^2, 0) && + ext_isinteger((~m), (~n)) && + eq((~m) + (~n), 0) ? +(~g)^(~n)*∫((~F)^((~c)*((~a) + (~b)*(~x)))*tan((~f)*π⨸(4*(~g)) - (~d)⨸2 - (~e)*(~x)⨸2)^(~m), (~x)) : nothing) + +("4_7_7_32", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))* sin((~!d) + (~!e)*(~x))^(~!m)*((~f) + (~!g)*cos((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~f) - (~g), 0) && + ext_isinteger((~m), (~n)) && + eq((~m) + (~n), 0) ? +(~f)^(~n)*∫((~F)^((~c)*((~a) + (~b)*(~x)))*tan((~d)⨸2 + (~e)*(~x)⨸2)^(~m), (~x)) : nothing) + +("4_7_7_33", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))* sin((~!d) + (~!e)*(~x))^(~!m)*((~f) + (~!g)*cos((~!d) + (~!e)*(~x)))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~f) + (~g), 0) && + ext_isinteger((~m), (~n)) && + eq((~m) + (~n), 0) ? +(~f)^(~n)*∫((~F)^((~c)*((~a) + (~b)*(~x)))*cot((~d)⨸2 + (~e)*(~x)⨸2)^(~m), (~x)) : nothing) + +("4_7_7_34", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~h) + (~!i)*cos((~!d) + (~!e)*(~x)))/((~f) + (~!g)*sin((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~x)) && + eq((~f)^2 - (~g)^2, 0) && + eq((~h)^2 - (~i)^2, 0) && + eq((~g)*(~h) - (~f)*(~i), 0) ? +2*(~i)*∫((~F)^((~c)*((~a) + (~b)*(~x)))*(cos((~d) + (~e)*(~x))⨸((~f) + (~g)*sin((~d) + (~e)*(~x)))), (~x)) + ∫((~F)^((~c)*((~a) + (~b)*(~x)))*(((~h) - (~i)*cos((~d) + (~e)*(~x)))⨸((~f) + (~g)*sin((~d) + (~e)*(~x)))), (~x)) : nothing) + +("4_7_7_35", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*((~h) + (~!i)*sin((~!d) + (~!e)*(~x)))/((~f) + (~!g)*cos((~!d) + (~!e)*(~x))),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~i), (~x)) && + eq((~f)^2 - (~g)^2, 0) && + eq((~h)^2 - (~i)^2, 0) && + eq((~g)*(~h) + (~f)*(~i), 0) ? +2*(~i)*∫((~F)^((~c)*((~a) + (~b)*(~x)))*(sin((~d) + (~e)*(~x))⨸((~f) + (~g)*cos((~d) + (~e)*(~x)))), (~x)) + ∫((~F)^((~c)*((~a) + (~b)*(~x)))*(((~h) - (~i)*sin((~d) + (~e)*(~x)))⨸((~f) + (~g)*cos((~d) + (~e)*(~x)))), (~x)) : nothing) + +("4_7_7_36", +@rule ∫((~F)^((~!c)*(~u))*(~G)((~v))^(~!n),(~x)) => + !contains_var((~F), (~c), (~n), (~x)) && + istrig((~G)) && + linear((~u), (~v), (~x)) && + !(linear_without_simplify((~u), (~v), (~x))) ? +∫((~F)^((~c)*expand_to_sum((~u), (~x)))*(~G)(expand_to_sum((~v), (~x)))^(~n), (~x)) : nothing) + +# Rule skipped because of "Module": +# Int[(f_.*x_)^m_.*F_^(c_.*(a_. + b_.*x_))*Sin[d_. + e_.*x_]^n_., x_Symbol] := Module[{u = IntHide[F^(c*(a + b*x))*Sin[d + e*x]^n, x]}, Dist[(f*x)^m, u, x] - f*m*Int[(f*x)^(m - 1)*u, x]] /; FreeQ[{F, a, b, c, d, e, f}, x] && IGtQ[n, 0] && GtQ[m, 0] + +# Rule skipped because of "Module": +# Int[(f_.*x_)^m_.*F_^(c_.*(a_. + b_.*x_))*Cos[d_. + e_.*x_]^n_., x_Symbol] := Module[{u = IntHide[F^(c*(a + b*x))*Cos[d + e*x]^n, x]}, Dist[(f*x)^m, u, x] - f*m*Int[(f*x)^(m - 1)*u, x]] /; FreeQ[{F, a, b, c, d, e, f}, x] && IGtQ[n, 0] && GtQ[m, 0] + +("4_7_7_39", +@rule ∫(((~!f)*(~x))^(~m)*(~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + ( + lt((~m), -1) || + sumsimpler((~m), 1) + ) ? +((~f)*(~x))^((~m) + 1)⨸((~f)*((~m) + 1))*(~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x)) - (~e)⨸((~f)*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 1)*(~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x)), (~x)) - (~b)*(~c)*log((~F))⨸((~f)*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 1)*(~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x)), (~x)) : nothing) + +("4_7_7_40", +@rule ∫(((~!f)*(~x))^(~m)*(~F)^((~!c)*((~!a) + (~!b)*(~x)))*cos((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + ( + lt((~m), -1) || + sumsimpler((~m), 1) + ) ? +((~f)*(~x))^((~m) + 1)⨸((~f)*((~m) + 1))*(~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x)) + (~e)⨸((~f)*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 1)*(~F)^((~c)*((~a) + (~b)*(~x)))*sin((~d) + (~e)*(~x)), (~x)) - (~b)*(~c)*log((~F))⨸((~f)*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 1)*(~F)^((~c)*((~a) + (~b)*(~x)))*cos((~d) + (~e)*(~x)), (~x)) : nothing) + +#(* Int[(f_.*x_)^m_.*F_^(c_.*(a_.+b_.*x_))*Sin[d_.+e_.*x_]^n_.,x_ Symbol] := I^n/2^n*Int[ExpandIntegrand[(f*x)^m*F^(c*(a+b*x)),(E^(-I*(d+e*x))-E^ (I*(d+e*x)))^n,x],x] /; FreeQ[{F,a,b,c,d,e,f},x] && IGtQ[n,0] *) +#(* Int[(f_.*x_)^m_.*F_^(c_.*(a_.+b_.*x_))*Cos[d_.+e_.*x_]^n_.,x_ Symbol] := 1/2^n*Int[ExpandIntegrand[(f*x)^m*F^(c*(a+b*x)),(E^(-I*(d+e*x))+E^( I*(d+e*x)))^n,x],x] /; FreeQ[{F,a,b,c,d,e,f},x] && IGtQ[n,0] *) +("4_7_7_41", +@rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x))^(~!m)* cos((~!f) + (~!g)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + igt((~m), 0) && + igt((~n), 0) ? +∫(expand_trig_reduce((~F)^((~c)*((~a) + (~b)*(~x))), sin((~d) + (~e)*(~x))^(~m)*cos((~f) + (~g)*(~x))^(~n), (~x)), (~x)) : nothing) + +("4_7_7_42", +@rule ∫((~x)^(~!p)*(~F)^((~!c)*((~!a) + (~!b)*(~x)))*sin((~!d) + (~!e)*(~x))^(~!m)* cos((~!f) + (~!g)*(~x))^(~!n),(~x)) => + !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + igt((~m), 0) && + igt((~n), 0) && + igt((~p), 0) ? +∫(expand_trig_reduce((~x)^(~p)*(~F)^((~c)*((~a) + (~b)*(~x))), sin((~d) + (~e)*(~x))^(~m)*cos((~f) + (~g)*(~x))^(~n), (~x)), (~x)) : nothing) + +# ("4_7_7_43", +# @rule ∫((~F)^((~!c)*((~!a) + (~!b)*(~x)))*(~G)((~!d) + (~!e)*(~x))^(~!m)*(~H)((~!d) + (~!e)*(~x))^(~!n),(~x)) => +# !contains_var((~F), (~a), (~b), (~c), (~d), (~e), (~x)) && +# igt((~m), 0) && +# igt((~n), 0) && +# istrig((~G)) && +# istrig((~H)) ? +# ∫(ExpandTrigToExp[(~F)^((~c)*((~a) + (~b)*(~x))), (~G)((~d) + (~e)*(~x))^(~m)*(~H)((~d) + (~e)*(~x))^(~n), (~x)], (~x)) : nothing) +# +# ("4_7_7_44", +# @rule ∫((~F)^(~u)*sin((~v))^(~!n),(~x)) => +# !contains_var((~F), (~x)) && +# ( +# linear((~u), (~x)) || +# poly((~u), (~x), 2) +# ) && +# ( +# linear((~v), (~x)) || +# poly((~v), (~x), 2) +# ) && +# igt((~n), 0) ? +# ∫(ExpandTrigToExp[(~F)^(~u), sin((~v))^(~n), (~x)], (~x)) : nothing) +# +# ("4_7_7_45", +# @rule ∫((~F)^(~u)*cos((~v))^(~!n),(~x)) => +# !contains_var((~F), (~x)) && +# ( +# linear((~u), (~x)) || +# poly((~u), (~x), 2) +# ) && +# ( +# linear((~v), (~x)) || +# poly((~v), (~x), 2) +# ) && +# igt((~n), 0) ? +# ∫(ExpandTrigToExp[(~F)^(~u), cos((~v))^(~n), (~x)], (~x)) : nothing) +# +# ("4_7_7_46", +# @rule ∫((~F)^(~u)*sin((~v))^(~!m)*cos((~v))^(~!n),(~x)) => +# !contains_var((~F), (~x)) && +# ( +# linear((~u), (~x)) || +# poly((~u), (~x), 2) +# ) && +# ( +# linear((~v), (~x)) || +# poly((~v), (~x), 2) +# ) && +# igt((~m), 0) && +# igt((~n), 0) ? +# ∫(ExpandTrigToExp[(~F)^(~u), sin((~v))^(~m)*cos((~v))^(~n), (~x)], (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/5 Inverse trig functions/5.1 Inverse sine/5.1.1 (a+b arcsin(c x))^n.jl b/src/methods/rule_based/rules2/5 Inverse trig functions/5.1 Inverse sine/5.1.1 (a+b arcsin(c x))^n.jl new file mode 100644 index 0000000..dc70525 --- /dev/null +++ b/src/methods/rule_based/rules2/5 Inverse trig functions/5.1 Inverse sine/5.1.1 (a+b arcsin(c x))^n.jl @@ -0,0 +1,39 @@ +file_rules = [ +# (* ::Subsection::Closed:: *) +# (* 5.1.1 (a+b arcsin(c x))^n *) +("5_1_1_1", +@rule ∫(((~!a) + (~!b)*asin((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~n), 0) ? +(~x)*((~a) + (~b)*asin((~c)*(~x)))^(~n) - (~b)*(~c)*(~n)*∫((~x)*((~a) + (~b)*asin((~c)*(~x)))^((~n) - 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_1_2", +@rule ∫(((~!a) + (~!b)*acos((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~n), 0) ? +(~x)*((~a) + (~b)*acos((~c)*(~x)))^(~n) + (~b)*(~c)*(~n)*∫((~x)*((~a) + (~b)*acos((~c)*(~x)))^((~n) - 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_1_3", +@rule ∫(((~!a) + (~!b)*asin((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + lt((~n), -1) ? +sqrt(1 - (~c)^2*(~x)^2)*((~a) + (~b)*asin((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) + (~c)⨸((~b)*((~n) + 1))* ∫((~x)*((~a) + (~b)*asin((~c)*(~x)))^((~n) + 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_1_4", +@rule ∫(((~!a) + (~!b)*acos((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + lt((~n), -1) ? +-sqrt(1 - (~c)^2*(~x)^2)*((~a) + (~b)*acos((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~c)⨸((~b)*((~n) + 1))* ∫((~x)*((~a) + (~b)*acos((~c)*(~x)))^((~n) + 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_1_5", +@rule ∫(((~!a) + (~!b)*asin((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) ? +1⨸((~b)*(~c))*int_and_subst((~x)^(~n)*cos(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*asin((~c)*(~x)), "5_1_1_5") : nothing) + +("5_1_1_6", +@rule ∫(((~!a) + (~!b)*acos((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) ? +-1⨸((~b)*(~c))*int_and_subst((~x)^(~n)*sin(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*acos((~c)*(~x)), "5_1_1_6") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/5 Inverse trig functions/5.1 Inverse sine/5.1.2 (d x)^m (a+b arcsin(c x))^n.jl b/src/methods/rule_based/rules2/5 Inverse trig functions/5.1 Inverse sine/5.1.2 (d x)^m (a+b arcsin(c x))^n.jl new file mode 100644 index 0000000..b214948 --- /dev/null +++ b/src/methods/rule_based/rules2/5 Inverse trig functions/5.1 Inverse sine/5.1.2 (d x)^m (a+b arcsin(c x))^n.jl @@ -0,0 +1,99 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 5.1.2 (d x)^m (a+b arcsin(c x))^n *) +#(* Int[(a_.+b_.*ArcSin[c_.*x_])^n_./x_,x_Symbol] := 1/b*Subst[Int[x^n*Cot[-a/b+x/b],x],x,a+b*ArcSin[c*x]] /; FreeQ[{a,b,c},x] && IGtQ[n,0] *) +#(* Int[(a_.+b_.*ArcCos[c_.*x_])^n_./x_,x_Symbol] := -1/b*Subst[Int[x^n*Tan[-a/b+x/b],x],x,a+b*ArcCos[c*x]] /; FreeQ[{a,b,c},x] && IGtQ[n,0] *) +("5_1_2_1", +@rule ∫(((~!a) + (~!b)*asin((~!c)*(~x)))^(~!n)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~n), 0) ? +int_and_subst(((~a) + (~b)*(~x))^(~n)*cot((~x)), (~x), (~x), asin((~c)*(~x)), "5_1_2_1") : nothing) + +("5_1_2_2", +@rule ∫(((~!a) + (~!b)*acos((~!c)*(~x)))^(~!n)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~n), 0) ? +-int_and_subst(((~a) + (~b)*(~x))^(~n)*tan((~x)), (~x), (~x), acos((~c)*(~x)), "5_1_2_2") : nothing) + +("5_1_2_3", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*asin((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + igt((~n), 0) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*asin((~c)*(~x)))^(~n)⨸((~d)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~d)*((~m) + 1))* ∫(((~d)*(~x))^((~m) + 1)*((~a) + (~b)*asin((~c)*(~x)))^((~n) - 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_2_4", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*acos((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + igt((~n), 0) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*acos((~c)*(~x)))^(~n)⨸((~d)*((~m) + 1)) + (~b)*(~c)*(~n)⨸((~d)*((~m) + 1))* ∫(((~d)*(~x))^((~m) + 1)*((~a) + (~b)*acos((~c)*(~x)))^((~n) - 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_2_5", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asin((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + gt((~n), 0) ? +(~x)^((~m) + 1)*((~a) + (~b)*asin((~c)*(~x)))^(~n)⨸((~m) + 1) - (~b)*(~c)*(~n)⨸((~m) + 1)* ∫((~x)^((~m) + 1)*((~a) + (~b)*asin((~c)*(~x)))^((~n) - 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_2_6", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acos((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + gt((~n), 0) ? +(~x)^((~m) + 1)*((~a) + (~b)*acos((~c)*(~x)))^(~n)⨸((~m) + 1) + (~b)*(~c)*(~n)⨸((~m) + 1)* ∫((~x)^((~m) + 1)*((~a) + (~b)*acos((~c)*(~x)))^((~n) - 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_2_7", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asin((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + ge((~n), -2) && + lt((~n), -1) ? +(~x)^(~m)*sqrt(1 - (~c)^2*(~x)^2)*((~a) + (~b)*asin((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - 1⨸((~b)^2*(~c)^((~m) + 1)*((~n) + 1))* int_and_subst( ExpandTrigReduce[(~x)^((~n) + 1), sin(-(~a)⨸(~b) + (~x)⨸(~b))^((~m) - 1)*((~m) - ((~m) + 1)*sin(-(~a)⨸(~b) + (~x)⨸(~b))^2), (~x)], (~x), (~x), (~a) + (~b)*asin((~c)*(~x)), "5_1_2_7") : nothing) + +("5_1_2_8", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acos((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + ge((~n), -2) && + lt((~n), -1) ? +-(~x)^(~m)*sqrt( 1 - (~c)^2*(~x)^2)*((~a) + (~b)*acos((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - 1⨸((~b)^2*(~c)^((~m) + 1)*((~n) + 1))* int_and_subst( ExpandTrigReduce[(~x)^((~n) + 1), cos(-(~a)⨸(~b) + (~x)⨸(~b))^((~m) - 1)*((~m) - ((~m) + 1)*cos(-(~a)⨸(~b) + (~x)⨸(~b))^2), (~x)], (~x), (~x), (~a) + (~b)*acos((~c)*(~x)), "5_1_2_8") : nothing) + +("5_1_2_9", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asin((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + lt((~n), -2) ? +(~x)^(~m)*sqrt(1 - (~c)^2*(~x)^2)*((~a) + (~b)*asin((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~m)⨸((~b)*(~c)*((~n) + 1))* ∫((~x)^((~m) - 1)*((~a) + (~b)*asin((~c)*(~x)))^((~n) + 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) + (~c)*((~m) + 1)⨸((~b)*((~n) + 1))* ∫((~x)^((~m) + 1)*((~a) + (~b)*asin((~c)*(~x)))^((~n) + 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_2_10", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acos((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + lt((~n), -2) ? +-(~x)^(~m)*sqrt( 1 - (~c)^2*(~x)^2)*((~a) + (~b)*acos((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) + (~m)⨸((~b)*(~c)*((~n) + 1))* ∫((~x)^((~m) - 1)*((~a) + (~b)*acos((~c)*(~x)))^((~n) + 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) - (~c)*((~m) + 1)⨸((~b)*((~n) + 1))* ∫((~x)^((~m) + 1)*((~a) + (~b)*acos((~c)*(~x)))^((~n) + 1)⨸sqrt(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("5_1_2_11", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asin((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~m), 0) ? +1⨸((~b)*(~c)^((~m) + 1))* int_and_subst((~x)^(~n)*sin(-(~a)⨸(~b) + (~x)⨸(~b))^(~m)*cos(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*asin((~c)*(~x)), "5_1_2_11") : nothing) + +("5_1_2_12", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acos((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~m), 0) ? +-1⨸((~b)*(~c)^((~m) + 1))* int_and_subst((~x)^(~n)*cos(-(~a)⨸(~b) + (~x)⨸(~b))^(~m)*sin(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*acos((~c)*(~x)), "5_1_2_12") : nothing) + +# ("5_1_2_13", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*asin((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*asin((~c)*(~x)))^(~n), (~x)] : nothing) + +# ("5_1_2_14", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*acos((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*acos((~c)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/5 Inverse trig functions/5.3 Inverse tangent/5.3.1 (a+b arctan(c x^n))^p.jl b/src/methods/rule_based/rules2/5 Inverse trig functions/5.3 Inverse tangent/5.3.1 (a+b arctan(c x^n))^p.jl new file mode 100644 index 0000000..368e3d1 --- /dev/null +++ b/src/methods/rule_based/rules2/5 Inverse trig functions/5.3 Inverse tangent/5.3.1 (a+b arctan(c x^n))^p.jl @@ -0,0 +1,77 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 5.3.1 (a+b arctan(c x^n))^p *) +("5_3_1_1", +@rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~n), 1) || + eq((~p), 1) + ) ? +(~x)*((~a) + (~b)*atan((~c)*(~x)^(~n)))^(~p) - (~b)*(~c)*(~n)*(~p)* ∫((~x)^(~n)*((~a) + (~b)*atan((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 + (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("5_3_1_2", +@rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~n), 1) || + eq((~p), 1) + ) ? +(~x)*((~a) + (~b)*acot((~c)*(~x)^(~n)))^(~p) + (~b)*(~c)*(~n)*(~p)* ∫((~x)^(~n)*((~a) + (~b)*acot((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 + (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("5_3_1_3", +@rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) ? +∫(ext_expand(((~a) + ((~I)*(~b)*log(1 - (~I)*(~c)*(~x)^(~n)))⨸ 2 - ((~I)*(~b)*log(1 + (~I)*(~c)*(~x)^(~n)))⨸2)^(~p), (~x)), (~x)) : nothing) + +("5_3_1_4", +@rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) ? +∫(ext_expand(((~a) + ((~I)*(~b)*log(1 - (~I)*(~x)^(-(~n))⨸(~c)))⨸ 2 - ((~I)*(~b)*log(1 + (~I)*(~x)^(-(~n))⨸(~c)))⨸2)^(~p), (~x)), (~x)) : nothing) + +("5_3_1_5", +@rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫(((~a) + (~b)*acot((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("5_3_1_6", +@rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫(((~a) + (~b)*atan((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("5_3_1_7", +@rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*atan((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "5_3_1_7") : nothing) + +("5_3_1_8", +@rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*acot((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "5_3_1_8") : nothing) + +# ("5_3_1_9", +# @rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)^(~!n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*atan((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +# ("5_3_1_10", +# @rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)^(~!n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*acot((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/5 Inverse trig functions/5.3 Inverse tangent/5.3.2 (d x)^m (a+b arctan(c x^n))^p.jl b/src/methods/rule_based/rules2/5 Inverse trig functions/5.3 Inverse tangent/5.3.2 (d x)^m (a+b arctan(c x^n))^p.jl new file mode 100644 index 0000000..8b298c1 --- /dev/null +++ b/src/methods/rule_based/rules2/5 Inverse trig functions/5.3 Inverse tangent/5.3.2 (d x)^m (a+b arctan(c x^n))^p.jl @@ -0,0 +1,181 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 5.3.2 (d x)^m (a+b arctan(c x^n))^p *) +("5_3_2_1", +@rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) ? +(~a)*log((~x)) + (~I)*(~b)⨸2*∫(log(1 - (~I)*(~c)*(~x))⨸(~x), (~x)) - (~I)*(~b)⨸2*∫(log(1 + (~I)*(~c)*(~x))⨸(~x), (~x)) : nothing) + +("5_3_2_2", +@rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) ? +(~a)*log((~x)) + (~I)*(~b)⨸2*∫(log(1 - (~I)⨸((~c)*(~x)))⨸(~x), (~x)) - (~I)*(~b)⨸2*∫(log(1 + (~I)⨸((~c)*(~x)))⨸(~x), (~x)) : nothing) + +("5_3_2_3", +@rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)))^(~p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) ? +2*((~a) + (~b)*atan((~c)*(~x)))^(~p)*atanh(1 - 2⨸(1 + (~I)*(~c)*(~x))) - 2*(~b)*(~c)*(~p)* ∫(((~a) + (~b)*atan((~c)*(~x)))^((~p) - 1)* atanh(1 - 2⨸(1 + (~I)*(~c)*(~x)))⨸(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("5_3_2_4", +@rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)))^(~p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) ? +2*((~a) + (~b)*acot((~c)*(~x)))^(~p)*acoth(1 - 2⨸(1 + (~I)*(~c)*(~x))) + 2*(~b)*(~c)*(~p)* ∫(((~a) + (~b)*acot((~c)*(~x)))^((~p) - 1)* acoth(1 - 2⨸(1 + (~I)*(~c)*(~x)))⨸(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("5_3_2_5", +@rule ∫(((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*atan((~c)*(~x)))^(~p)⨸(~x), (~x), (~x), (~x)^(~n), "5_3_2_5") : nothing) + +("5_3_2_6", +@rule ∫(((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*acot((~c)*(~x)))^(~p)⨸(~x), (~x), (~x), (~x)^(~n), "5_3_2_6") : nothing) + +("5_3_2_7", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + eq((~n), 1) && + ext_isinteger((~m)) + ) && + !eq((~m), -1) ? +(~x)^((~m) + 1)*((~a) + (~b)*atan((~c)*(~x)^(~n)))^(~p)⨸((~m) + 1) - (~b)*(~c)*(~n)*(~p)⨸((~m) + 1)* ∫((~x)^((~m) + (~n))*((~a) + (~b)*atan((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 + (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("5_3_2_8", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + eq((~n), 1) && + ext_isinteger((~m)) + ) && + !eq((~m), -1) ? +(~x)^((~m) + 1)*((~a) + (~b)*acot((~c)*(~x)^(~n)))^(~p)⨸((~m) + 1) + (~b)*(~c)*(~n)*(~p)⨸((~m) + 1)* ∫((~x)^((~m) + (~n))*((~a) + (~b)*acot((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 + (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("5_3_2_9", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 1) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*atan((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "5_3_2_9") : nothing) + +("5_3_2_10", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 1) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*acot((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "5_3_2_10") : nothing) + +("5_3_2_11", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + ext_isinteger((~m)) ? +∫(ext_expand( (~x)^(~m)*((~a) + ((~I)*(~b)*log(1 - (~I)*(~c)*(~x)^(~n)))⨸2 - ((~I)*(~b)*log(1 + (~I)*(~c)*(~x)^(~n)))⨸2)^(~p), (~x)), (~x)) : nothing) + +("5_3_2_12", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + ext_isinteger((~m)) ? +∫(ext_expand( (~x)^(~m)*((~a) + ((~I)*(~b)*log(1 - (~I)*(~x)^(-(~n))⨸(~c)))⨸2 - ((~I)*(~b)*log(1 + (~I)*(~x)^(-(~n))⨸(~c)))⨸ 2)^(~p), (~x)), (~x)) : nothing) + +("5_3_2_13", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + isfraction((~m)) ? +ext_den((~m))*int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*atan((~c)*(~x)^(ext_den((~m))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~m))), "5_3_2_13") : nothing) + +("5_3_2_14", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + isfraction((~m)) ? +ext_den((~m))*int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*acot((~c)*(~x)^(ext_den((~m))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~m))), "5_3_2_14") : nothing) + +("5_3_2_15", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫((~x)^(~m)*((~a) + (~b)*acot((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("5_3_2_16", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫((~x)^(~m)*((~a) + (~b)*atan((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("5_3_2_17", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*atan((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "5_3_2_17") : nothing) + +("5_3_2_18", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*acot((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "5_3_2_18") : nothing) + +("5_3_2_19", +@rule ∫(((~d)*(~x))^(~m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger((~n)) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*atan((~c)*(~x)^(~n)))⨸((~d)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~d)^(~n)*((~m) + 1))*∫(((~d)*(~x))^((~m) + (~n))⨸(1 + (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("5_3_2_20", +@rule ∫(((~d)*(~x))^(~m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger((~n)) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*acot((~c)*(~x)^(~n)))⨸((~d)*((~m) + 1)) + (~b)*(~c)*(~n)⨸((~d)^(~n)*((~m) + 1))*∫(((~d)*(~x))^((~m) + (~n))⨸(1 + (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("5_3_2_21", +@rule ∫(((~!d)*(~x))^(~m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + isrational((~m), (~n)) + ) ? +(~d)^intpart((~m))*((~d)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*atan((~c)*(~x)))^(~p), (~x)) : nothing) + +("5_3_2_22", +@rule ∫(((~!d)*(~x))^(~m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + isrational((~m), (~n)) + ) ? +(~d)^intpart((~m))*((~d)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*acot((~c)*(~x)))^(~p), (~x)) : nothing) + +# ("5_3_2_23", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*atan((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*atan((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +# ("5_3_2_24", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*acot((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*acot((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.1 (a+b arcsinh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.1 (a+b arcsinh(c x))^n.jl new file mode 100644 index 0000000..a9acbe4 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.1 (a+b arcsinh(c x))^n.jl @@ -0,0 +1,22 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.1.1 (a+b arcsinh(c x))^n *) +("7_1_1_1", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~n), 0) ? +(~x)*((~a) + (~b)*asinh((~c)*(~x)))^(~n) - (~b)*(~c)*(~n)*∫((~x)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_1_2", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + lt((~n), -1) ? +sqrt(1 + (~c)^2*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~c)⨸((~b)*((~n) + 1))* ∫((~x)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_1_3", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) ? +1⨸((~b)*(~c))* int_and_subst((~x)^(~n)*cosh(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*asinh((~c)*(~x)), "7_1_1_3") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.2 (d x)^m (a+b arcsinh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.2 (d x)^m (a+b arcsinh(c x))^n.jl new file mode 100644 index 0000000..8b183f8 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.2 (d x)^m (a+b arcsinh(c x))^n.jl @@ -0,0 +1,51 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.1.2 (d x)^m (a+b arcsinh(c x))^n *) +("7_1_2_1", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~n), 0) ? +1⨸(~b)*int_and_subst((~x)^(~n)*coth(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*asinh((~c)*(~x)), "7_1_2_1") : nothing) + +("7_1_2_2", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + igt((~n), 0) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~d)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~d)*((~m) + 1))* ∫(((~d)*(~x))^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_2_3", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + gt((~n), 0) ? +(~x)^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~m) + 1) - (~b)*(~c)*(~n)⨸((~m) + 1)* ∫((~x)^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_2_4", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + ge((~n), -2) && + lt((~n), -1) ? +(~x)^(~m)*sqrt( 1 + (~c)^2*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - 1⨸((~b)^2*(~c)^((~m) + 1)*((~n) + 1))* int_and_subst(expand_trig_reduce((~x)^((~n) + 1), sinh(-(~a)⨸(~b) + (~x)⨸(~b))^((~m) - 1)*((~m) + ((~m) + 1)*sinh(-(~a)⨸(~b) + (~x)⨸(~b))^2), (~x)), (~x), (~x), (~a) + (~b)*asinh((~c)*(~x)), "7_1_2_4") : nothing) + +("7_1_2_5", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + lt((~n), -2) ? +(~x)^(~m)*sqrt( 1 + (~c)^2*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~m)⨸((~b)*(~c)*((~n) + 1))* ∫((~x)^((~m) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) - (~c)*((~m) + 1)⨸((~b)*((~n) + 1))* ∫((~x)^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_2_6", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~m), 0) ? +1⨸((~b)*(~c)^((~m) + 1))* int_and_subst((~x)^(~n)*sinh(-(~a)⨸(~b) + (~x)⨸(~b))^(~m)*cosh(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*asinh((~c)*(~x)), "7_1_2_6") : nothing) + +# ("7_1_2_7", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.3 (d+e x^2)^p (a+b arcsinh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.3 (d+e x^2)^p (a+b arcsinh(c x))^n.jl new file mode 100644 index 0000000..c237848 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.3 (d+e x^2)^p (a+b arcsinh(c x))^n.jl @@ -0,0 +1,125 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.1.3 (d+e x^2)^p (a+b arcsinh(c x))^n *) +#(* Int[(a_.+b_.*ArcSinh[c_.*x_])^n_./Sqrt[d_+e_.*x_^2],x_Symbol] := 1/c*Simp[Sqrt[1+c^2*x^2]/Sqrt[d+e*x^2]]*Subst[Int[(a+b*x)^n,x],x, ArcSinh[c*x]] /; FreeQ[{a,b,c,d,e,n},x] && EqQ[e,c^2*d] *) +("7_1_3_1", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*asinh((~!c)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) ? +1⨸((~b)*(~c))*simp(sqrt(1 + (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))* log((~a) + (~b)*asinh((~c)*(~x))) : nothing) + +("7_1_3_2", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~e), (~c)^2*(~d)) && + !eq((~n), -1) ? +1⨸((~b)*(~c)*((~n) + 1))* simp(sqrt(1 + (~c)^2*(~x)^2)⨸ sqrt((~d) + (~e)*(~x)^2))*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1) : nothing) + +("7_1_3_3", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~p), 0) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫(((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~d) + (~e)*(~x)^2)^(~p), (~x))⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_3_4", +@rule ∫(sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) ? +(~x)*sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸2 - (~b)*(~c)*(~n)⨸2*simp(sqrt((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)^2*(~x)^2))* ∫((~x)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) + 1⨸2*simp(sqrt((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)^2*(~x)^2))* ∫(((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_3_5", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + gt((~p), 0) ? +(~x)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸(2*(~p) + 1) + 2*(~d)*(~p)⨸(2*(~p) + 1)* ∫(((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸(2*(~p) + 1)*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫((~x)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_3_6", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/((~d) + (~!e)*(~x)^2)^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) ? +(~x)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~d)*sqrt((~d) + (~e)*(~x)^2)) - (~b)*(~c)*(~n)⨸(~d)*simp(sqrt(1 + (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))* ∫((~x)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1)⨸(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_3_7", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + lt((~p), -1) && + !eq((~p), -3/2) ? +-(~x)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸(2*(~d)*((~p) + 1)) + (2*(~p) + 3)⨸(2*(~d)*((~p) + 1))* ∫(((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) + (~b)*(~c)*(~n)⨸(2*((~p) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫((~x)*(1 + (~c)^2*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_3_8", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~n), 0) ? +1⨸((~c)*(~d))*int_and_subst(((~a) + (~b)*(~x))^(~n)*sech((~x)), (~x), (~x), asinh((~c)*(~x)), "7_1_3_8") : nothing) + +#(* Int[(d_+e_.*x_^2)^p_.*(a_.+b_.*ArcSinh[c_.*x_])^n_,x_Symbol] := d^p*(1+c^2*x^2)^(p+1/2)*(a+b*ArcSinh[c*x])^(n+1)/(b*c*(n+1)) - c*d^p*(2*p+1)/(b*(n+1))*Int[x*(1+c^2*x^2)^(p-1/2)*(a+b*ArcSinh[c*x]) ^(n+1),x] /; FreeQ[{a,b,c,d,e,p},x] && EqQ[e,c^2*d] && LtQ[n,-1] && (IntegerQ[p] || GtQ[d,0]) *) +("7_1_3_9", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + eq((~e), (~c)^2*(~d)) && + lt((~n), -1) ? +simp(sqrt(1 + (~c)^2*(~x)^2)*((~d) + (~e)*(~x)^2)^ (~p))*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~c)*(2*(~p) + 1)⨸((~b)*((~n) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫((~x)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_1_3_10", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt(2*(~p), 0) ? +1⨸((~b)*(~c))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* int_and_subst((~x)^(~n)*cosh(-(~a)⨸(~b) + (~x)⨸(~b))^(2*(~p) + 1), (~x), (~x), (~a) + (~b)*asinh((~c)*(~x)), "7_1_3_10") : nothing) + +("7_1_3_11", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~e), (~c)^2*(~d)) && + ( + igt((~p), 0) || + ilt((~p) + 1/2, 0) + ) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫(((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~d) + (~e)*(~x)^2)^(~p), (~x))⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_3_12", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + !eq((~e), (~c)^2*(~d)) && + ext_isinteger((~p)) && + ( + (~p) > 0 || + igt((~n), 0) + ) ? +∫(ext_expand(((~a) + (~b)*asinh((~c)*(~x)))^(~n), ((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +# ("7_1_3_13", +# @rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)] : nothing) + +("7_1_3_14", +@rule ∫(((~d) + (~!e)*(~x))^(~p)*((~f) + (~!g)*(~x))^(~q)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~e)*(~f) + (~d)*(~g), 0) && + eq((~c)^2*(~d)^2 + (~e)^2, 0) && + half_integer((~p), (~q)) && + ge((~p) - (~q), 0) && + gt((~d), 0) && + lt((~g)/(~e), 0) ? +(-(~d)^2*(~g)⨸(~e))^(~q)* ∫(((~d) + (~e)*(~x))^((~p) - (~q))*(1 + (~c)^2*(~x)^2)^(~q)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) : nothing) + +("7_1_3_15", +@rule ∫(((~d) + (~!e)*(~x))^(~p)*((~f) + (~!g)*(~x))^(~q)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~e)*(~f) + (~d)*(~g), 0) && + eq((~c)^2*(~d)^2 + (~e)^2, 0) && + half_integer((~p), (~q)) && + ge((~p) - (~q), 0) ? +((~d) + (~e)*(~x))^(~q)*((~f) + (~g)*(~x))^(~q)⨸(1 + (~c)^2*(~x)^2)^(~q)* ∫(((~d) + (~e)*(~x))^((~p) - (~q))*(1 + (~c)^2*(~x)^2)^(~q)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.4 (f x)^m (d+e x^2)^p (a+b arcsinh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.4 (f x)^m (d+e x^2)^p (a+b arcsinh(c x))^n.jl new file mode 100644 index 0000000..3902074 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.4 (f x)^m (d+e x^2)^p (a+b arcsinh(c x))^n.jl @@ -0,0 +1,269 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.1.4 (f x)^m (d+e x^2)^p (a+b arcsinh(c x))^n *) +("7_1_4_1", +@rule ∫((~x)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~n), 0) ? +1⨸(~e)*int_and_subst(((~a) + (~b)*(~x))^(~n)*tanh((~x)), (~x), (~x), asinh((~c)*(~x)), "7_1_4_1") : nothing) + +("7_1_4_2", +@rule ∫((~x)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + !eq((~p), -1) ? +((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸(2*(~e)*((~p) + 1)) - (~b)*(~n)⨸(2*(~c)*((~p) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫((1 + (~c)^2*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_3", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/((~x)*((~d) + (~!e)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~n), 0) ? +1⨸(~d)*int_and_subst(((~a) + (~b)*(~x))^(~n)⨸(cosh((~x))*sinh((~x))), (~x), (~x), asinh((~c)*(~x)), "7_1_4_3") : nothing) + +("7_1_4_4", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + eq((~m) + 2*(~p) + 3, 0) && + !eq((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^ (~n)⨸((~d)*(~f)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)^2*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_5", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~p), 0) ? +((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))⨸(2*(~p)) - (~b)*(~c)*(~d)^(~p)⨸(2*(~p))*∫((1 + (~c)^2*(~x)^2)^((~p) - 1⨸2), (~x)) + (~d)*∫(((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*asinh((~c)*(~x)))⨸(~x), (~x)) : nothing) + +("7_1_4_6", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~p), 0) && + ilt(((~m) + 1)/2, 0) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))⨸((~f)*((~m) + 1)) - (~b)*(~c)*(~d)^(~p)⨸((~f)*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2), (~x)) - 2*(~e)*(~p)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*asinh((~c)*(~x))), (~x)) : nothing) + +("7_1_4_7", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~p), 0) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_4_8", +@rule ∫((~x)^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~p) - 1/2) && + !eq((~p), -1/2) && + ( + igt(((~m) + 1)/2, 0) || + ilt(((~m) + 2*(~p) + 3)/2, 0) + ) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))) - (~b)*(~c)*simp(sqrt((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)^2*(~x)^2))* ∫(ext_simplify(∫((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))⨸sqrt((~d) + (~e)*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_4_9", +@rule ∫(((~!f)*(~x))^(~m)*sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + lt((~m), -1) ? +((~f)*(~x))^((~m) + 1)* sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(sqrt((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)^2*(~x)^2))* ∫(((~f)*(~x))^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) - (~c)^2⨸((~f)^2*((~m) + 1))*simp(sqrt((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)^2*(~x)^2))* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_4_10", +@rule ∫(((~!f)*(~x))^(~m)*sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~n), 0) && + ( + igt((~m), -2) || + eq((~n), 1) + ) ? +((~f)*(~x))^((~m) + 1)* sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 2)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 2))*simp(sqrt((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)^2*(~x)^2))* ∫(((~f)*(~x))^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) + 1⨸((~m) + 2)*simp(sqrt((~d) + (~e)*(~x)^2)⨸sqrt(1 + (~c)^2*(~x)^2))* ∫(((~f)*(~x))^(~m)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_4_11", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + gt((~p), 0) && + lt((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 1)) - 2*(~e)*(~p)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_12", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + gt((~p), 0) && + !(lt((~m), -1)) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^ (~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 2*(~p) + 1)) + 2*(~d)*(~p)⨸((~m) + 2*(~p) + 1)* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 2*(~p) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_13", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + ilt((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^ (~n)⨸((~d)*(~f)*((~m) + 1)) - (~c)^2*((~m) + 2*(~p) + 3)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)^2*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_14", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + lt((~p), -1) && + igt((~m), 1) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^ (~n)⨸(2*(~e)*((~p) + 1)) - (~f)^2*((~m) - 1)⨸(2*(~e)*((~p) + 1))* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) - (~b)*(~f)*(~n)⨸(2*(~c)*((~p) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)^2*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_15", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + lt((~p), -1) && + !(gt((~m), 1)) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + eq((~n), 1) + ) ? +-((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^ (~n)⨸(2*(~d)*(~f)*((~p) + 1)) + ((~m) + 2*(~p) + 3)⨸(2*(~d)*((~p) + 1))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) + (~b)*(~c)*(~n)⨸(2*(~f)*((~p) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)^2*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_16", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + igt((~m), 1) && + !eq((~m) + 2*(~p) + 1, 0) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^ (~n)⨸((~e)*((~m) + 2*(~p) + 1)) - (~f)^2*((~m) - 1)⨸((~c)^2*((~m) + 2*(~p) + 1))* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) - (~b)*(~f)*(~n)⨸((~c)*((~m) + 2*(~p) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)^2*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_1_4_17", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + eq((~e), (~c)^2*(~d)) && + lt((~n), -1) && + eq((~m) + 2*(~p) + 1, 0) ? +((~f)*(~x))^(~m)* sqrt(1 + (~c)^2*(~x)^2)*((~d) + (~e)*(~x)^2)^ (~p)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_1_4_18", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~e), (~c)^2*(~d)) && + lt((~n), -1) && + igt(2*(~p), 0) && + !eq((~m) + 2*(~p) + 1, 0) && + igt((~m), -3) ? +((~f)*(~x))^(~m)* sqrt(1 + (~c)^2*(~x)^2)*((~d) + (~e)*(~x)^2)^ (~p)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), (~x)) - (~c)*((~m) + 2*(~p) + 1)⨸((~b)*(~f)*((~n) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +#(* Int[(f_.*x_)^m_.*(d_+e_.*x_^2)^p_.*(a_.+b_.*ArcSinh[c_.*x_])^n_,x_ Symbol] := (f*x)^m*Simp[Sqrt[1+c^2*x^2]*(d+e*x^2)^p]*(a+b*ArcSinh[c*x])^(n+1)/( b*c*(n+1)) - f*m/(b*c*(n+1))*Simp[(d+e*x^2)^p/(1+c^2*x^2)^p]*Int[(f*x)^(m-1)*(1+ c^2*x^2)^(p+1/2)*(a+b*ArcSinh[c*x])^(n+1),x] - c*(2*p+1)/(b*f*(n+1))*Simp[(d+e*x^2)^p/(1+c^2*x^2)^p]*Int[(f*x)^(m+ 1)*(1+c^2*x^2)^(p-1/2)*(a+b*ArcSinh[c*x])^(n+1),x] /; FreeQ[{a,b,c,d,e,f,m,p},x] && EqQ[e,c^2*d] && LtQ[n,-1] && IntegerQ[2*p] && NeQ[p,-1/2] && IGtQ[m,-3] *) +("7_1_4_19", +@rule ∫(((~!f)*(~x))^(~m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~n), 0) && + igt((~m), 1) ? +(~f)*((~f)*(~x))^((~m) - 1)*sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~e)*(~m)) - (~b)*(~f)*(~n)⨸((~c)*(~m))*simp(sqrt(1 + (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))* ∫(((~f)*(~x))^((~m) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1), (~x)) - (~f)^2*((~m) - 1)⨸((~c)^2*(~m))* ∫((((~f)*(~x))^((~m) - 2)*((~a) + (~b)*asinh((~c)*(~x)))^(~n))⨸sqrt((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("7_1_4_20", +@rule ∫((~x)^(~m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~n), 0) && + ext_isinteger((~m)) ? +1⨸(~c)^((~m) + 1)*simp(sqrt(1 + (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))* int_and_subst(((~a) + (~b)*(~x))^(~n)*sinh((~x))^(~m), (~x), (~x), asinh((~c)*(~x)), "7_1_4_20") : nothing) + +("7_1_4_21", +@rule ∫(((~!f)*(~x))^(~m)*((~!a) + (~!b)*asinh((~!c)*(~x)))/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~e), (~c)^2*(~d)) && + !(ext_isinteger((~m))) ? +((~f)*(~x))^((~m) + 1)⨸((~f)*((~m) + 1))* simp(sqrt(1 + (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))*((~a) + (~b)*asinh((~c)*(~x)))* hypergeometric2f1(1⨸2, (1 + (~m))⨸2, (3 + (~m))⨸2, -(~c)^2*(~x)^2) - (~b)*(~c)*((~f)*(~x))^((~m) + 2)⨸((~f)^2*((~m) + 1)*((~m) + 2))* simp(sqrt(1 + (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))* hypergeometricpFq([1, 1 + (~m)⨸2, 1 + (~m)⨸2], [3⨸2 + (~m)⨸2, 2 + (~m)⨸2], -(~c)^2*(~x)^2) : nothing) + +("7_1_4_22", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~e), (~c)^2*(~d)) && + lt((~n), -1) ? +((~f)*(~x))^(~m)⨸((~b)*(~c)*((~n) + 1))* simp(sqrt(1 + (~c)^2*(~x)^2)⨸ sqrt((~d) + (~e)*(~x)^2))*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1) - (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))*simp(sqrt(1 + (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))* ∫(((~f)*(~x))^((~m) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_1_4_23", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt(2*(~p) + 2, 0) && + igt((~m), 0) ? +1⨸((~b)*(~c)^((~m) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* int_and_subst((~x)^(~n)*sinh(-(~a)⨸(~b) + (~x)⨸(~b))^(~m)*cosh(-(~a)⨸(~b) + (~x)⨸(~b))^(2*(~p) + 1), (~x), (~x), (~a) + (~b)*asinh((~c)*(~x)), "7_1_4_23") : nothing) + +("7_1_4_24", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~p) + 1/2, 0) && + !(igt(((~m) + 1)/2, 0)) && + ( + eq((~m), -1) || + eq((~m), -2) + ) ? +∫(ext_expand(((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸ sqrt((~d) + (~e)*(~x)^2), ((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~p) + 1⨸2), (~x)), (~x)) : nothing) + +("7_1_4_25", +@rule ∫((~x)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~e), (~c)^2*(~d)) && + !eq((~p), -1) ? +((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*asinh((~c)*(~x)))⨸(2*(~e)*((~p) + 1)) - (~b)*(~c)⨸(2*(~e)*((~p) + 1))*∫(((~d) + (~e)*(~x)^2)^((~p) + 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_4_26", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~e), (~c)^2*(~d)) && + ext_isinteger((~p)) && + ( + gt((~p), 0) || + igt(((~m) - 1)/2, 0) && + le((~m) + (~p), 0) + ) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_4_27", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~e), (~c)^2*(~d)) && + igt((~n), 0) && + ext_isinteger((~p)) && + ext_isinteger((~m)) ? +∫(ext_expand(((~a) + (~b)*asinh((~c)*(~x)))^(~n), ((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +# ("7_1_4_28", +# @rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)] : nothing) + +("7_1_4_29", +@rule ∫(((~!h)*(~x))^(~!m)*((~d) + (~!e)*(~x))^(~p)*((~f) + (~!g)*(~x))^ (~q)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e)*(~f) + (~d)*(~g), 0) && + eq((~c)^2*(~d)^2 + (~e)^2, 0) && + half_integer((~p), (~q)) && + ge((~p) - (~q), 0) && + gt((~d), 0) && + lt((~g)/(~e), 0) ? +(-(~d)^2*(~g)⨸(~e))^(~q)* ∫(((~h)*(~x))^(~m)*((~d) + (~e)*(~x))^((~p) - (~q))*(1 + (~c)^2*(~x)^2)^(~q)*((~a) + (~b)*asinh((~c)*(~x)))^ (~n), (~x)) : nothing) + +("7_1_4_30", +@rule ∫(((~!h)*(~x))^(~!m)*((~d) + (~!e)*(~x))^(~p)*((~f) + (~!g)*(~x))^ (~q)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e)*(~f) + (~d)*(~g), 0) && + eq((~c)^2*(~d)^2 + (~e)^2, 0) && + half_integer((~p), (~q)) && + ge((~p) - (~q), 0) ? +(-(~d)^2*(~g)⨸(~e))^intpart((~q))*((~d) + (~e)*(~x))^ fracpart((~q))*((~f) + (~g)*(~x))^fracpart((~q))⨸(1 + (~c)^2*(~x)^2)^fracpart((~q))* ∫(((~h)*(~x))^(~m)*((~d) + (~e)*(~x))^((~p) - (~q))*(1 + (~c)^2*(~x)^2)^ (~q)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.5 u (a+b arcsinh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.5 u (a+b arcsinh(c x))^n.jl new file mode 100644 index 0000000..b787d90 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.5 u (a+b arcsinh(c x))^n.jl @@ -0,0 +1,267 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.1.5 u (a+b arcsinh(c x))^n *) +("7_1_5_1", +@rule ∫(((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~n), 0) ? +int_and_subst(((~a) + (~b)*(~x))^(~n)*cosh((~x))⨸((~c)*(~d) + (~e)*sinh((~x))), (~x), (~x), asinh((~c)*(~x)), "7_1_5_1") : nothing) + +("7_1_5_2", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + igt((~n), 0) && + !eq((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸((~e)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~e)*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1)⨸ sqrt(1 + (~c)^2*(~x)^2), (~x)) : nothing) + +("7_1_5_3", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~m), 0) && + lt((~n), -1) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_1_5_4", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~m), 0) ? +1⨸(~c)^((~m) + 1)* int_and_subst(((~a) + (~b)*(~x))^(~n)*cosh((~x))*((~c)*(~d) + (~e)*sinh((~x)))^(~m), (~x), (~x), asinh((~c)*(~x)), "7_1_5_4") : nothing) + +("7_1_5_5", +@rule ∫((~Px)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + poly((~Px), (~x)) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫(ExpandExpression[(~Px), (~x)], (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(ExpandExpression[(~Px), (~x)], (~x))⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +#(* Int[Px_*(a_.+b_.*ArcSinh[c_.*x_])^n_.,x_Symbol] := With[{u=IntHide[Px,x]}, Dist[(a+b*ArcSinh[c*x])^n,u,x] - b*c*n*Int[SimplifyIntegrand[u*(a+b*ArcSinh[c*x])^(n-1)/Sqrt[1+c^2*x^2] ,x],x]] /; FreeQ[{a,b,c},x] && PolynomialQ[Px,x] && IGtQ[n,0] *) +("7_1_5_6", +@rule ∫((~Px)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + poly((~Px), (~x)) ? +∫(ext_expand((~Px)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_1_5_7", +@rule ∫((~Px)*((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + poly((~Px), (~x)) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫((~Px)*((~d) + (~e)*(~x))^(~m), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫((~Px)*((~d) + (~e)*(~x))^(~m), (~x))⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_5_8", +@rule ∫(((~!f) + (~!g)*(~x))^(~!p)*((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^ (~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + igt((~n), 0) && + igt((~p), 0) && + ilt((~m), 0) && + lt((~m) + (~p) + 1, 0) ? +dist(((~a) + (~b)*asinh((~c)*(~x)))^(~n), ∫(((~f) + (~g)*(~x))^(~p)*((~d) + (~e)*(~x))^(~m), (~x)), (~x)) - (~b)*(~c)*(~n)*∫( ext_simplify( ∫(((~f) + (~g)*(~x))^(~p)*((~d) + (~e)*(~x))^(~m), (~x))*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_5_9", +@rule ∫(((~!f) + (~!g)*(~x) + (~!h)*(~x)^2)^ (~!p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n)/((~d) + (~!e)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + igt((~n), 0) && + igt((~p), 0) && + eq((~e)*(~g) - 2*(~d)*(~h), 0) ? +dist(((~a) + (~b)*asinh((~c)*(~x)))^(~n), ∫(((~f) + (~g)*(~x) + (~h)*(~x)^2)^(~p)⨸((~d) + (~e)*(~x))^2, (~x)), (~x)) - (~b)*(~c)*(~n)*∫( ext_simplify( ∫(((~f) + (~g)*(~x) + (~h)*(~x)^2)^(~p)⨸((~d) + (~e)*(~x))^2, (~x))*((~a) + (~b)*asinh((~c)*(~x)))^((~n) - 1)⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_5_10", +@rule ∫((~Px)*((~d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + poly((~Px), (~x)) && + igt((~n), 0) && + ext_isinteger((~m)) ? +∫(ext_expand((~Px)*((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_1_5_11", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~m), 0) && + ilt((~p) + 1/2, 0) && + gt((~d), 0) && + ( + lt((~m), -2*(~p) - 1) || + gt((~m), 3) + ) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫(((~f) + (~g)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(dist(1⨸sqrt(1 + (~c)^2*(~x)^2), ∫(((~f) + (~g)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)), (~x)) : nothing) + +("7_1_5_12", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~m), 0) && + ext_isinteger((~p) + 1/2) && + gt((~d), 0) && + igt((~n), 0) && + ( + eq((~n), 1) && + gt((~p), -1) || + gt((~p), 0) || + eq((~m), 1) || + eq((~m), 2) && + lt((~p), -2) + ) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^ (~n), ((~f) + (~g)*(~x))^(~m), (~x)), (~x)) : nothing) + +("7_1_5_13", +@rule ∫(((~!f) + (~!g)*(~x))^(~m)* sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e), (~c)^2*(~d)) && + ilt((~m), 0) && + gt((~d), 0) && + igt((~n), 0) ? +((~f) + (~g)*(~x))^ (~m)*((~d) + (~e)*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)* sqrt((~d))*((~n) + 1)) - 1⨸((~b)*(~c)*sqrt((~d))*((~n) + 1))* ∫(((~d)*(~g)*(~m) + 2*(~e)*(~f)*(~x) + (~e)*(~g)*((~m) + 2)*(~x)^2)*((~f) + (~g)*(~x))^((~m) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_1_5_14", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~m)) && + igt((~p) + 1/2, 0) && + gt((~d), 0) && + igt((~n), 0) ? +∫(ext_expand( sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), ((~f) + (~g)*(~x))^ (~m)*((~d) + (~e)*(~x)^2)^((~p) - 1⨸2), (~x)), (~x)) : nothing) + +("7_1_5_15", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e), (~c)^2*(~d)) && + ilt((~m), 0) && + igt((~p) - 1/2, 0) && + gt((~d), 0) && + igt((~n), 0) ? +((~f) + (~g)*(~x))^ (~m)*((~d) + (~e)*(~x)^2)^((~p) + 1⨸2)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)* sqrt((~d))*((~n) + 1)) - 1⨸((~b)*(~c)*sqrt((~d))*((~n) + 1))* ∫( ext_expand(((~f) + (~g)*(~x))^((~m) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), ((~d)*(~g)*(~m) + (~e)*(~f)*(2*(~p) + 1)*(~x) + (~e)*(~g)*((~m) + 2*(~p) + 1)*(~x)^2)*((~d) + (~e)*(~x)^2)^((~p) - 1⨸2), (~x)), (~x)) : nothing) + +("7_1_5_16", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n)/ sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~m), 0) && + gt((~d), 0) && + lt((~n), -1) ? +((~f) + (~g)*(~x))^(~m)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*sqrt((~d))*((~n) + 1)) - (~g)*(~m)⨸((~b)*(~c)*sqrt((~d))*((~n) + 1))* ∫(((~f) + (~g)*(~x))^((~m) - 1)*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_1_5_17", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/ sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~m)) && + gt((~d), 0) && + ( + gt((~m), 0) || + igt((~n), 0) + ) ? +1⨸((~c)^((~m) + 1)*sqrt((~d)))* int_and_subst(((~a) + (~b)*(~x))^(~n)*((~c)*(~f) + (~g)*sinh((~x)))^(~m), (~x), (~x), asinh((~c)*(~x)), "7_1_5_17") : nothing) + +("7_1_5_18", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~m)) && + ilt((~p) + 1/2, 0) && + gt((~d), 0) && + igt((~n), 0) ? +∫(ext_expand(((~a) + (~b)*asinh((~c)*(~x)))^(~n)⨸ sqrt((~d) + (~e)*(~x)^2), ((~f) + (~g)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~p) + 1⨸2), (~x)), (~x)) : nothing) + +("7_1_5_19", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~m)) && + ext_isinteger((~p) - 1/2) && + !(gt((~d), 0)) ? +simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(((~f) + (~g)*(~x))^(~m)*(1 + (~c)^2*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) : nothing) + +("7_1_5_20", +@rule ∫(log((~!h)*((~!f) + (~!g)*(~x))^(~!m))*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n)/ sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~x)) && + eq((~e), (~c)^2*(~d)) && + gt((~d), 0) && + igt((~n), 0) ? +log((~h)*((~f) + (~g)*(~x))^(~m))*((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)* sqrt((~d))*((~n) + 1)) - (~g)*(~m)⨸((~b)*(~c)*sqrt((~d))*((~n) + 1))* ∫(((~a) + (~b)*asinh((~c)*(~x)))^((~n) + 1)⨸((~f) + (~g)*(~x)), (~x)) : nothing) + +("7_1_5_21", +@rule ∫(log((~!h)*((~!f) + (~!g)*(~x))^(~!m))*((~d) + (~!e)*(~x)^2)^ (~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~p) - 1/2) && + !(gt((~d), 0)) ? +simp(((~d) + (~e)*(~x)^2)^(~p)⨸(1 + (~c)^2*(~x)^2)^(~p))* ∫(log((~h)*((~f) + (~g)*(~x))^(~m))*(1 + (~c)^2*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)) : nothing) + +("7_1_5_22", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))^(~m)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + ilt((~m) + 1/2, 0) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~m), (~x)), (~x)) - (~b)*(~c)*∫(dist(1⨸sqrt(1 + (~c)^2*(~x)^2), ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~m), (~x)), (~x)), (~x)) : nothing) + +("7_1_5_23", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~f) + (~!g)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + ext_isinteger((~m)) ? +∫(ext_expand(((~a) + (~b)*asinh((~c)*(~x)))^ (~n), ((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~m), (~x)), (~x)) : nothing) + +("7_1_5_24", +@rule ∫((~u)*((~!a) + (~!b)*asinh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !contains_inverse_function(IntHide[(~u), (~x)], (~x)) ? +dist((~a) + (~b)*asinh((~c)*(~x)), ∫((~u), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫((~u), (~x))⨸sqrt(1 + (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_1_5_25", +@rule ∫((~Px)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + poly((~Px), (~x)) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~p) - 1/2) && + issum(ext_expand((~Px)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh[(~c)*(~x)])^(~n), (~x))) ? +∫(ext_expand((~Px)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_1_5_26", +@rule ∫((~!Px)*((~f) + (~!g)*((~d) + (~!e)*(~x)^2)^(~p))^ (~!m)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + poly((~Px), (~x)) && + eq((~e), (~c)^2*(~d)) && + igt((~p) + 1/2, 0) && + ext_isinteger((~m), (~n)) && + issum(ext_expand( (~Px)*((~f) + (~g)*((~d) + (~e)*(~x)^2)^(~p))^(~m)*((~a) + (~b)*asinh[(~c)*(~x)])^(~n), (~x))) ? +∫(ext_expand( (~Px)*((~f) + (~g)*((~d) + (~e)*(~x)^2)^(~p))^(~m)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_1_5_27", +@rule ∫((~RF)*asinh((~!c)*(~x))^(~!n),(~x)) => + !contains_var((~c), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) && + issum(ext_expand(asinh[(~c)*(~x)]^(~n), (~RF), (~x))) ? +∫(ext_expand(asinh((~c)*(~x))^(~n), (~RF), (~x)), (~x)) : nothing) + +("7_1_5_28", +@rule ∫((~RF)*((~a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) ? +∫(ext_expand((~RF)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_1_5_29", +@rule ∫((~RF)*((~d) + (~!e)*(~x)^2)^(~p)*asinh((~!c)*(~x))^(~!n),(~x)) => + !contains_var((~c), (~d), (~e), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~p) - 1/2) && + issum(ext_expand(((~d) + (~e)*(~x)^2)^(~p)*asinh[(~c)*(~x)]^(~n), (~RF), (~x))) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~p)*asinh((~c)*(~x))^(~n), (~RF), (~x)), (~x)) : nothing) + +("7_1_5_30", +@rule ∫((~RF)*((~d) + (~!e)*(~x)^2)^(~p)*((~a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) && + eq((~e), (~c)^2*(~d)) && + ext_isinteger((~p) - 1/2) ? +∫(ext_expand(((~d) + (~e)*(~x)^2)^(~p), (~RF)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +# ("7_1_5_31", +# @rule ∫((~!u)*((~!a) + (~!b)*asinh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~x)) ? +# Unintegrable[(~u)*((~a) + (~b)*asinh((~c)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.6 Miscellaneous inverse hyperbolic sine.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.6 Miscellaneous inverse hyperbolic sine.jl new file mode 100644 index 0000000..82b9ed8 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.1 Inverse hyperbolic sine/7.1.6 Miscellaneous inverse hyperbolic sine.jl @@ -0,0 +1,130 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.1.6 Miscellaneous inverse hyperbolic sine *) +("7_1_6_1", +@rule ∫(((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) ? +1⨸(~d)*int_and_subst(((~a) + (~b)*asinh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_1_6_1") : nothing) + +("7_1_6_2", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) ? +1⨸(~d)*int_and_subst((((~d)*(~e) - (~c)*(~f))⨸(~d) + (~f)*(~x)⨸(~d))^(~m)*((~a) + (~b)*asinh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_1_6_2") : nothing) + +("7_1_6_3", +@rule ∫(((~!A) + (~!B)*(~x) + (~!C)*(~x)^2)^(~!p)*((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~A), (~B), (~C), (~n), (~p), (~x)) && + eq((~B)*(1 + (~c)^2) - 2*(~A)*(~c)*(~d), 0) && + eq(2*(~c)*(~C) - (~B)*(~d), 0) ? +1⨸(~d)*int_and_subst(((~C)⨸(~d)^2 + (~C)⨸(~d)^2*(~x)^2)^(~p)*((~a) + (~b)*asinh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_1_6_3") : nothing) + +("7_1_6_4", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*((~!A) + (~!B)*(~x) + (~!C)*(~x)^2)^ (~!p)*((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~p), (~x)) && + eq((~B)*(1 + (~c)^2) - 2*(~A)*(~c)*(~d), 0) && + eq(2*(~c)*(~C) - (~B)*(~d), 0) ? +1⨸(~d)*int_and_subst((((~d)*(~e) - (~c)*(~f))⨸(~d) + (~f)*(~x)⨸(~d))^(~m)*((~C)⨸(~d)^2 + (~C)⨸(~d)^2*(~x)^2)^ (~p)*((~a) + (~b)*asinh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_1_6_4") : nothing) + +("7_1_6_5", +@rule ∫(sqrt((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, -1) ? +(~x)*sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2)) - sqrt(π)*(~x)*(cosh((~a)⨸(2*(~b))) - (~c)*sinh((~a)⨸(2*(~b))))* FresnelIntegrals.fresnelc(sqrt(-(~c)⨸(π*(~b)))*sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2)))⨸ (sqrt(-((~c)⨸(~b)))*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2))) + sqrt(π)*(~x)*(cosh((~a)⨸(2*(~b))) + (~c)*sinh((~a)⨸(2*(~b))))* FresnelIntegrals.fresnels(sqrt(-(~c)⨸(π*(~b)))*sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2)))⨸ (sqrt(-((~c)⨸(~b)))*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2))) : nothing) + +("7_1_6_6", +@rule ∫(((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)^2))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, -1) && + gt((~n), 1) ? +(~x)*((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))^(~n) - 2*(~b)*(~n)* sqrt(2*(~c)*(~d)*(~x)^2 + (~d)^2*(~x)^4)*((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))^((~n) - 1)⨸((~d)*(~x)) + 4*(~b)^2*(~n)*((~n) - 1)*∫(((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))^((~n) - 2), (~x)) : nothing) + +("7_1_6_7", +@rule ∫(1/((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, -1) ? +(~x)*((~c)*cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* coshintegral(((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))⨸(2*(~b)))⨸ (2* (~b)*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh((1⨸2)*asinh((~c) + (~d)*(~x)^2)))) + (~x)*(cosh((~a)⨸(2*(~b))) - (~c)*sinh((~a)⨸(2*(~b))))* sinhintegral(((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))⨸(2*(~b)))⨸ (2* (~b)*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh((1⨸2)*asinh((~c) + (~d)*(~x)^2)))) : nothing) + +("7_1_6_8", +@rule ∫(1/sqrt((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, -1) ? +((~c) + 1)*sqrt(π⨸2)*(~x)*(cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* SymbolicUtils.erfi(sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸ (2* sqrt((~b))*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2))) + ((~c) - 1)*sqrt(π⨸2)*(~x)*(cosh((~a)⨸(2*(~b))) + sinh((~a)⨸(2*(~b))))* SymbolicUtils.erf(sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸ (2* sqrt((~b))*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2))) : nothing) + +("7_1_6_9", +@rule ∫(1/((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)^2))^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, -1) ? +-sqrt(2*(~c)*(~d)*(~x)^2 + (~d)^2*(~x)^4)⨸((~b)*(~d)*(~x)*sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))) - (-(~c)⨸(~b))^(3⨸2)*sqrt(π)*(~x)*(cosh((~a)⨸(2*(~b))) - (~c)*sinh((~a)⨸(2*(~b))))* FresnelIntegrals.fresnelc(sqrt(-(~c)⨸(π*(~b)))*sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2)))⨸ (cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2)) + (-(~c)⨸(~b))^(3⨸2)*sqrt(π)*(~x)*(cosh((~a)⨸(2*(~b))) + (~c)*sinh((~a)⨸(2*(~b))))* FresnelIntegrals.fresnels(sqrt(-(~c)⨸(π*(~b)))*sqrt((~a) + (~b)*asinh((~c) + (~d)*(~x)^2)))⨸ (cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2)) : nothing) + +("7_1_6_10", +@rule ∫(1/((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)^2))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, -1) ? +-sqrt(2*(~c)*(~d)*(~x)^2 + (~d)^2*(~x)^4)⨸(2*(~b)*(~d)*(~x)*((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))) + (~x)*(cosh((~a)⨸(2*(~b))) - (~c)*sinh((~a)⨸(2*(~b))))* coshintegral(((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))⨸(2*(~b)))⨸ (4* (~b)^2*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2))) + (~x)*((~c)*cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* sinhintegral(((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))⨸(2*(~b)))⨸ (4* (~b)^2*(cosh(asinh((~c) + (~d)*(~x)^2)⨸2) + (~c)*sinh(asinh((~c) + (~d)*(~x)^2)⨸2))) : nothing) + +("7_1_6_11", +@rule ∫(((~!a) + (~!b)*asinh((~c) + (~!d)*(~x)^2))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, -1) && + lt((~n), -1) && + !eq((~n), -2) ? +-(~x)*((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))^((~n) + 2)⨸(4*(~b)^2*((~n) + 1)*((~n) + 2)) + sqrt( 2*(~c)*(~d)*(~x)^2 + (~d)^2*(~x)^4)*((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))^((~n) + 1)⨸(2*(~b)*(~d)*((~n) + 1)* (~x)) + 1⨸(4*(~b)^2*((~n) + 1)*((~n) + 2))* ∫(((~a) + (~b)*asinh((~c) + (~d)*(~x)^2))^((~n) + 2), (~x)) : nothing) + +("7_1_6_12", +@rule ∫(asinh((~!a)*(~x)^(~p))^(~!n)/(~x),(~x)) => + !contains_var((~a), (~p), (~x)) && + igt((~n), 0) ? +1⨸(~p)*int_and_subst((~x)^(~n)*coth((~x)), (~x), (~x), asinh((~a)*(~x)^(~p)), "7_1_6_12") : nothing) + +("7_1_6_13", +@rule ∫((~!u)*asinh((~c)/((~!a) + (~!b)*(~x)^(~!n)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~m), (~x)) ? +∫((~u)*acsch((~a)⨸(~c) + (~b)*(~x)^(~n)⨸(~c))^(~m), (~x)) : nothing) + +("7_1_6_14", +@rule ∫(asinh(sqrt(-1 + (~!b)*(~x)^2))^(~!n)/sqrt(-1 + (~!b)*(~x)^2),(~x)) => + !contains_var((~b), (~n), (~x)) ? +sqrt((~b)*(~x)^2)⨸((~b)*(~x))* int_and_subst(asinh((~x))^(~n)⨸sqrt(1 + (~x)^2), (~x), (~x), sqrt(-1 + (~b)*(~x)^2), "7_1_6_14") : nothing) + +("7_1_6_15", +@rule ∫((~f)^((~!c)*asinh((~!a) + (~!b)*(~x))^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~x)) && + igt((~n), 0) ? +1⨸(~b)*int_and_subst((~f)^((~c)*(~x)^(~n))*cosh((~x)), (~x), (~x), asinh((~a) + (~b)*(~x)), "7_1_6_15") : nothing) + +("7_1_6_16", +@rule ∫((~x)^(~!m)*(~f)^((~!c)*asinh((~!a) + (~!b)*(~x))^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~x)) && + igt((~m), 0) && + igt((~n), 0) ? +1⨸(~b)*int_and_subst((-(~a)⨸(~b) + sinh((~x))⨸(~b))^(~m)*(~f)^((~c)*(~x)^(~n))*cosh((~x)), (~x), (~x), asinh((~a) + (~b)*(~x)), "7_1_6_16") : nothing) + +("7_1_6_17", +@rule ∫(asinh((~u)),(~x)) => + !contains_inverse_function((~u), (~x)) && + !(function_of_exponential((~u), (~x))) ? +(~x)*asinh((~u)) - ∫(ext_simplify((~x)*Symbolics.derivative((~u), (~x))⨸sqrt(1 + (~u)^2), (~x)), (~x)) : nothing) + +("7_1_6_18", +@rule ∫(((~!c) + (~!d)*(~x))^(~!m)*((~!a) + (~!b)*asinh((~u))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + !eq((~m), -1) && + !contains_inverse_function((~u), (~x)) && + !(function_of_exponential((~u), (~x))) ? +((~c) + (~d)*(~x))^((~m) + 1)*((~a) + (~b)*asinh((~u)))⨸((~d)*((~m) + 1)) - (~b)⨸((~d)*((~m) + 1))* ∫(ext_simplify(((~c) + (~d)*(~x))^((~m) + 1)*Symbolics.derivative((~u), (~x))⨸sqrt(1 + (~u)^2), (~x)), (~x)) : nothing) + +("7_1_6_20", +@rule ∫(ℯ^((~!n)*asinh((~u))),(~x)) => + ext_isinteger((~n)) && + poly((~u), (~x)) ? +∫(((~u) + sqrt(1 + (~u)^2))^(~n), (~x)) : nothing) + +("7_1_6_21", +@rule ∫((~x)^(~!m)*ℯ^((~!n)*asinh((~u))),(~x)) => + isrational((~m)) && + ext_isinteger((~n)) && + poly((~u), (~x)) ? +∫((~x)^(~m)*((~u) + sqrt(1 + (~u)^2))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.1 (a+b arccosh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.1 (a+b arccosh(c x))^n.jl new file mode 100644 index 0000000..15adf3f --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.1 (a+b arccosh(c x))^n.jl @@ -0,0 +1,22 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.2.1 (a+b arccosh(c x))^n *) +("7_2_1_1", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + gt((~n), 0) ? +(~x)*((~a) + (~b)*acosh((~c)*(~x)))^(~n) - (~b)*(~c)*(~n)* ∫((~x)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_1_2", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + lt((~n), -1) ? +sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~c)⨸((~b)*((~n) + 1))* ∫((~x)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_1_3", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) ? +1⨸((~b)*(~c))* int_and_subst((~x)^(~n)*sinh(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_1_3") : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.2 (d x)^m (a+b arccosh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.2 (d x)^m (a+b arccosh(c x))^n.jl new file mode 100644 index 0000000..cd551eb --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.2 (d x)^m (a+b arccosh(c x))^n.jl @@ -0,0 +1,51 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.2.2 (d x)^m (a+b arccosh(c x))^n *) +("7_2_2_1", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~n), 0) ? +1⨸(~b)*int_and_subst((~x)^(~n)*tanh(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_2_1") : nothing) + +("7_2_2_2", +@rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~x)) && + igt((~n), 0) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~d)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~d)*((~m) + 1))* ∫(((~d)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_2_3", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + gt((~n), 0) ? +(~x)^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~m) + 1) - (~b)*(~c)*(~n)⨸((~m) + 1)* ∫((~x)^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_2_4", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + ge((~n), -2) && + lt((~n), -1) ? +(~x)^(~m)*sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) + 1⨸((~b)^2*(~c)^((~m) + 1)*((~n) + 1))* int_and_subst(expand_trig_reduce((~x)^((~n) + 1), cosh(-(~a)⨸(~b) + (~x)⨸(~b))^((~m) - 1)*((~m) - ((~m) + 1)*cosh(-(~a)⨸(~b) + (~x)⨸(~b))^2), (~x)), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_2_4") : nothing) + +("7_2_2_5", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~m), 0) && + lt((~n), -2) ? +(~x)^(~m)*sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) + (~m)⨸((~b)*(~c)*((~n) + 1))* ∫((~x)^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))), (~x)) - (~c)*((~m) + 1)⨸((~b)*((~n) + 1))* ∫((~x)^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_2_6", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~m), 0) ? +1⨸((~b)*(~c)^((~m) + 1))* int_and_subst((~x)^(~n)*cosh(-(~a)⨸(~b) + (~x)⨸(~b))^(~m)*sinh(-(~a)⨸(~b) + (~x)⨸(~b)), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_2_6") : nothing) + +# ("7_2_2_7", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.3 (d+e x^2)^p (a+b arccosh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.3 (d+e x^2)^p (a+b arccosh(c x))^n.jl new file mode 100644 index 0000000..949e273 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.3 (d+e x^2)^p (a+b arccosh(c x))^n.jl @@ -0,0 +1,185 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.2.3 (d+e x^2)^p (a+b arccosh(c x))^n *) +("7_2_3_1", +@rule ∫(((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + eq((~d2)*(~e1) + (~d1)*(~e2), 0) && + ext_isinteger((~p)) ? +∫(((~d1)*(~d2) + (~e1)*(~e2)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) : nothing) + +#(* Int[(a_.+b_.*ArcCosh[c_.*x_])^n_./Sqrt[d_+e_.*x_^2],x_Symbol] := 1/c*Simp[Sqrt[1+c*x]*Sqrt[-1+c*x]/Sqrt[d+e*x^2]]*Subst[Int[(a+b*x)^ n,x],x,ArcCosh[c*x]] /; FreeQ[{a,b,c,d,e,n},x] && EqQ[c^2*d+e,0] *) +("7_2_3_2", +@rule ∫(1/(sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*acosh((~!c)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) ? +1⨸((~b)*(~c))*simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2))* log((~a) + (~b)*acosh((~c)*(~x))) : nothing) + +("7_2_3_3", +@rule ∫(1/(sqrt((~d1) + (~!e1)*(~x))* sqrt((~d2) + (~!e2)*(~x))*((~!a) + (~!b)*acosh((~!c)*(~x)))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) ? +1⨸((~b)*(~c))*simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x)))*log((~a) + (~b)*acosh((~c)*(~x))) : nothing) + +("7_2_3_4", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + !eq((~n), -1) ? +1⨸((~b)*(~c)*((~n) + 1))* simp(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1) : nothing) + +("7_2_3_5", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n)/(sqrt((~d1) + (~!e1)*(~x))*sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + !eq((~n), -1) ? +1⨸((~b)*(~c)*((~n) + 1))*simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x)))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1) : nothing) + +("7_2_3_6", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~p), 0) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫(((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~d) + (~e)*(~x)^2)^(~p), (~x))⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)), (~x)) : nothing) + +("7_2_3_7", +@rule ∫(sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) ? +(~x)*sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸2 - (~b)*(~c)*(~n)⨸2*simp(sqrt((~d) + (~e)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫((~x)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) - 1⨸2*simp(sqrt((~d) + (~e)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫(((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_3_8", +@rule ∫(sqrt((~d1) + (~!e1)*(~x))* sqrt((~d2) + (~!e2)*(~x))*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) ? +(~x)*sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸2 - (~b)*(~c)*(~n)⨸2*simp(sqrt((~d1) + (~e1)*(~x))⨸sqrt(1 + (~c)*(~x)))* simp(sqrt((~d2) + (~e2)*(~x))⨸sqrt(-1 + (~c)*(~x)))* ∫((~x)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) - 1⨸2*simp(sqrt((~d1) + (~e1)*(~x))⨸sqrt(1 + (~c)*(~x)))* simp(sqrt((~d2) + (~e2)*(~x))⨸sqrt(-1 + (~c)*(~x)))* ∫(((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_3_9", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + gt((~p), 0) ? +(~x)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(2*(~p) + 1) + 2*(~d)*(~p)⨸(2*(~p) + 1)* ∫(((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸(2*(~p) + 1)*simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫( (~x)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_3_10", +@rule ∫(((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + gt((~p), 0) ? +(~x)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(2*(~p) + 1) + 2*(~d1)*(~d2)*(~p)⨸(2*(~p) + 1)* ∫(((~d1) + (~e1)*(~x))^((~p) - 1)*((~d2) + (~e2)*(~x))^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) - (~b)*(~c)*(~n)⨸(2*(~p) + 1)*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫( (~x)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_3_11", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/((~d) + (~!e)*(~x)^2)^(3//2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) ? +(~x)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~d)*sqrt((~d) + (~e)*(~x)^2)) + (~b)*(~c)*(~n)⨸(~d)*simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2))* ∫((~x)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_2_3_12", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n)/(((~d1) + (~!e1)*(~x))^(3//2)*((~d2) + (~!e2)*(~x))^(3//2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) ? +(~x)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸((~d1)*(~d2)*sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x))) + (~b)*(~c)*(~n)⨸((~d1)*(~d2))*simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x)))* ∫((~x)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_2_3_13", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + lt((~p), -1) && + !eq((~p), -3/2) ? +-(~x)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(2*(~d)*((~p) + 1)) + (2*(~p) + 3)⨸(2*(~d)*((~p) + 1))* ∫(((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸(2*((~p) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫( (~x)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_3_14", +@rule ∫(((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + lt((~p), -1) && + !eq((~p), -3/2) ? +-(~x)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(2*(~d1)*(~d2)*((~p) + 1)) + (2*(~p) + 3)⨸(2*(~d1)*(~d2)*((~p) + 1))* ∫(((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) - (~b)*(~c)*(~n)⨸(2*((~p) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫( (~x)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_3_15", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~n), 0) ? +-1⨸((~c)*(~d))*int_and_subst(((~a) + (~b)*(~x))^(~n)*csch((~x)), (~x), (~x), acosh((~c)*(~x)), "7_2_3_15") : nothing) + +("7_2_3_16", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + lt((~n), -1) && + ext_isinteger(2*(~p)) ? +simp(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~d) + (~e)*(~x)^2)^(~p))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)* (~c)*((~n) + 1)) - (~c)*(2*(~p) + 1)⨸((~b)*((~n) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫( (~x)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_3_17", +@rule ∫(((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~p), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + lt((~n), -1) && + ext_isinteger((~p) + 1/2) ? +sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) - (~c)*(2*(~p) + 1)⨸((~b)*((~n) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫((~x)*(-1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_3_18", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt(2*(~p), 0) ? +1⨸((~b)*(~c))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* int_and_subst((~x)^(~n)*sinh(-(~a)⨸(~b) + (~x)⨸(~b))^(2*(~p) + 1), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_3_18") : nothing) + +("7_2_3_19", +@rule ∫(((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + igt(2*(~p), 0) ? +1⨸((~b)*(~c))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* int_and_subst((~x)^(~n)*sinh(-(~a)⨸(~b) + (~x)⨸(~b))^(2*(~p) + 1), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_3_19") : nothing) + +("7_2_3_20", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~c)^2*(~d) + (~e), 0) && + ( + igt((~p), 0) || + ilt((~p) + 1/2, 0) + ) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫(((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~d) + (~e)*(~x)^2)^(~p), (~x))⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)), (~x)) : nothing) + +#(* Int[(d_+e_.*x_^2)^p_.*(a_.+b_.*ArcCosh[c_.*x_])^n_,x_Symbol] := 1/(b*c^(2*p+1))*Subst[Int[x^n*(c^2*d+e*Cosh[-a/b+x/b]^2)^p*Sinh[-a/ b+x/b],x],x,a+b*ArcCosh[c*x]] /; FreeQ[{a,b,c,d,e,n},x] && IGtQ[p,0] *) +("7_2_3_21", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + !eq((~c)^2*(~d) + (~e), 0) && + ext_isinteger((~p)) && + ( + (~p) > 0 || + igt((~n), 0) + ) ? +∫(ext_expand(((~a) + (~b)*acosh((~c)*(~x)))^(~n), ((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +# ("7_2_3_22", +# @rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~p), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)] : nothing) + +# ("7_2_3_23", +# @rule ∫(((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~p), (~x)) ? +# Unintegrable[((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.4 (f x)^m (d+e x^2)^p (a+b arccosh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.4 (f x)^m (d+e x^2)^p (a+b arccosh(c x))^n.jl new file mode 100644 index 0000000..48b5c47 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.4 (f x)^m (d+e x^2)^p (a+b arccosh(c x))^n.jl @@ -0,0 +1,467 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.2.4 (f x)^m (d+e x^2)^p (a+b arccosh(c x))^n *) +("7_2_4_1", +@rule ∫(((~!f)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~n), (~x)) && + eq((~d2)*(~e1) + (~d1)*(~e2), 0) && + ext_isinteger((~p)) ? +∫(((~f)*(~x))^(~m)*((~d1)*(~d2) + (~e1)*(~e2)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) : nothing) + +("7_2_4_2", +@rule ∫((~x)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~n), 0) ? +1⨸(~e)*int_and_subst(((~a) + (~b)*(~x))^(~n)*coth((~x)), (~x), (~x), acosh((~c)*(~x)), "7_2_4_2") : nothing) + +("7_2_4_3", +@rule ∫((~x)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + !eq((~p), -1) ? +((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(2*(~e)*((~p) + 1)) - (~b)*(~n)⨸(2*(~c)*((~p) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫((1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_4", +@rule ∫((~x)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~p), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + !eq((~p), -1) ? +((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(2*(~e1)*(~e2)*((~p) + 1)) - (~b)*(~n)⨸(2*(~c)*((~p) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫((1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_5", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/((~x)*((~d) + (~!e)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~n), 0) ? +-1⨸(~d)*int_and_subst(((~a) + (~b)*(~x))^(~n)⨸(cosh((~x))*sinh((~x))), (~x), (~x), acosh((~c)*(~x)), "7_2_4_5") : nothing) + +("7_2_4_6", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + eq((~m) + 2*(~p) + 3, 0) && + !eq((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸((~d)*(~f)*((~m) + 1)) + (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_7", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~p), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + eq((~m) + 2*(~p) + 3, 0) && + !eq((~p), -1) ? +((~f)*(~x))^((~m) + 1)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~d1)*(~d2)*(~f)*((~m) + 1)) + (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_8", +@rule ∫(((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~p), 0) ? +((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))⨸(2*(~p)) - (~b)*(~c)*(-(~d))^(~p)⨸(2*(~p))* ∫((1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2), (~x)) + (~d)*∫(((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x)))⨸(~x), (~x)) : nothing) + +("7_2_4_9", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~p), 0) && + ilt(((~m) + 1)/2, 0) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))⨸((~f)*((~m) + 1)) - (~b)*(~c)*(-(~d))^(~p)⨸((~f)*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2), (~x)) - 2*(~e)*(~p)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x))), (~x)) : nothing) + +("7_2_4_10", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~p), 0) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)), (~x)) : nothing) + +("7_2_4_11", +@rule ∫((~x)^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + ext_isinteger((~p) - 1/2) && + !eq((~p), -1/2) && + ( + igt(((~m) + 1)/2, 0) || + ilt(((~m) + 2*(~p) + 3)/2, 0) + ) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))) - (~b)*(~c)*simp(sqrt((~d) + (~e)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫(ext_simplify(∫((~x)^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))⨸sqrt((~d) + (~e)*(~x)^2), (~x)), (~x)) : nothing) + +("7_2_4_12", +@rule ∫((~x)^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + ext_isinteger((~p) - 1/2) && + !eq((~p), -1/2) && + ( + igt(((~m) + 1)/2, 0) || + ilt(((~m) + 2*(~p) + 3)/2, 0) + ) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫((~x)^(~m)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p), (~x))) - (~b)*(~c)* simp(sqrt((~d1) + (~e1)*(~x))* sqrt((~d2) + (~e2)*(~x))⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫(ext_simplify(∫((~x)^(~m)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p), (~x))⨸(sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x))), (~x)), (~x)) : nothing) + +("7_2_4_13", +@rule ∫(((~!f)*(~x))^(~m)*sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + lt((~m), -1) ? +((~f)*(~x))^((~m) + 1)* sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))* simp(sqrt((~d) + (~e)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫(((~f)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) - (~c)^2⨸((~f)^2*((~m) + 1))* simp(sqrt((~d) + (~e)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫(((~f)*(~x))^((~m) + 2)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_4_14", +@rule ∫(((~!f)*(~x))^(~m)*sqrt((~d1) + (~!e1)*(~x))* sqrt((~d2) + (~!e2)*(~x))*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + lt((~m), -1) ? +((~f)*(~x))^((~m) + 1)*sqrt((~d1) + (~e1)*(~x))* sqrt((~d2) + (~e2)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(sqrt((~d1) + (~e1)*(~x))⨸sqrt(1 + (~c)*(~x)))* simp(sqrt((~d2) + (~e2)*(~x))⨸sqrt(-1 + (~c)*(~x)))* ∫(((~f)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) - (~c)^2⨸((~f)^2*((~m) + 1))*simp(sqrt((~d1) + (~e1)*(~x))⨸sqrt(1 + (~c)*(~x)))* simp(sqrt((~d2) + (~e2)*(~x))⨸sqrt(-1 + (~c)*(~x)))* ∫((((~f)*(~x))^((~m) + 2)*((~a) + (~b)*acosh((~c)*(~x)))^(~n))⨸(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_4_15", +@rule ∫(((~!f)*(~x))^(~m)*sqrt((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~n), 0) && + ( + igt((~m), -2) || + eq((~n), 1) + ) ? +((~f)*(~x))^((~m) + 1)* sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 2)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 2))* simp(sqrt((~d) + (~e)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫(((~f)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) - 1⨸((~m) + 2)*simp(sqrt((~d) + (~e)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))))* ∫(((~f)*(~x))^ (~m)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_4_16", +@rule ∫(((~!f)*(~x))^(~m)*sqrt((~d1) + (~!e1)*(~x))* sqrt((~d2) + (~!e2)*(~x))*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + igt((~n), 0) && + ( + igt((~m), -2) || + eq((~n), 1) + ) ? +((~f)*(~x))^((~m) + 1)*sqrt((~d1) + (~e1)*(~x))* sqrt((~d2) + (~e2)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 2)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 2))*simp(sqrt((~d1) + (~e1)*(~x))⨸sqrt(1 + (~c)*(~x)))* simp(sqrt((~d2) + (~e2)*(~x))⨸sqrt(-1 + (~c)*(~x)))* ∫(((~f)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) - 1⨸((~m) + 2)*simp(sqrt((~d1) + (~e1)*(~x))⨸sqrt(1 + (~c)*(~x)))* simp(sqrt((~d2) + (~e2)*(~x))⨸sqrt(-1 + (~c)*(~x)))* ∫(((~f)*(~x))^ (~m)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_4_17", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + gt((~p), 0) && + lt((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 1)) - 2*(~e)*(~p)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_18", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + gt((~p), 0) && + lt((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 1)) - 2*(~e1)*(~e2)*(~p)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d1) + (~e1)*(~x))^((~p) - 1)*((~d2) + (~e2)*(~x))^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +#(* Int[(f_.*x_)^m_*(d_+e_.*x_^2)^p_*(a_.+b_.*ArcCosh[c_.*x_])^n_.,x_ Symbol] := f*(f*x)^(m-1)*(d+e*x^2)^(p+1)*(a+b*ArcCosh[c*x])^n/(e*(m+2*p+1)) + f^2*(m-1)/(c^2*(m+2*p+1))*Int[(f*x)^(m-2)*(d+e*x^2)^p*(a+b*ArcCosh[ c*x])^n,x] - b*f*n/(c*(m+2*p+1))*Simp[(d+e*x^2)^p/((1+c*x)^p*(-1+c*x)^p)]* Int[(f*x)^(m-1)*(-1+c^2*x^2)^(p+1/2)*(a+b*ArcCosh[c*x])^(n-1),x] /; FreeQ[{a,b,c,d,e,f,p},x] && EqQ[c^2*d+e,0] && GtQ[n,0] && EqQ[n,1] && IGtQ[p+1/2,0] && IGtQ[(m-1)/2,0] *) +#(* Int[(f_.*x_)^m_*(d_+e_.*x_^2)^p_*(a_.+b_.*ArcCosh[c_.*x_])^n_.,x_ Symbol] := f*(f*x)^(m-1)*(d+e*x^2)^(p+1)*(a+b*ArcCosh[c*x])^n/(2*e*(p+1)) - f^2*(m-1)/(2*e*(p+1))*Int[(f*x)^(m-2)*(d+e*x^2)^(p+1)*(a+b*ArcCosh[ c*x])^n,x] - b*f*n/(2*c*(p+1))*Simp[(d+e*x^2)^p/((1+c*x)^p*(-1+c*x)^p)]* Int[(f*x)^(m-1)*(1+c*x)^(p+1/2)*(-1+c*x)^(p+1/2)*(a+b*ArcCosh[c*x] )^(n-1),x] /; FreeQ[{a,b,c,d,e,f},x] && EqQ[c^2*d+e,0] && GtQ[n,0] && EqQ[n,1] && ILtQ[p-1/2,0] && IGtQ[(m-1)/2,0] *) +("7_2_4_19", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + gt((~p), 0) && + !(lt((~m), -1)) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 2*(~p) + 1)) + 2*(~d)*(~p)⨸((~m) + 2*(~p) + 1)* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 2*(~p) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_20", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + gt((~p), 0) && + !(lt((~m), -1)) ? +((~f)*(~x))^((~m) + 1)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~f)*((~m) + 2*(~p) + 1)) + 2*(~d1)*(~d2)*(~p)⨸((~m) + 2*(~p) + 1)* ∫(((~f)*(~x))^ (~m)*((~d1) + (~e1)*(~x))^((~p) - 1)*((~d2) + (~e2)*(~x))^((~p) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) - (~b)*(~c)*(~n)⨸((~f)*((~m) + 2*(~p) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_21", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + ilt((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸((~d)*(~f)*((~m) + 1)) + (~c)^2*((~m) + 2*(~p) + 3)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) + (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_22", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~p), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + ilt((~m), -1) ? +((~f)*(~x))^((~m) + 1)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~d1)*(~d2)*(~f)*((~m) + 1)) + (~c)^2*((~m) + 2*(~p) + 3)⨸((~f)^2*((~m) + 1))* ∫(((~f)*(~x))^((~m) + 2)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) + (~b)*(~c)*(~n)⨸((~f)*((~m) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_23", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + lt((~p), -1) && + igt((~m), 1) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(2*(~e)*((~p) + 1)) - (~f)^2*((~m) - 1)⨸(2*(~e)*((~p) + 1))* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~f)*(~n)⨸(2*(~c)*((~p) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_24", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + lt((~p), -1) && + igt((~m), 1) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(2*(~e1)*(~e2)*((~p) + 1)) - (~f)^2*((~m) - 1)⨸(2*(~e1)*(~e2)*((~p) + 1))* ∫(((~f)*(~x))^((~m) - 2)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~f)*(~n)⨸(2*(~c)*((~p) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_25", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + lt((~p), -1) && + !(gt((~m), 1)) && + ( + ext_isinteger((~m)) || + ext_isinteger((~p)) || + eq((~n), 1) + ) ? +-((~f)*(~x))^((~m) + 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(2*(~d)*(~f)*((~p) + 1)) + ((~m) + 2*(~p) + 3)⨸(2*(~d)*((~p) + 1))* ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~c)*(~n)⨸(2*(~f)*((~p) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_26", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + lt((~p), -1) && + !(gt((~m), 1)) && + ( + ext_isinteger((~m)) || + eq((~n), 1) + ) ? +-((~f)*(~x))^((~m) + 1)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸(2*(~d1)*(~d2)*(~f)*((~p) + 1)) + ((~m) + 2*(~p) + 3)⨸(2*(~d1)*(~d2)*((~p) + 1))* ∫(((~f)*(~x))^ (~m)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) - (~b)*(~c)*(~n)⨸(2*(~f)*((~p) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_27", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~p), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + igt((~m), 1) && + !eq((~m) + 2*(~p) + 1, 0) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸((~e)*((~m) + 2*(~p) + 1)) + (~f)^2*((~m) - 1)⨸((~c)^2*((~m) + 2*(~p) + 1))* ∫(((~f)*(~x))^((~m) - 2)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~f)*(~n)⨸((~c)*((~m) + 2*(~p) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_28", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~p), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + igt((~m), 1) && + !eq((~m) + 2*(~p) + 1, 0) ? +(~f)*((~f)*(~x))^((~m) - 1)*((~d1) + (~e1)*(~x))^((~p) + 1)*((~d2) + (~e2)*(~x))^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~e1)*(~e2)*((~m) + 2*(~p) + 1)) + (~f)^2*((~m) - 1)⨸((~c)^2*((~m) + 2*(~p) + 1))* ∫(((~f)*(~x))^((~m) - 2)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)) - (~b)*(~f)*(~n)⨸((~c)*((~m) + 2*(~p) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)*(~x))^((~p) + 1⨸2)*(-1 + (~c)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) : nothing) + +("7_2_4_29", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + lt((~n), -1) && + eq((~m) + 2*(~p) + 1, 0) ? +((~f)*(~x))^(~m)* simp(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~d) + (~e)*(~x)^2)^(~p))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)* (~c)*((~n) + 1)) + (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_4_30", +@rule ∫(((~!f)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~p), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + lt((~n), -1) && + eq((~m) + 2*(~p) + 1, 0) ? +((~f)*(~x))^(~m)* simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))*((~d1) + (~e1)*(~x))^(~p))*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) + (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_4_31", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~p), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + lt((~n), -1) && + igt(2*(~p), 0) && + !eq((~m) + 2*(~p) + 1, 0) && + igt((~m), -3) ? +((~f)*(~x))^(~m)* simp(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~d) + (~e)*(~x)^2)^(~p))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)* (~c)*((~n) + 1)) + (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) - 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) - (~c)*((~m) + 2*(~p) + 1)⨸((~b)*(~f)*((~n) + 1))* simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* ∫(((~f)*(~x))^((~m) + 1)*(1 + (~c)*(~x))^((~p) - 1⨸2)*(-1 + (~c)*(~x))^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_4_32", +@rule ∫(((~!f)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~p), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + lt((~n), -1) && + igt((~p) + 1/2, 0) && + !eq((~m) + 2*(~p) + 1, 0) && + igt((~m), -3) ? +((~f)*(~x))^(~m)*sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1)) + (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) - 1)*(-1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) - (~c)*((~m) + 2*(~p) + 1)⨸((~b)*(~f)*((~n) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* ∫(((~f)*(~x))^((~m) + 1)*(-1 + (~c)^2*(~x)^2)^((~p) - 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +#(* Int[(f_.*x_)^m_.*(d_+e_.*x_^2)^p_.*(a_.+b_.*ArcCosh[c_.*x_])^n_,x_ Symbol] := (f*x)^m*Simp[Sqrt[1+c*x]*Sqrt[-1+c*x]*(d+e*x^2)^p]*(a+b*ArcCosh[c*x] )^(n+1)/(b*c*(n+1)) - f*m/(b*c*(n+1))*Simp[(d+e*x^2)^p/((1+c*x)^p*(-1+c*x)^p)]* Int[(f*x)^(m-1)*(1+c*x)^(p+1/2)*(-1+c*x)^(p+1/2)*(a+b*ArcCosh[c*x] )^(n+1),x] - c*(2*p+1)/(b*f*(n+1))*Simp[(d+e*x^2)^p/((1+c*x)^p*(-1+c*x)^p)]* Int[(f*x)^(m+1)*(1+c*x)^(p-1/2)*(-1+c*x)^(p-1/2)*(a+b*ArcCosh[c*x] )^(n+1),x] /; FreeQ[{a,b,c,d,e,f,m,p},x] && EqQ[c^2*d+e,0] && LtQ[n,-1] && NeQ[p,-1/2] && IntegerQ[2*p] && IGtQ[m,-3] *) +#(* Int[(f_.*x_)^m_.*(d1_+e1_.*x_)^p_*(d2_+e2_.*x_)^p_*(a_.+b_.* ArcCosh[c_.*x_])^n_,x_Symbol] := (f*x)^m*Sqrt[1+c*x]*Sqrt[-1+c*x]*(d1+e1*x)^p*(d2+e2*x)^p*(a+b* ArcCosh[c*x])^(n+1)/(b*c*(n+1)) - f*m/(b*c*(n+1))*Simp[(d1+e1*x)^p/(1+c*x)^p]*Simp[(d2+e2*x)^p/(-1+c* x)^p]* Int[(f*x)^(m-1)*(-1+c^2*x^2)^(p+1/2)*(a+b*ArcCosh[c*x])^(n+1),x] - c*(2*p+1)/(b*f*(n+1))*Simp[(d1+e1*x)^p/(1+c*x)^p]*Simp[(d2+e2*x)^p/( -1+c*x)^p]* Int[(f*x)^(m+1)*(-1+c^2*x^2)^(p-1/2)*(a+b*ArcCosh[c*x])^(n+1),x] /; FreeQ[{a,b,c,d1,e1,d2,e2,f,m,p},x] && EqQ[e1,c*d1] && EqQ[e2,-c*d2] && LtQ[n,-1] && ILtQ[p+1/2,0] && IGtQ[m,-3] *) +("7_2_4_33", +@rule ∫(((~!f)*(~x))^(~m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + gt((~n), 0) && + igt((~m), 1) ? +(~f)*((~f)*(~x))^((~m) - 1)*sqrt((~d) + (~e)*(~x)^2)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~e)*(~m)) - (~b)*(~f)*(~n)⨸((~c)*(~m))*simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2))* ∫(((~f)*(~x))^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) + (~f)^2*((~m) - 1)⨸((~c)^2*(~m))* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸sqrt((~d) + (~e)*(~x)^2), (~x)) : nothing) + +("7_2_4_34", +@rule ∫(((~!f)*(~x))^ (~m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n)/(sqrt((~d1) + (~!e1)*(~x))*sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~n), 0) && + igt((~m), 1) ? +(~f)*((~f)*(~x))^((~m) - 1)*sqrt((~d1) + (~e1)*(~x))* sqrt((~d2) + (~e2)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~e1)*(~e2)*(~m)) - (~b)*(~f)*(~n)⨸((~c)*(~m))*simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x)))* ∫(((~f)*(~x))^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1), (~x)) + (~f)^2*((~m) - 1)⨸((~c)^2*(~m))* ∫(((~f)*(~x))^((~m) - 2)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x))), (~x)) : nothing) + +("7_2_4_35", +@rule ∫((~x)^(~m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~n), 0) && + ext_isinteger((~m)) ? +1⨸(~c)^((~m) + 1)*simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2))* int_and_subst(((~a) + (~b)*(~x))^(~n)*cosh((~x))^(~m), (~x), (~x), acosh((~c)*(~x)), "7_2_4_35") : nothing) + +("7_2_4_36", +@rule ∫((~x)^(~m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n)/(sqrt((~d1) + (~!e1)*(~x))*sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + igt((~n), 0) && + ext_isinteger((~m)) ? +1⨸(~c)^((~m) + 1)*simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x)))* int_and_subst(((~a) + (~b)*(~x))^(~n)*cosh((~x))^(~m), (~x), (~x), acosh((~c)*(~x)), "7_2_4_36") : nothing) + +("7_2_4_37", +@rule ∫(((~!f)*(~x))^(~m)*((~!a) + (~!b)*acosh((~!c)*(~x)))/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + !(ext_isinteger((~m))) ? +((~f)*(~x))^((~m) + 1)⨸((~f)*((~m) + 1))*simp(sqrt(1 - (~c)^2*(~x)^2)⨸sqrt((~d) + (~e)*(~x)^2))* ((~a) + (~b)*acosh((~c)*(~x)))* hypergeometric2f1(1⨸2, (1 + (~m))⨸2, (3 + (~m))⨸2, (~c)^2*(~x)^2) + (~b)*(~c)*((~f)*(~x))^((~m) + 2)⨸((~f)^2*((~m) + 1)*((~m) + 2))* simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2))* hypergeometricpFq([1, 1 + (~m)⨸2, 1 + (~m)⨸2], [3⨸2 + (~m)⨸2, 2 + (~m)⨸2], (~c)^2*(~x)^2) : nothing) + +("7_2_4_38", +@rule ∫(((~!f)*(~x))^ (~m)*((~!a) + (~!b)*acosh((~!c)*(~x)))/(sqrt((~d1) + (~!e1)*(~x))* sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + !(ext_isinteger((~m))) ? +((~f)*(~x))^((~m) + 1)⨸((~f)*((~m) + 1))* simp(sqrt(1 - (~c)^2*(~x)^2)⨸(sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x))))* ((~a) + (~b)*acosh((~c)*(~x)))* hypergeometric2f1(1⨸2, (1 + (~m))⨸2, (3 + (~m))⨸2, (~c)^2*(~x)^2) + (~b)*(~c)*((~f)*(~x))^((~m) + 2)⨸((~f)^2*((~m) + 1)*((~m) + 2))* simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x)))* hypergeometricpFq([1, 1 + (~m)⨸2, 1 + (~m)⨸2], [3⨸2 + (~m)⨸2, 2 + (~m)⨸2], (~c)^2*(~x)^2) : nothing) + +("7_2_4_39", +@rule ∫(((~!f)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n)/sqrt((~d) + (~!e)*(~x)^2),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + lt((~n), -1) ? +((~f)*(~x))^(~m)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1))* simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2)) - (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))* simp(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))⨸sqrt((~d) + (~e)*(~x)^2))* ∫(((~f)*(~x))^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_4_40", +@rule ∫(((~!f)*(~x))^ (~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~n)/(sqrt((~d1) + (~!e1)*(~x))*sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + lt((~n), -1) ? +((~f)*(~x))^(~m)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*((~n) + 1))* simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x))) - (~f)*(~m)⨸((~b)*(~c)*((~n) + 1))*simp(sqrt(1 + (~c)*(~x))⨸sqrt((~d1) + (~e1)*(~x)))* simp(sqrt(-1 + (~c)*(~x))⨸sqrt((~d2) + (~e2)*(~x)))* ∫(((~f)*(~x))^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_4_41", +@rule ∫((~x)^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt(2*(~p) + 2, 0) && + igt((~m), 0) ? +1⨸((~b)*(~c)^((~m) + 1))*simp(((~d) + (~e)*(~x)^2)^(~p)⨸((1 + (~c)*(~x))^(~p)*(-1 + (~c)*(~x))^(~p)))* int_and_subst((~x)^(~n)*cosh(-(~a)⨸(~b) + (~x)⨸(~b))^(~m)*sinh(-(~a)⨸(~b) + (~x)⨸(~b))^(2*(~p) + 1), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_4_41") : nothing) + +("7_2_4_42", +@rule ∫((~x)^(~!m)*((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + igt((~p) + 3/2, 0) && + igt((~m), 0) ? +1⨸((~b)*(~c)^((~m) + 1))*simp(((~d1) + (~e1)*(~x))^(~p)⨸(1 + (~c)*(~x))^(~p))* simp(((~d2) + (~e2)*(~x))^(~p)⨸(-1 + (~c)*(~x))^(~p))* int_and_subst((~x)^(~n)*cosh(-(~a)⨸(~b) + (~x)⨸(~b))^(~m)*sinh(-(~a)⨸(~b) + (~x)⨸(~b))^(2*(~p) + 1), (~x), (~x), (~a) + (~b)*acosh((~c)*(~x)), "7_2_4_42") : nothing) + +("7_2_4_43", +@rule ∫(((~!f)*(~x))^(~m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + igt((~p) + 1/2, 0) && + !(igt(((~m) + 1)/2, 0)) && + ( + eq((~m), -1) || + eq((~m), -2) + ) ? +∫(ext_expand(((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸ sqrt((~d) + (~e)*(~x)^2), ((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^((~p) + 1⨸2), (~x)), (~x)) : nothing) + +("7_2_4_44", +@rule ∫(((~!f)*(~x))^(~m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~n), (~x)) && + eq((~e1), (~c)*(~d1)) && + eq((~e2), -(~c)*(~d2)) && + gt((~d1), 0) && + lt((~d2), 0) && + igt((~p) + 1/2, 0) && + !(igt(((~m) + 1)/2, 0)) && + ( + eq((~m), -1) || + eq((~m), -2) + ) ? +∫(ext_expand(((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x))), ((~f)*(~x))^ (~m)*((~d1) + (~e1)*(~x))^((~p) + 1⨸2)*((~d2) + (~e2)*(~x))^((~p) + 1⨸2), (~x)), (~x)) : nothing) + +("7_2_4_45", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~c)^2*(~d) + (~e), 0) && + !eq((~m), -1) && + !eq((~m), -3) ? +(~d)*((~f)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))⨸((~f)*((~m) + 1)) + (~e)*((~f)*(~x))^((~m) + 3)*((~a) + (~b)*acosh((~c)*(~x)))⨸((~f)^3*((~m) + 3)) - (~b)*(~c)⨸((~f)*((~m) + 1)*((~m) + 3))* ∫(((~f)*(~x))^((~m) + 1)*((~d)*((~m) + 3) + (~e)*((~m) + 1)*(~x)^2)⨸(sqrt(1 + (~c)*(~x))* sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_4_46", +@rule ∫((~x)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~p), (~x)) && + !eq((~c)^2*(~d) + (~e), 0) && + !eq((~p), -1) ? +((~d) + (~e)*(~x)^2)^((~p) + 1)*((~a) + (~b)*acosh((~c)*(~x)))⨸(2*(~e)*((~p) + 1)) - (~b)*(~c)⨸(2*(~e)*((~p) + 1))* ∫(((~d) + (~e)*(~x)^2)^((~p) + 1)⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_4_47", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~x)) && + !eq((~c)^2*(~d) + (~e), 0) && + ext_isinteger((~p)) && + ( + gt((~p), 0) || + igt(((~m) - 1)/2, 0) && + le((~m) + (~p), 0) + ) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) - (~b)*(~c)*∫(ext_simplify(∫(((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x))⨸(sqrt(1 + (~c)*(~x))*sqrt(-1 + (~c)*(~x))), (~x)), (~x)) : nothing) + +#(* Int[x_^m_.*(d_+e_.*x_^2)^p_.*(a_.+b_.*ArcCosh[c_.*x_])^n_,x_Symbol] := 1/(b*c^(m+2*p+1))*Subst[Int[x^n*Cosh[-a/b+x/b]^m*(c^2*d+e*Cosh[-a/b+ x/b]^2)^p*Sinh[-a/b+x/b],x],x,a+b*ArcCosh[c*x]] /; FreeQ[{a,b,c,d,e,n},x] && IGtQ[m,0] && IGtQ[p,0] *) +("7_2_4_48", +@rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~x)) && + !eq((~c)^2*(~d) + (~e), 0) && + igt((~n), 0) && + ext_isinteger((~p)) && + ext_isinteger((~m)) ? +∫(ext_expand(((~a) + (~b)*acosh((~c)*(~x)))^(~n), ((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p), (~x)), (~x)) : nothing) + +# ("7_2_4_49", +# @rule ∫(((~!f)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~d) + (~e)*(~x)^2)^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)] : nothing) + +# ("7_2_4_50", +# @rule ∫(((~!f)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~!p)*((~d2) + (~!e2)*(~x))^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~f)*(~x))^(~m)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.5 u (a+b arccosh(c x))^n.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.5 u (a+b arccosh(c x))^n.jl new file mode 100644 index 0000000..c4cc77a --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.5 u (a+b arccosh(c x))^n.jl @@ -0,0 +1,312 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.2.5 u (a+b arccosh(c x))^n *) +("7_2_5_1", +@rule ∫(((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n)/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~n), 0) ? +int_and_subst(((~a) + (~b)*(~x))^(~n)*sinh((~x))⨸((~c)*(~d) + (~e)*cosh((~x))), (~x), (~x), acosh((~c)*(~x)), "7_2_5_1") : nothing) + +("7_2_5_2", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + igt((~n), 0) && + !eq((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^(~n)⨸((~e)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~e)*((~m) + 1))* ∫(((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(sqrt(-1 + (~c)*(~x))* sqrt(1 + (~c)*(~x))), (~x)) : nothing) + +("7_2_5_3", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~m), 0) && + lt((~n), -1) ? +∫(ext_expand(((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_2_5_4", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~m), 0) ? +1⨸(~c)^((~m) + 1)* int_and_subst(((~a) + (~b)*(~x))^(~n)*sinh((~x))*((~c)*(~d) + (~e)*cosh((~x)))^(~m), (~x), (~x), acosh((~c)*(~x)), "7_2_5_4") : nothing) + +("7_2_5_5", +@rule ∫((~Px)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + poly((~Px), (~x)) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫(ExpandExpression[(~Px), (~x)], (~x)), (~x)) - (~b)*(~c)*sqrt(1 - (~c)^2*(~x)^2)⨸(sqrt(-1 + (~c)*(~x))*sqrt(1 + (~c)*(~x)))* ∫(ext_simplify(∫(ExpandExpression[(~Px), (~x)], (~x))⨸sqrt(1 - (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +#(* Int[Px_*(a_.+b_.*ArcCosh[c_.*x_])^n_.,x_Symbol] := With[{u=IntHide[Px,x]}, Dist[(a+b*ArcCosh[c*x])^n,u,x] - b*c*n*Sqrt[1-c^2*x^2]/(Sqrt[-1+c*x]*Sqrt[1+c*x])*Int[ SimplifyIntegrand[u*(a+b*ArcCosh[c*x])^(n-1)/Sqrt[1-c^2*x^2],x],x]] /; FreeQ[{a,b,c},x] && PolyQ[Px,x] && IGtQ[n,0] *) +("7_2_5_6", +@rule ∫((~Px)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + poly((~Px), (~x)) ? +∫(ext_expand((~Px)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_2_5_7", +@rule ∫((~Px)*((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~x)) && + poly((~Px), (~x)) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫((~Px)*((~d) + (~e)*(~x))^(~m), (~x)), (~x)) - (~b)*(~c)*sqrt(1 - (~c)^2*(~x)^2)⨸(sqrt(-1 + (~c)*(~x))*sqrt(1 + (~c)*(~x)))* ∫(ext_simplify(∫((~Px)*((~d) + (~e)*(~x))^(~m), (~x))⨸sqrt(1 - (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_2_5_8", +@rule ∫(((~!f) + (~!g)*(~x))^(~!p)*((~d) + (~!e)*(~x))^(~m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + igt((~n), 0) && + igt((~p), 0) && + ilt((~m), 0) && + lt((~m) + (~p) + 1, 0) ? +dist(((~a) + (~b)*acosh((~c)*(~x)))^(~n), ∫(((~f) + (~g)*(~x))^(~p)*((~d) + (~e)*(~x))^(~m), (~x)), (~x)) - (~b)*(~c)*(~n)* ∫(ext_simplify( ∫(((~f) + (~g)*(~x))^(~p)*((~d) + (~e)*(~x))^(~m), (~x))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(sqrt(-1 + (~c)*(~x))*sqrt(1 + (~c)*(~x))), (~x)), (~x)) : nothing) + +("7_2_5_9", +@rule ∫(((~!f) + (~!g)*(~x) + (~!h)*(~x)^2)^ (~!p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n)/((~d) + (~!e)*(~x))^2,(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~x)) && + igt((~n), 0) && + igt((~p), 0) && + eq((~e)*(~g) - 2*(~d)*(~h), 0) ? +dist(((~a) + (~b)*acosh((~c)*(~x)))^(~n), ∫(((~f) + (~g)*(~x) + (~h)*(~x)^2)^(~p)⨸((~d) + (~e)*(~x))^2, (~x)), (~x)) - (~b)*(~c)*(~n)* ∫(ext_simplify( ∫(((~f) + (~g)*(~x) + (~h)*(~x)^2)^(~p)⨸((~d) + (~e)*(~x))^2, (~x))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) - 1)⨸(sqrt(-1 + (~c)*(~x))*sqrt(1 + (~c)*(~x))), (~x)), (~x)) : nothing) + +("7_2_5_10", +@rule ∫((~Px)*((~d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + poly((~Px), (~x)) && + igt((~n), 0) && + ext_isinteger((~m)) ? +∫(ext_expand((~Px)*((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_2_5_11", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d) + (~!e)*(~x)^2)^(~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + ext_isinteger((~p) - 1/2) && + ext_isinteger((~m)) ? +(-(~d))^intpart((~p))*((~d) + (~e)*(~x)^2)^ fracpart((~p))⨸((-1 + (~c)*(~x))^fracpart((~p))*(1 + (~c)*(~x))^fracpart((~p)))* ∫(((~f) + (~g)*(~x))^(~m)*(-1 + (~c)*(~x))^(~p)*(1 + (~c)*(~x))^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) : nothing) + +("7_2_5_12", +@rule ∫(log((~!h)*((~!f) + (~!g)*(~x))^(~!m))*((~d) + (~!e)*(~x)^2)^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~c)^2*(~d) + (~e), 0) && + ext_isinteger((~p) - 1/2) ? +(-(~d))^intpart((~p))*((~d) + (~e)*(~x)^2)^ fracpart((~p))⨸((-1 + (~c)*(~x))^fracpart((~p))*(1 + (~c)*(~x))^fracpart((~p)))* ∫( log((~h)*((~f) + (~g)*(~x))^(~m))*(-1 + (~c)*(~x))^(~p)*(1 + (~c)*(~x))^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) : nothing) + +("7_2_5_13", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + igt((~m), 0) && + ilt((~p) + 1/2, 0) && + gt((~d1), 0) && + lt((~d2), 0) && + ( + gt((~m), 3) || + lt((~m), -2*(~p) - 1) + ) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫(((~f) + (~g)*(~x))^(~m)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p), (~x)), (~x)) - (~b)*(~c)*∫(dist(1⨸(sqrt(-1 + (~c)*(~x))*sqrt(1 + (~c)*(~x))), ∫(((~f) + (~g)*(~x))^(~m)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p), (~x)), (~x)), (~x)) : nothing) + +("7_2_5_14", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + igt((~m), 0) && + ext_isinteger((~p) + 1/2) && + gt((~d1), 0) && + lt((~d2), 0) && + igt((~n), 0) && + ( + eq((~n), 1) && + gt((~p), -1) || + gt((~p), 0) || + eq((~m), 1) || + eq((~m), 2) && + lt((~p), -2) + ) ? +∫(ext_expand(((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^ (~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), ((~f) + (~g)*(~x))^(~m), (~x)), (~x)) : nothing) + +("7_2_5_15", +@rule ∫(((~f) + (~!g)*(~x))^(~m)*sqrt((~d1) + (~!e1)*(~x))* sqrt((~d2) + (~!e2)*(~x))*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ilt((~m), 0) && + gt((~d1), 0) && + lt((~d2), 0) && + igt((~n), 0) ? +((~f) + (~g)*(~x))^ (~m)*((~d1)*(~d2) + (~e1)*(~e2)*(~x)^2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)* sqrt(-(~d1)*(~d2))*((~n) + 1)) - 1⨸((~b)*(~c)*sqrt(-(~d1)*(~d2))*((~n) + 1))* ∫(((~d1)*(~d2)*(~g)*(~m) + 2*(~e1)*(~e2)*(~f)*(~x) + (~e1)*(~e2)*(~g)*((~m) + 2)*(~x)^2)*((~f) + (~g)*(~x))^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_5_16", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~m)) && + igt((~p) + 1/2, 0) && + gt((~d1), 0) && + lt((~d2), 0) && + igt((~n), 0) ? +∫(ext_expand( sqrt((~d1) + (~e1)*(~x))* sqrt((~d2) + (~e2)*(~x))*((~a) + (~b)*acosh((~c)*(~x)))^(~n), ((~f) + (~g)*(~x))^ (~m)*((~d1) + (~e1)*(~x))^((~p) - 1⨸2)*((~d2) + (~e2)*(~x))^((~p) - 1⨸2), (~x)), (~x)) : nothing) + +("7_2_5_17", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ilt((~m), 0) && + igt((~p) - 1/2, 0) && + gt((~d1), 0) && + lt((~d2), 0) && + igt((~n), 0) ? +((~f) + (~g)*(~x))^ (~m)*((~d1) + (~e1)*(~x))^((~p) + 1⨸2)*((~d2) + (~e2)*(~x))^((~p) + 1⨸2)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)* sqrt(-(~d1)*(~d2))*((~n) + 1)) - 1⨸((~b)*(~c)*sqrt(-(~d1)*(~d2))*((~n) + 1))* ∫( ext_expand(((~f) + (~g)*(~x))^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), ((~d1)*(~d2)*(~g)*(~m) + (~e1)*(~e2)*(~f)*(2*(~p) + 1)*(~x) + (~e1)*(~e2)*(~g)*((~m) + 2*(~p) + 1)*(~x)^2)*((~d1) + (~e1)*(~x))^((~p) - 1⨸2)*((~d2) + (~e2)*(~x))^((~p) - 1⨸2), (~x)), (~x)) : nothing) + +("7_2_5_18", +@rule ∫(((~f) + (~!g)*(~x))^ (~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~n)/(sqrt((~d1) + (~!e1)*(~x))*sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + igt((~m), 0) && + gt((~d1), 0) && + lt((~d2), 0) && + lt((~n), -1) ? +((~f) + (~g)*(~x))^ (~m)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)*sqrt(-(~d1)*(~d2))*((~n) + 1)) - (~g)*(~m)⨸((~b)*(~c)*sqrt(-(~d1)*(~d2))*((~n) + 1))* ∫(((~f) + (~g)*(~x))^((~m) - 1)*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1), (~x)) : nothing) + +("7_2_5_19", +@rule ∫(((~f) + (~!g)*(~x))^ (~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n)/(sqrt((~d1) + (~!e1)*(~x))*sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~n), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~m)) && + gt((~d1), 0) && + lt((~d2), 0) && + ( + gt((~m), 0) || + igt((~n), 0) + ) ? +1⨸((~c)^((~m) + 1)*sqrt(-(~d1)*(~d2)))* int_and_subst(((~a) + (~b)*(~x))^(~n)*((~c)*(~f) + (~g)*cosh((~x)))^(~m), (~x), (~x), acosh((~c)*(~x)), "7_2_5_19") : nothing) + +("7_2_5_20", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~m)) && + ilt((~p) + 1/2, 0) && + gt((~d1), 0) && + lt((~d2), 0) && + igt((~n), 0) ? +∫(ext_expand(((~a) + (~b)*acosh((~c)*(~x)))^ (~n)⨸(sqrt((~d1) + (~e1)*(~x))*sqrt((~d2) + (~e2)*(~x))), ((~f) + (~g)*(~x))^ (~m)*((~d1) + (~e1)*(~x))^((~p) + 1⨸2)*((~d2) + (~e2)*(~x))^((~p) + 1⨸2), (~x)), (~x)) : nothing) + +("7_2_5_21", +@rule ∫(((~f) + (~!g)*(~x))^(~!m)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~n), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~m)) && + ext_isinteger((~p) - 1/2) && + !( + gt((~d1), 0) && + lt((~d2), 0) + ) ? +(-(~d1)*(~d2))^intpart((~p))*((~d1) + (~e1)*(~x))^ fracpart((~p))*((~d2) + (~e2)*(~x))^ fracpart((~p))⨸((-1 + (~c)*(~x))^fracpart((~p))*(1 + (~c)*(~x))^fracpart((~p)))* ∫(((~f) + (~g)*(~x))^(~m)*(-1 + (~c)*(~x))^(~p)*(1 + (~c)*(~x))^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) : nothing) + +("7_2_5_22", +@rule ∫(log((~!h)*((~!f) + (~!g)*(~x))^(~!m))*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n)/(sqrt((~d1) + (~!e1)*(~x))*sqrt((~d2) + (~!e2)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~h), (~m), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + gt((~d1), 0) && + lt((~d2), 0) && + igt((~n), 0) ? +log((~h)*((~f) + (~g)*(~x))^(~m))*((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~b)*(~c)* sqrt(-(~d1)*(~d2))*((~n) + 1)) - (~g)*(~m)⨸((~b)*(~c)*sqrt(-(~d1)*(~d2))*((~n) + 1))* ∫(((~a) + (~b)*acosh((~c)*(~x)))^((~n) + 1)⨸((~f) + (~g)*(~x)), (~x)) : nothing) + +("7_2_5_23", +@rule ∫(log((~!h)*((~!f) + (~!g)*(~x))^(~!m))*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~h), (~m), (~n), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~p) - 1/2) && + !( + gt((~d1), 0) && + lt((~d2), 0) + ) ? +(-(~d1)*(~d2))^intpart((~p))*((~d1) + (~e1)*(~x))^ fracpart((~p))*((~d2) + (~e2)*(~x))^ fracpart((~p))⨸((-1 + (~c)*(~x))^fracpart((~p))*(1 + (~c)*(~x))^fracpart((~p)))* ∫( log((~h)*((~f) + (~g)*(~x))^(~m))*(-1 + (~c)*(~x))^(~p)*(1 + (~c)*(~x))^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^ (~n), (~x)) : nothing) + +("7_2_5_24", +@rule ∫(((~d) + (~!e)*(~x))^(~m)*((~f) + (~!g)*(~x))^(~m)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~x)) && + ilt((~m) + 1/2, 0) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~m), (~x)), (~x)) - (~b)*(~c)*∫(dist(1⨸(sqrt(-1 + (~c)*(~x))*sqrt(1 + (~c)*(~x))), ∫(((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~m), (~x)), (~x)), (~x)) : nothing) + +("7_2_5_25", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~f) + (~!g)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~g), (~n), (~x)) && + ext_isinteger((~m)) ? +∫(ext_expand(((~a) + (~b)*acosh((~c)*(~x)))^ (~n), ((~d) + (~e)*(~x))^(~m)*((~f) + (~g)*(~x))^(~m), (~x)), (~x)) : nothing) + +("7_2_5_26", +@rule ∫((~u)*((~!a) + (~!b)*acosh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + !contains_inverse_function(IntHide[(~u), (~x)], (~x)) ? +dist((~a) + (~b)*acosh((~c)*(~x)), ∫((~u), (~x)), (~x)) - (~b)*(~c)*sqrt(1 - (~c)^2*(~x)^2)⨸(sqrt(-1 + (~c)*(~x))*sqrt(1 + (~c)*(~x)))* ∫(ext_simplify(∫((~u), (~x))⨸sqrt(1 - (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_2_5_27", +@rule ∫((~Px)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~n), (~x)) && + poly((~Px), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~p) - 1/2) && + issum(ext_expand( (~Px)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p)*((~a) + (~b)*acosh[(~c)*(~x)])^(~n), (~x))) ? +∫(ext_expand( (~Px)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_2_5_28", +@rule ∫((~!Px)*((~f) + (~!g)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^(~p))^ (~!m)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~f), (~g), (~x)) && + poly((~Px), (~x)) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + igt((~p) + 1/2, 0) && + ext_isinteger((~m), (~n)) && + issum(ext_expand( (~Px)*((~f) + (~g)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p))^(~m)*((~a) + (~b)*acosh[(~c)*(~x)])^(~n), (~x))) ? +∫(ext_expand( (~Px)*((~f) + (~g)*((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p))^(~m)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_2_5_29", +@rule ∫((~RF)*acosh((~!c)*(~x))^(~!n),(~x)) => + !contains_var((~c), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) && + issum(ext_expand(acosh[(~c)*(~x)]^(~n), (~RF), (~x))) ? +∫(ext_expand(acosh((~c)*(~x))^(~n), (~RF), (~x)), (~x)) : nothing) + +("7_2_5_30", +@rule ∫((~RF)*((~a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) ? +∫(ext_expand((~RF)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +("7_2_5_31", +@rule ∫((~RF)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^(~p)*acosh((~!c)*(~x))^(~!n),(~x)) => + !contains_var((~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~p) - 1/2) && + issum(ext_expand(((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p)*acosh[(~c)*(~x)]^(~n), (~RF), (~x))) ? +∫(ext_expand(((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p)*acosh((~c)*(~x))^(~n), (~RF), (~x)), (~x)) : nothing) + +("7_2_5_32", +@rule ∫((~RF)*((~d1) + (~!e1)*(~x))^(~p)*((~d2) + (~!e2)*(~x))^ (~p)*((~a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d1), (~e1), (~d2), (~e2), (~x)) && + rational_function((~RF), (~x)) && + igt((~n), 0) && + eq((~e1) - (~c)*(~d1), 0) && + eq((~e2) + (~c)*(~d2), 0) && + ext_isinteger((~p) - 1/2) ? +∫(ext_expand(((~d1) + (~e1)*(~x))^(~p)*((~d2) + (~e2)*(~x))^(~p), (~RF)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)), (~x)) : nothing) + +# ("7_2_5_33", +# @rule ∫((~!u)*((~!a) + (~!b)*acosh((~!c)*(~x)))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~x)) ? +# Unintegrable[(~u)*((~a) + (~b)*acosh((~c)*(~x)))^(~n), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.6 Miscellaneous inverse hyperbolic cosine.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.6 Miscellaneous inverse hyperbolic cosine.jl new file mode 100644 index 0000000..077f5c6 --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.2 Inverse hyperbolic cosine/7.2.6 Miscellaneous inverse hyperbolic cosine.jl @@ -0,0 +1,142 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.2.6 Miscellaneous inverse hyperbolic cosine *) +("7_2_6_1", +@rule ∫(((~!a) + (~!b)*acosh((~c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) ? +1⨸(~d)*int_and_subst(((~a) + (~b)*acosh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_2_6_1") : nothing) + +("7_2_6_2", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*((~!a) + (~!b)*acosh((~c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~m), (~n), (~x)) ? +1⨸(~d)*int_and_subst((((~d)*(~e) - (~c)*(~f))⨸(~d) + (~f)*(~x)⨸(~d))^(~m)*((~a) + (~b)*acosh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_2_6_2") : nothing) + +("7_2_6_3", +@rule ∫(((~!A) + (~!B)*(~x) + (~!C)*(~x)^2)^(~!p)*((~!a) + (~!b)*acosh((~c) + (~!d)*(~x)))^ (~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~A), (~B), (~C), (~n), (~p), (~x)) && + eq((~B)*(1 - (~c)^2) + 2*(~A)*(~c)*(~d), 0) && + eq(2*(~c)*(~C) - (~B)*(~d), 0) ? +1⨸(~d)*int_and_subst((-(~C)⨸(~d)^2 + (~C)⨸(~d)^2*(~x)^2)^(~p)*((~a) + (~b)*acosh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_2_6_3") : nothing) + +("7_2_6_4", +@rule ∫(((~!e) + (~!f)*(~x))^(~!m)*((~!A) + (~!B)*(~x) + (~!C)*(~x)^2)^ (~!p)*((~!a) + (~!b)*acosh((~c) + (~!d)*(~x)))^(~!n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~f), (~A), (~B), (~C), (~m), (~n), (~p), (~x)) && + eq((~B)*(1 - (~c)^2) + 2*(~A)*(~c)*(~d), 0) && + eq(2*(~c)*(~C) - (~B)*(~d), 0) ? +1⨸(~d)*int_and_subst((((~d)*(~e) - (~c)*(~f))⨸(~d) + (~f)*(~x)⨸(~d))^(~m)*(-(~C)⨸(~d)^2 + (~C)⨸(~d)^2*(~x)^2)^ (~p)*((~a) + (~b)*acosh((~x)))^(~n), (~x), (~x), (~c) + (~d)*(~x), "7_2_6_4") : nothing) + +("7_2_6_5", +@rule ∫(sqrt((~!a) + (~!b)*acosh(1 + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +2*sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2))* sinh((1⨸2)*acosh(1 + (~d)*(~x)^2))^2⨸((~d)*(~x)) - sqrt((~b))*sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* sinh((1⨸2)*acosh(1 + (~d)*(~x)^2))* SymbolicUtils.erfi((1⨸sqrt(2*(~b)))*sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2)))⨸((~d)*(~x)) + sqrt((~b))*sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) + sinh((~a)⨸(2*(~b))))* sinh((1⨸2)*acosh(1 + (~d)*(~x)^2))* SymbolicUtils.erf((1⨸sqrt(2*(~b)))*sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2)))⨸((~d)*(~x)) : nothing) + +("7_2_6_6", +@rule ∫(sqrt((~!a) + (~!b)*acosh(-1 + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +2*sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))* cosh((1⨸2)*acosh(-1 + (~d)*(~x)^2))^2⨸((~d)*(~x)) - sqrt((~b))*sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* cosh((1⨸2)*acosh(-1 + (~d)*(~x)^2))* SymbolicUtils.erfi((1⨸sqrt(2*(~b)))*sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2)))⨸((~d)*(~x)) - sqrt((~b))*sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) + sinh((~a)⨸(2*(~b))))* cosh((1⨸2)*acosh(-1 + (~d)*(~x)^2))* SymbolicUtils.erf((1⨸sqrt(2*(~b)))*sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2)))⨸((~d)*(~x)) : nothing) + +("7_2_6_7", +@rule ∫(((~!a) + (~!b)*acosh((~c) + (~!d)*(~x)^2))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, 1) && + gt((~n), 1) ? +(~x)*((~a) + (~b)*acosh((~c) + (~d)*(~x)^2))^(~n) - 2*(~b)* (~n)*(2*(~c)*(~d)*(~x)^2 + (~d)^2*(~x)^4)*((~a) + (~b)*acosh((~c) + (~d)*(~x)^2))^((~n) - 1)⨸((~d)*(~x)* sqrt(-1 + (~c) + (~d)*(~x)^2)*sqrt(1 + (~c) + (~d)*(~x)^2)) + 4*(~b)^2*(~n)*((~n) - 1)*∫(((~a) + (~b)*acosh((~c) + (~d)*(~x)^2))^((~n) - 2), (~x)) : nothing) + +("7_2_6_8", +@rule ∫(1/((~!a) + (~!b)*acosh(1 + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +(~x)*cosh((~a)⨸(2*(~b)))* coshintegral(((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(sqrt(2)*(~b)* sqrt((~d)*(~x)^2)) - (~x)*sinh((~a)⨸(2*(~b)))* sinhintegral(((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(sqrt(2)*(~b)* sqrt((~d)*(~x)^2)) : nothing) + +("7_2_6_9", +@rule ∫(1/((~!a) + (~!b)*acosh(-1 + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +-(~x)*sinh((~a)⨸(2*(~b)))* coshintegral(((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(sqrt(2)*(~b)* sqrt((~d)*(~x)^2)) + (~x)*cosh((~a)⨸(2*(~b)))* sinhintegral(((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(sqrt(2)*(~b)* sqrt((~d)*(~x)^2)) : nothing) + +("7_2_6_10", +@rule ∫(1/sqrt((~!a) + (~!b)*acosh(1 + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* sinh(acosh(1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erfi(sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸(sqrt((~b))*(~d)*(~x)) + sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) + sinh((~a)⨸(2*(~b))))* sinh(acosh(1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erf(sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸(sqrt((~b))*(~d)*(~x)) : nothing) + +("7_2_6_11", +@rule ∫(1/sqrt((~!a) + (~!b)*acosh(-1 + (~!d)*(~x)^2)),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* cosh(acosh(-1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erfi(sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸(sqrt((~b))*(~d)*(~x)) - sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) + sinh((~a)⨸(2*(~b))))* cosh(acosh(-1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erf(sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸(sqrt((~b))*(~d)*(~x)) : nothing) + +("7_2_6_12", +@rule ∫(1/((~!a) + (~!b)*acosh(1 + (~!d)*(~x)^2))^(3//2),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +-sqrt((~d)*(~x)^2)* sqrt(2 + (~d)*(~x)^2)⨸((~b)*(~d)*(~x)*sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2))) + sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* sinh(acosh(1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erfi(sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸((~b)^(3⨸2)*(~d)*(~x)) - sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) + sinh((~a)⨸(2*(~b))))* sinh(acosh(1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erf(sqrt((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸((~b)^(3⨸2)*(~d)*(~x)) : nothing) + +("7_2_6_13", +@rule ∫(1/((~!a) + (~!b)*acosh(-1 + (~!d)*(~x)^2))^(3//2),(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +-sqrt((~d)*(~x)^2)* sqrt(-2 + (~d)*(~x)^2)⨸((~b)*(~d)*(~x)*sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))) + sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) - sinh((~a)⨸(2*(~b))))* cosh(acosh(-1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erfi(sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸((~b)^(3⨸2)*(~d)*(~x)) + sqrt(π⨸2)*(cosh((~a)⨸(2*(~b))) + sinh((~a)⨸(2*(~b))))* cosh(acosh(-1 + (~d)*(~x)^2)⨸2)* SymbolicUtils.erf(sqrt((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸sqrt(2*(~b)))⨸((~b)^(3⨸2)*(~d)*(~x)) : nothing) + +("7_2_6_14", +@rule ∫(1/((~!a) + (~!b)*acosh(1 + (~!d)*(~x)^2))^2,(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +-sqrt((~d)*(~x)^2)*sqrt(2 + (~d)*(~x)^2)⨸(2*(~b)*(~d)*(~x)*((~a) + (~b)*acosh(1 + (~d)*(~x)^2))) - (~x)*sinh((~a)⨸(2*(~b)))* coshintegral(((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(2*sqrt(2)*(~b)^2* sqrt((~d)*(~x)^2)) + (~x)*cosh((~a)⨸(2*(~b)))* sinhintegral(((~a) + (~b)*acosh(1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(2*sqrt(2)*(~b)^2* sqrt((~d)*(~x)^2)) : nothing) + +("7_2_6_15", +@rule ∫(1/((~!a) + (~!b)*acosh(-1 + (~!d)*(~x)^2))^2,(~x)) => + !contains_var((~a), (~b), (~d), (~x)) ? +-sqrt((~d)*(~x)^2)* sqrt(-2 + (~d)*(~x)^2)⨸(2*(~b)*(~d)*(~x)*((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))) + (~x)*cosh((~a)⨸(2*(~b)))* coshintegral(((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(2*sqrt(2)*(~b)^2* sqrt((~d)*(~x)^2)) - (~x)*sinh((~a)⨸(2*(~b)))* sinhintegral(((~a) + (~b)*acosh(-1 + (~d)*(~x)^2))⨸(2*(~b)))⨸(2*sqrt(2)*(~b)^2* sqrt((~d)*(~x)^2)) : nothing) + +("7_2_6_16", +@rule ∫(((~!a) + (~!b)*acosh((~c) + (~!d)*(~x)^2))^(~n),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~x)) && + eq((~c)^2, 1) && + lt((~n), -1) && + !eq((~n), -2) ? +-(~x)*((~a) + (~b)*acosh((~c) + (~d)*(~x)^2))^((~n) + 2)⨸(4*(~b)^2*((~n) + 1)*((~n) + 2)) + (2*(~c)*(~x)^2 + (~d)*(~x)^4)*((~a) + (~b)*acosh((~c) + (~d)*(~x)^2))^((~n) + 1)⨸(2*(~b)*((~n) + 1)*(~x)* sqrt(-1 + (~c) + (~d)*(~x)^2)*sqrt(1 + (~c) + (~d)*(~x)^2)) + 1⨸(4*(~b)^2*((~n) + 1)*((~n) + 2))* ∫(((~a) + (~b)*acosh((~c) + (~d)*(~x)^2))^((~n) + 2), (~x)) : nothing) + +("7_2_6_17", +@rule ∫(acosh((~!a)*(~x)^(~p))^(~!n)/(~x),(~x)) => + !contains_var((~a), (~p), (~x)) && + igt((~n), 0) ? +1⨸(~p)*int_and_subst((~x)^(~n)*tanh((~x)), (~x), (~x), acosh((~a)*(~x)^(~p)), "7_2_6_17") : nothing) + +("7_2_6_18", +@rule ∫((~!u)*acosh((~c)/((~!a) + (~!b)*(~x)^(~!n)))^(~!m),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~m), (~x)) ? +∫((~u)*asech((~a)⨸(~c) + (~b)*(~x)^(~n)⨸(~c))^(~m), (~x)) : nothing) + +("7_2_6_19", +@rule ∫(acosh(sqrt(1 + (~!b)*(~x)^2))^(~!n)/sqrt(1 + (~!b)*(~x)^2),(~x)) => + !contains_var((~b), (~n), (~x)) ? +sqrt(-1 + sqrt(1 + (~b)*(~x)^2))*sqrt(1 + sqrt(1 + (~b)*(~x)^2))⨸((~b)*(~x))* int_and_subst(acosh((~x))^(~n)⨸(sqrt(-1 + (~x))*sqrt(1 + (~x))), (~x), (~x), sqrt(1 + (~b)*(~x)^2), "7_2_6_19") : nothing) + +("7_2_6_20", +@rule ∫((~f)^((~!c)*acosh((~!a) + (~!b)*(~x))^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~x)) && + igt((~n), 0) ? +1⨸(~b)*int_and_subst((~f)^((~c)*(~x)^(~n))*sinh((~x)), (~x), (~x), acosh((~a) + (~b)*(~x)), "7_2_6_20") : nothing) + +("7_2_6_21", +@rule ∫((~x)^(~!m)*(~f)^((~!c)*acosh((~!a) + (~!b)*(~x))^(~!n)),(~x)) => + !contains_var((~a), (~b), (~c), (~f), (~x)) && + igt((~m), 0) && + igt((~n), 0) ? +1⨸(~b)*int_and_subst((-(~a)⨸(~b) + cosh((~x))⨸(~b))^(~m)*(~f)^((~c)*(~x)^(~n))*sinh((~x)), (~x), (~x), acosh((~a) + (~b)*(~x)), "7_2_6_21") : nothing) + +("7_2_6_22", +@rule ∫(acosh((~u)),(~x)) => + !contains_inverse_function((~u), (~x)) && + !(function_of_exponential((~u), (~x))) ? +(~x)*acosh((~u)) - ∫(ext_simplify((~x)*Symbolics.derivative((~u), (~x))⨸(sqrt(-1 + (~u))*sqrt(1 + (~u))), (~x)), (~x)) : nothing) + +("7_2_6_25", +@rule ∫(ℯ^((~!n)*acosh((~u))),(~x)) => + ext_isinteger((~n)) && + poly((~u), (~x)) ? +∫(((~u) + sqrt(-1 + (~u))*sqrt(1 + (~u)))^(~n), (~x)) : nothing) + +("7_2_6_26", +@rule ∫((~x)^(~!m)*ℯ^((~!n)*acosh((~u))),(~x)) => + isrational((~m)) && + ext_isinteger((~n)) && + poly((~u), (~x)) ? +∫((~x)^(~m)*((~u) + sqrt(-1 + (~u))*sqrt(1 + (~u)))^(~n), (~x)) : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.1 (a+b arctanh(c x^n))^p.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.1 (a+b arctanh(c x^n))^p.jl new file mode 100644 index 0000000..ce9718d --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.1 (a+b arctanh(c x^n))^p.jl @@ -0,0 +1,77 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.3.1 (a+b arctanh(c x^n))^p *) +("7_3_1_1", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~n), 1) || + eq((~p), 1) + ) ? +(~x)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))^(~p) - (~b)*(~c)*(~n)*(~p)* ∫((~x)^(~n)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_1_2", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~n), 1) || + eq((~p), 1) + ) ? +(~x)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))^(~p) - (~b)*(~c)*(~n)*(~p)* ∫((~x)^(~n)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_1_3", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) ? +∫(ext_expand(((~a) + (~b)*log(1 + (~c)*(~x)^(~n))⨸2 - (~b)*log(1 - (~c)*(~x)^(~n))⨸2)^ (~p), (~x)), (~x)) : nothing) + +("7_3_1_4", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) ? +∫(ext_expand(((~a) + (~b)*log(1 + (~x)^(-(~n))⨸(~c))⨸2 - (~b)*log(1 - (~x)^(-(~n))⨸(~c))⨸2)^(~p), (~x)), (~x)) : nothing) + +("7_3_1_5", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫(((~a) + (~b)*acoth((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("7_3_1_6", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫(((~a) + (~b)*atanh((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("7_3_1_7", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*atanh((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "7_3_1_7") : nothing) + +("7_3_1_8", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*acoth((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "7_3_1_8") : nothing) + +# ("7_3_1_9", +# @rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~!n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*atanh((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +# ("7_3_1_10", +# @rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~!n)))^(~p),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~p), (~x)) ? +# Unintegrable[((~a) + (~b)*acoth((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.2 (d x)^m (a+b arctanh(c x^n))^p.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.2 (d x)^m (a+b arctanh(c x^n))^p.jl new file mode 100644 index 0000000..41a991c --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.2 (d x)^m (a+b arctanh(c x^n))^p.jl @@ -0,0 +1,181 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.3.2 (d x)^m (a+b arctanh(c x^n))^p *) +("7_3_2_1", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) ? +(~a)*log((~x)) - (~b)⨸2*PolyLog.reli(2, -(~c)*(~x)) + (~b)⨸2*PolyLog.reli(2, (~c)*(~x)) : nothing) + +("7_3_2_2", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)))/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) ? +(~a)*log((~x)) + (~b)⨸2*PolyLog.reli(2, -1⨸((~c)*(~x))) - (~b)⨸2*PolyLog.reli(2, 1⨸((~c)*(~x))) : nothing) + +("7_3_2_3", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)))^(~p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) ? +2*((~a) + (~b)*atanh((~c)*(~x)))^(~p)*atanh(1 - 2⨸(1 - (~c)*(~x))) - 2*(~b)*(~c)*(~p)* ∫(((~a) + (~b)*atanh((~c)*(~x)))^((~p) - 1)* atanh(1 - 2⨸(1 - (~c)*(~x)))⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_2_4", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)))^(~p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) ? +2*((~a) + (~b)*acoth((~c)*(~x)))^(~p)*acoth(1 - 2⨸(1 - (~c)*(~x))) - 2*(~b)*(~c)*(~p)* ∫(((~a) + (~b)*acoth((~c)*(~x)))^((~p) - 1)* acoth(1 - 2⨸(1 - (~c)*(~x)))⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_2_5", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*atanh((~c)*(~x)))^(~p)⨸(~x), (~x), (~x), (~x)^(~n), "7_3_2_5") : nothing) + +("7_3_2_6", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~!p)/(~x),(~x)) => + !contains_var((~a), (~b), (~c), (~n), (~x)) && + igt((~p), 0) ? +1⨸(~n)*int_and_subst(((~a) + (~b)*acoth((~c)*(~x)))^(~p)⨸(~x), (~x), (~x), (~x)^(~n), "7_3_2_6") : nothing) + +("7_3_2_7", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + eq((~n), 1) && + ext_isinteger((~m)) + ) && + !eq((~m), -1) ? +(~x)^((~m) + 1)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))^(~p)⨸((~m) + 1) - (~b)*(~c)*(~n)*(~p)⨸((~m) + 1)* ∫((~x)^((~m) + (~n))*((~a) + (~b)*atanh((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_2_8", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + eq((~n), 1) && + ext_isinteger((~m)) + ) && + !eq((~m), -1) ? +(~x)^((~m) + 1)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))^(~p)⨸((~m) + 1) - (~b)*(~c)*(~n)*(~p)⨸((~m) + 1)* ∫((~x)^((~m) + (~n))*((~a) + (~b)*acoth((~c)*(~x)^(~n)))^((~p) - 1)⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_2_9", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 1) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*atanh((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "7_3_2_9") : nothing) + +("7_3_2_10", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~n), (~x)) && + igt((~p), 1) && + ext_isinteger(simplify(((~m) + 1)/(~n))) ? +1⨸(~n)*int_and_subst((~x)^(simplify(((~m) + 1)⨸(~n)) - 1)*((~a) + (~b)*acoth((~c)*(~x)))^(~p), (~x), (~x), (~x)^(~n), "7_3_2_10") : nothing) + +("7_3_2_11", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + ext_isinteger((~m)) ? +∫(ext_expand( (~x)^(~m)*((~a) + (~b)*log(1 + (~c)*(~x)^(~n))⨸2 - (~b)*log(1 - (~c)*(~x)^(~n))⨸2)^(~p), (~x)), (~x)) : nothing) + +("7_3_2_12", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + ext_isinteger((~m)) ? +∫(ext_expand( (~x)^(~m)*((~a) + (~b)*log(1 + (~x)^(-(~n))⨸(~c))⨸2 - (~b)*log(1 - (~x)^(-(~n))⨸(~c))⨸2)^(~p), (~x)), (~x)) : nothing) + +("7_3_2_13", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + isfraction((~m)) ? +ext_den((~m))*int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*atanh((~c)*(~x)^(ext_den((~m))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~m))), "7_3_2_13") : nothing) + +("7_3_2_14", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~x)) && + igt((~p), 1) && + igt((~n), 0) && + isfraction((~m)) ? +ext_den((~m))*int_and_subst((~x)^(ext_den((~m))*((~m) + 1) - 1)*((~a) + (~b)*acoth((~c)*(~x)^(ext_den((~m))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~m))), "7_3_2_14") : nothing) + +("7_3_2_15", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫((~x)^(~m)*((~a) + (~b)*acoth((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("7_3_2_16", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + igt((~p), 1) && + ilt((~n), 0) ? +∫((~x)^(~m)*((~a) + (~b)*atanh((~x)^(-(~n))⨸(~c)))^(~p), (~x)) : nothing) + +("7_3_2_17", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*atanh((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "7_3_2_17") : nothing) + +("7_3_2_18", +@rule ∫((~x)^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~m), (~x)) && + igt((~p), 1) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n))*((~m) + 1) - 1)*((~a) + (~b)*acoth((~c)*(~x)^(ext_den((~n))*(~n))))^(~p), (~x), (~x), (~x)^(1⨸ext_den((~n))), "7_3_2_18") : nothing) + +("7_3_2_19", +@rule ∫(((~d)*(~x))^(~m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger((~n)) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))⨸((~d)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~d)^(~n)*((~m) + 1))*∫(((~d)*(~x))^((~m) + (~n))⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_2_20", +@rule ∫(((~d)*(~x))^(~m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~!n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + ext_isinteger((~n)) && + !eq((~m), -1) ? +((~d)*(~x))^((~m) + 1)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))⨸((~d)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~d)^(~n)*((~m) + 1))*∫(((~d)*(~x))^((~m) + (~n))⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_2_21", +@rule ∫(((~d)*(~x))^(~m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + isrational((~m), (~n)) + ) ? +(~d)^intpart((~m))*((~d)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +("7_3_2_22", +@rule ∫(((~d)*(~x))^(~m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~!n)))^(~!p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && + igt((~p), 0) && + ( + eq((~p), 1) || + isrational((~m), (~n)) + ) ? +(~d)^intpart((~m))*((~d)*(~x))^fracpart((~m))⨸(~x)^fracpart((~m))* ∫((~x)^(~m)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))^(~p), (~x)) : nothing) + +# ("7_3_2_23", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +# ("7_3_2_24", +# @rule ∫(((~!d)*(~x))^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~!n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d)*(~x))^(~m)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.3 (d+e x)^m (a+b arctanh(c x^n))^p.jl b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.3 (d+e x)^m (a+b arctanh(c x^n))^p.jl new file mode 100644 index 0000000..3efdbda --- /dev/null +++ b/src/methods/rule_based/rules2/7 Inverse hyperbolic functions/7.3 Inverse hyperbolic tangent/7.3.3 (d+e x)^m (a+b arctanh(c x^n))^p.jl @@ -0,0 +1,143 @@ +file_rules = [ +#(* ::Subsection::Closed:: *) +#(* 7.3.3 (d+e x)^m (a+b arctanh(c x^n))^p *) +("7_3_3_1", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)))^(~!p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~p), 0) && + eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*atanh((~c)*(~x)))^(~p)*log(2⨸(1 + (~e)*(~x)⨸(~d)))⨸(~e) + (~b)*(~c)*(~p)⨸(~e)* ∫(((~a) + (~b)*atanh((~c)*(~x)))^((~p) - 1)*log(2⨸(1 + (~e)*(~x)⨸(~d)))⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_3_2", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)))^(~!p)/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~p), 0) && + eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*acoth((~c)*(~x)))^(~p)*log(2⨸(1 + (~e)*(~x)⨸(~d)))⨸(~e) + (~b)*(~c)*(~p)⨸(~e)* ∫(((~a) + (~b)*acoth((~c)*(~x)))^((~p) - 1)*log(2⨸(1 + (~e)*(~x)⨸(~d)))⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_3_3", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)))/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*atanh((~c)*(~x)))*log(2⨸(1 + (~c)*(~x)))⨸(~e) + (~b)*(~c)⨸(~e)*∫(log(2⨸(1 + (~c)*(~x)))⨸(1 - (~c)^2*(~x)^2), (~x)) + ((~a) + (~b)*atanh((~c)*(~x)))*log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - (~b)*(~c)⨸(~e)* ∫(log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_3_4", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)))/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*acoth((~c)*(~x)))*log(2⨸(1 + (~c)*(~x)))⨸(~e) + (~b)*(~c)⨸(~e)*∫(log(2⨸(1 + (~c)*(~x)))⨸(1 - (~c)^2*(~x)^2), (~x)) + ((~a) + (~b)*acoth((~c)*(~x)))*log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - (~b)*(~c)⨸(~e)* ∫(log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_3_5", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)))^2/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*atanh((~c)*(~x)))^2*log(2⨸(1 + (~c)*(~x)))⨸(~e) + (~b)*((~a) + (~b)*atanh((~c)*(~x)))*PolyLog.reli(2, 1 - 2⨸(1 + (~c)*(~x)))⨸(~e) + (~b)^2*PolyLog.reli(3, 1 - 2⨸(1 + (~c)*(~x)))⨸(2*(~e)) + ((~a) + (~b)*atanh((~c)*(~x)))^2* log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - (~b)*((~a) + (~b)*atanh((~c)*(~x)))* PolyLog.reli(2, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - (~b)^2*PolyLog.reli(3, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(2*(~e)) : nothing) + +("7_3_3_6", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)))^2/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*acoth((~c)*(~x)))^2*log(2⨸(1 + (~c)*(~x)))⨸(~e) + (~b)*((~a) + (~b)*acoth((~c)*(~x)))*PolyLog.reli(2, 1 - 2⨸(1 + (~c)*(~x)))⨸(~e) + (~b)^2*PolyLog.reli(3, 1 - 2⨸(1 + (~c)*(~x)))⨸(2*(~e)) + ((~a) + (~b)*acoth((~c)*(~x)))^2* log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - (~b)*((~a) + (~b)*acoth((~c)*(~x)))* PolyLog.reli(2, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - (~b)^2*PolyLog.reli(3, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(2*(~e)) : nothing) + +("7_3_3_7", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)))^3/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*atanh((~c)*(~x)))^3*log(2⨸(1 + (~c)*(~x)))⨸(~e) + 3*(~b)*((~a) + (~b)*atanh((~c)*(~x)))^2*PolyLog.reli(2, 1 - 2⨸(1 + (~c)*(~x)))⨸(2*(~e)) + 3*(~b)^2*((~a) + (~b)*atanh((~c)*(~x)))*PolyLog.reli(3, 1 - 2⨸(1 + (~c)*(~x)))⨸(2*(~e)) + 3*(~b)^3*PolyLog.reli(4, 1 - 2⨸(1 + (~c)*(~x)))⨸(4*(~e)) + ((~a) + (~b)*atanh((~c)*(~x)))^3* log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - 3*(~b)*((~a) + (~b)*atanh((~c)*(~x)))^2* PolyLog.reli(2, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(2*(~e)) - 3*(~b)^2*((~a) + (~b)*atanh((~c)*(~x)))* PolyLog.reli(3, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(2*(~e)) - 3*(~b)^3*PolyLog.reli(4, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(4*(~e)) : nothing) + +("7_3_3_8", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)))^3/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + !eq((~c)^2*(~d)^2 - (~e)^2, 0) ? +-((~a) + (~b)*acoth((~c)*(~x)))^3*log(2⨸(1 + (~c)*(~x)))⨸(~e) + 3*(~b)*((~a) + (~b)*acoth((~c)*(~x)))^2*PolyLog.reli(2, 1 - 2⨸(1 + (~c)*(~x)))⨸(2*(~e)) + 3*(~b)^2*((~a) + (~b)*acoth((~c)*(~x)))*PolyLog.reli(3, 1 - 2⨸(1 + (~c)*(~x)))⨸(2*(~e)) + 3*(~b)^3*PolyLog.reli(4, 1 - 2⨸(1 + (~c)*(~x)))⨸(4*(~e)) + ((~a) + (~b)*acoth((~c)*(~x)))^3* log(2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(~e) - 3*(~b)*((~a) + (~b)*acoth((~c)*(~x)))^2* PolyLog.reli(2, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(2*(~e)) - 3*(~b)^2*((~a) + (~b)*acoth((~c)*(~x)))* PolyLog.reli(3, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(2*(~e)) - 3*(~b)^3*PolyLog.reli(4, 1 - 2*(~c)*((~d) + (~e)*(~x))⨸(((~c)*(~d) + (~e))*(1 + (~c)*(~x))))⨸(4*(~e)) : nothing) + +("7_3_3_9", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*atanh((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~q), (~x)) && + !eq((~q), -1) ? +((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*atanh((~c)*(~x)))⨸((~e)*((~q) + 1)) - (~b)*(~c)⨸((~e)*((~q) + 1))*∫(((~d) + (~e)*(~x))^((~q) + 1)⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_3_10", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*acoth((~!c)*(~x))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~q), (~x)) && + !eq((~q), -1) ? +((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*acoth((~c)*(~x)))⨸((~e)*((~q) + 1)) - (~b)*(~c)⨸((~e)*((~q) + 1))*∫(((~d) + (~e)*(~x))^((~q) + 1)⨸(1 - (~c)^2*(~x)^2), (~x)) : nothing) + +("7_3_3_11", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*atanh((~!c)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~p), 1) && + ext_isinteger((~q)) && + !eq((~q), -1) ? +((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*atanh((~c)*(~x)))^(~p)⨸((~e)*((~q) + 1)) - (~b)*(~c)*(~p)⨸((~e)*((~q) + 1))* ∫(ext_expand(((~a) + (~b)*atanh((~c)*(~x)))^((~p) - 1), ((~d) + (~e)*(~x))^((~q) + 1)⨸(1 - (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_3_3_12", +@rule ∫(((~d) + (~!e)*(~x))^(~!q)*((~!a) + (~!b)*acoth((~!c)*(~x)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + igt((~p), 1) && + ext_isinteger((~q)) && + !eq((~q), -1) ? +((~d) + (~e)*(~x))^((~q) + 1)*((~a) + (~b)*acoth((~c)*(~x)))^(~p)⨸((~e)*((~q) + 1)) - (~b)*(~c)*(~p)⨸((~e)*((~q) + 1))* ∫(ext_expand(((~a) + (~b)*acoth((~c)*(~x)))^((~p) - 1), ((~d) + (~e)*(~x))^((~q) + 1)⨸(1 - (~c)^2*(~x)^2), (~x)), (~x)) : nothing) + +("7_3_3_13", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + ext_isinteger((~n)) ? +log((~d) + (~e)*(~x))*((~a) + (~b)*atanh((~c)*(~x)^(~n)))⨸(~e) - (~b)*(~c)*(~n)⨸(~e)*∫((~x)^((~n) - 1)*log((~d) + (~e)*(~x))⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_3_14", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))/((~!d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + ext_isinteger((~n)) ? +log((~d) + (~e)*(~x))*((~a) + (~b)*acoth((~c)*(~x)^(~n)))⨸(~e) - (~b)*(~c)*(~n)⨸(~e)*∫((~x)^((~n) - 1)*log((~d) + (~e)*(~x))⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_3_15", +@rule ∫(((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*atanh((~c)*(~x)^(ext_den((~n))*(~n))))⨸((~d) + (~e)*(~x)^ext_den((~n))), (~x), (~x), (~x)^(1⨸ext_den((~n))), "7_3_3_15") : nothing) + +("7_3_3_16", +@rule ∫(((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))/((~d) + (~!e)*(~x)),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~x)) && + isfraction((~n)) ? +ext_den((~n))*int_and_subst((~x)^(ext_den((~n)) - 1)*((~a) + (~b)*acoth((~c)*(~x)^(ext_den((~n))*(~n))))⨸((~d) + (~e)*(~x)^ext_den((~n))), (~x), (~x), (~x)^(1⨸ext_den((~n))), "7_3_3_16") : nothing) + +("7_3_3_17", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))⨸((~e)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~e)*((~m) + 1))* ∫((~x)^((~n) - 1)*((~d) + (~e)*(~x))^((~m) + 1)⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_3_18", +@rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n))),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~x)) && + !eq((~m), -1) ? +((~d) + (~e)*(~x))^((~m) + 1)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))⨸((~e)*((~m) + 1)) - (~b)*(~c)*(~n)⨸((~e)*((~m) + 1))* ∫((~x)^((~n) - 1)*((~d) + (~e)*(~x))^((~m) + 1)⨸(1 - (~c)^2*(~x)^(2*(~n))), (~x)) : nothing) + +("7_3_3_19", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 1) && + igt((~m), 0) ? +∫(ext_expand(((~a) + (~b)*atanh((~c)*(~x)^(~n)))^(~p), ((~d) + (~e)*(~x))^(~m), (~x)), (~x)) : nothing) + +("7_3_3_20", +@rule ∫(((~d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~p),(~x)) => + !contains_var((~a), (~b), (~c), (~d), (~e), (~n), (~x)) && + igt((~p), 1) && + igt((~m), 0) ? +∫(ext_expand(((~a) + (~b)*acoth((~c)*(~x)^(~n)))^(~p), ((~d) + (~e)*(~x))^(~m), (~x)), (~x)) : nothing) + +# ("7_3_3_21", +# @rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*atanh((~!c)*(~x)^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*atanh((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + +# ("7_3_3_22", +# @rule ∫(((~!d) + (~!e)*(~x))^(~!m)*((~!a) + (~!b)*acoth((~!c)*(~x)^(~n)))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~e), (~m), (~n), (~p), (~x)) ? +# Unintegrable[((~d) + (~e)*(~x))^(~m)*((~a) + (~b)*acoth((~c)*(~x)^(~n)))^(~p), (~x)] : nothing) + + +] diff --git a/src/methods/rule_based/rules2/9 Miscellaneous/0.1 Integrand simplification rules.jl b/src/methods/rule_based/rules2/9 Miscellaneous/0.1 Integrand simplification rules.jl new file mode 100644 index 0000000..8eeed03 --- /dev/null +++ b/src/methods/rule_based/rules2/9 Miscellaneous/0.1 Integrand simplification rules.jl @@ -0,0 +1,179 @@ +file_rules = [ +# # (* ::Subsection::Closed:: *) +# # (* 9.1 Integrand simplification rules *) +# # (* Int[u_.*(v_+w_)^p_.,x_Symbol] := Int[u*w^p,x] /; FreeQ[p,x] && EqQ[v,0] *) +# ("0_1_0", +# @rule ∫(+(~~a),~x) => sum(map(f -> ∫(f,~x), ~a))) +# +# ("0_1_6", +# @rule ∫((~!u)*((~!a)*(~v) + (~!b)*(~v) + (~!w))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~x)) && +# contains_var((~v), (~x)) ? +# ∫((~u)*(((~a) + (~b))*(~v) + (~w))^(~p), (~x)) : nothing) +# +# ("0_1_7", +# @rule ∫((~!u)*(~Px)^(~p),(~x)) => +# poly((~Px), (~x)) && +# !(isrational((~p))) && +# !contains_var((~p), (~x)) && +# isrational(simplify((~p))) ? +# ∫((~u)*(~Px)^simplify((~p)), (~x)) : nothing) + +("0_1_8", +:(∫((~a),(~x)) ) => :( + !contains_var((~a), (~x)) ? +(~a)*(~x) : nothing)) + +# ("0_1_12", +# @rule ∫(*(~~a),~x) => +# let +# out = prod([contains_var(el,~x) ? 1 : el for el in ~a]) +# eq(out,1) ? (return nothing) : (return out*∫(prod([contains_var(el,~x) ? el : 1 for el in ~a]),~x)) +# end : nothing +# ) +# +# # TODO if pattern matching was better 0_1_12_[1,2,3] would be handled by 0_1_12 +("0_1_12_1", +:(∫((~a)/(~u),(~x)) ) => :( + !contains_var(~a, ~x) && + !eq(~a,1) ? +(~a)*∫(1/(~u), ~x) : nothing)) + +("0_1_12_2", +:(∫((~a * ~v)/(~u),(~x)) ) => :( + !contains_var(~a, ~x) && + !eq(~a,1) ? +(~a)*∫((~v)/(~u), ~x) : nothing)) + +("0_1_12_3", +:(∫((~v)/(~a * ~u),(~x)) ) => :( + !contains_var(~a, ~x) && + !eq(~a,1) ? +(1⨸(~a))*∫((~v)/(~u), ~x) : nothing)) + +# +# ("0_1_13", +# @rule ∫((~!u)*((~!a)*(~x)^(~n))^(~m),(~x)) => +# !contains_var((~a), (~m), (~n), (~x)) && +# !(ext_isinteger((~m))) ? +# (~a)^intpart((~m))*((~a)*(~x)^(~n))^fracpart((~m))⨸(~x)^((~n)*fracpart((~m)))* ∫((~u)*(~x)^((~m)*(~n)), (~x)) : nothing) +# +# ("0_1_14", +# @rule ∫((~!u)*(~v)^(~!m)*((~b)*(~v))^(~n),(~x)) => +# !contains_var((~b), (~n), (~x)) && +# ext_isinteger((~m)) ? +# 1⨸(~b)^(~m)*∫((~u)*((~b)*(~v))^((~m) + (~n)), (~x)) : nothing) +# +# ("0_1_15", +# @rule ∫((~!u)*((~!a)*(~v))^(~m)*((~!b)*(~v))^(~n),(~x)) => +# !contains_var((~a), (~b), (~m), (~x)) && +# !(ext_isinteger((~m))) && +# igt((~n) + 1/2, 0) && +# ext_isinteger((~m) + (~n)) ? +# (~a)^((~m) + 1⨸2)*(~b)^((~n) - 1⨸2)*sqrt((~b)*(~v))⨸sqrt((~a)*(~v))*∫((~u)*(~v)^((~m) + (~n)), (~x)) : nothing) +# +# # (* Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] := b^(n-1/2)*Sqrt[b*v]/(a^(n-1/2)*Sqrt[a*v])*Int[u*(a*v)^(m+n),x] /; FreeQ[{a,b,m},x] && Not[IntegerQ[m]] && IGtQ[n+1/2,0] && Not[IntegerQ[m+n]] *) +# ("0_1_16", +# @rule ∫((~!u)*((~!a)*(~v))^(~m)*((~!b)*(~v))^(~n),(~x)) => +# !contains_var((~a), (~b), (~m), (~x)) && +# !(ext_isinteger((~m))) && +# ilt((~n) - 1/2, 0) && +# ext_isinteger((~m) + (~n)) ? +# (~a)^((~m) - 1⨸2)*(~b)^((~n) + 1⨸2)*sqrt((~a)*(~v))⨸sqrt((~b)*(~v))*∫((~u)*(~v)^((~m) + (~n)), (~x)) : nothing) +# +# # (* Int[u_.*(a_.*v_)^m_*(b_.*v_)^n_,x_Symbol] := b^(n+1/2)*Sqrt[a*v]/(a^(n+1/2)*Sqrt[b*v])*Int[u*(a*v)^(m+n),x] /; FreeQ[{a,b,m},x] && Not[IntegerQ[m]] && ILtQ[n-1/2,0] && Not[IntegerQ[m+n]] *) +# ("0_1_17", +# @rule ∫((~!u)*((~!a)*(~v))^(~m)*((~!b)*(~v))^(~n),(~x)) => +# !contains_var((~a), (~b), (~m), (~n), (~x)) && +# !(ext_isinteger((~m))) && +# !(ext_isinteger((~n))) && +# ext_isinteger((~m) + (~n)) ? +# (~a)^((~m) + (~n))*((~b)*(~v))^(~n)⨸((~a)*(~v))^(~n)*∫((~u)*(~v)^((~m) + (~n)), (~x)) : nothing) +# +# ("0_1_18", +# @rule ∫((~!u)*((~!a)*(~v))^(~m)*((~!b)*(~v))^(~n),(~x)) => +# !contains_var((~a), (~b), (~m), (~n), (~x)) && +# !(ext_isinteger((~m))) && +# !(ext_isinteger((~n))) && +# !(ext_isinteger((~m) + (~n))) ? +# (~b)^intpart((~n))*((~b)*(~v))^fracpart((~n))⨸((~a)^intpart((~n))*((~a)*(~v))^fracpart((~n)))* ∫((~u)*((~a)*(~v))^((~m) + (~n)), (~x)) : nothing) +# +# ("0_1_19", +# @rule ∫((~!u)*((~a) + (~!b)*(~v))^(~!m)*((~c) + (~!d)*(~v))^(~!n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~n), (~x)) && +# eq((~b)*(~c) - (~a)*(~d), 0) && +# ext_isinteger((~m)) && +# ( +# !(ext_isinteger((~n))) || +# simpler((~c) + (~d)*(~x), (~a) + (~b)*(~x)) +# ) ? +# ((~b)⨸(~d))^(~m)*∫((~u)*((~c) + (~d)*(~v))^((~m) + (~n)), (~x)) : nothing) +# +# ("0_1_20", +# @rule ∫((~!u)*((~a) + (~!b)*(~v))^(~m)*((~c) + (~!d)*(~v))^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && +# eq((~b)*(~c) - (~a)*(~d), 0) && +# gt((~b)/(~d), 0) && +# !( +# ext_isinteger((~m)) || +# ext_isinteger((~n)) +# ) ? +# ((~b)⨸(~d))^(~m)*∫((~u)*((~c) + (~d)*(~v))^((~m) + (~n)), (~x)) : nothing) +# +# ("0_1_21", +# @rule ∫((~!u)*((~a) + (~!b)*(~v))^(~m)*((~c) + (~!d)*(~v))^(~n),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && +# eq((~b)*(~c) - (~a)*(~d), 0) && +# !( +# ext_isinteger((~m)) || +# ext_isinteger((~n)) || +# gt((~b)/(~d), 0) +# ) ? +# ((~a) + (~b)*(~v))^(~m)⨸((~c) + (~d)*(~v))^(~m)*∫((~u)*((~c) + (~d)*(~v))^((~m) + (~n)), (~x)) : nothing) +# +# # (* Int[u_.*(a_.*v_)^m_*(b_.*v_+c_.*v_^2),x_Symbol] := 1/a*Int[u*(a*v)^(m+1)*(b+c*v),x] /; FreeQ[{a,b,c},x] && LeQ[m,-1] *) +# ("0_1_22", +# @rule ∫((~!u)*((~a) + (~!b)*(~v))^(~m)*((~!A) + (~!B)*(~v) + (~!C)*(~v)^2),(~x)) => +# !contains_var((~a), (~b), (~A), (~B), (~C), (~x)) && +# eq((~A)*(~b)^2 - (~a)*(~b)*(~B) + (~a)^2*(~C), 0) && +# le((~m), -1) ? +# 1⨸(~b)^2*∫((~u)*((~a) + (~b)*(~v))^((~m) + 1)*simplify((~b)*(~B) - (~a)*(~C) + (~b)*(~C)*(~v), (~x)), (~x)) : nothing) +# +# ("0_1_23", +# @rule ∫((~!u)*((~a) + (~!b)*(~x)^(~!n))^(~!m)*((~c) + (~!d)*(~x)^(~!q))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~x)) && +# eq((~q), -(~n)) && +# ext_isinteger((~p)) && +# eq((~a)*(~c) - (~b)*(~d), 0) && +# !( +# ext_isinteger((~m)) && +# neg((~n)) +# ) ? +# ((~d)⨸(~a))^(~p)*∫((~u)*((~a) + (~b)*(~x)^(~n))^((~m) + (~p))⨸(~x)^((~n)*(~p)), (~x)) : nothing) +# +# ("0_1_24", +# @rule ∫((~!u)*((~a) + (~!b)*(~x)^(~!n))^(~!m)*((~c) + (~!d)*(~x)^(~j))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~d), (~m), (~n), (~p), (~x)) && +# eq((~j), 2*(~n)) && +# eq((~p), -(~m)) && +# eq((~b)^2*(~c) + (~a)^2*(~d), 0) && +# gt((~a), 0) && +# lt((~d), 0) ? +# (-(~b)^2⨸(~d))^(~m)*∫((~u)*((~a) - (~b)*(~x)^(~n))^(-(~m)), (~x)) : nothing) +# +# ("0_1_25", +# @rule ∫((~!u)*((~a) + (~!b)*(~x) + (~!c)*(~x)^2)^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~x)) && +# eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~p)) ? +# ∫((~u)*simplify(((~b)⨸2 + (~c)*(~x))^(2*(~p))⨸(~c)^(~p)), (~x)) : nothing) +# +# ("0_1_26", +# @rule ∫((~!u)*((~a) + (~!b)*(~x)^(~n) + (~!c)*(~x)^(~!n2))^(~!p),(~x)) => +# !contains_var((~a), (~b), (~c), (~n), (~x)) && +# eq(~n2, 2*(~n)) && +# eq((~b)^2 - 4*(~a)*(~c), 0) && +# ext_isinteger((~p)) ? +# 1⨸(~c)^(~p)*∫((~u)*((~b)⨸2 + (~c)*(~x)^(~n))^(2*(~p)), (~x)) : nothing) +# +] \ No newline at end of file diff --git a/src/methods/rule_based/rules_loader.jl b/src/methods/rule_based/rules_loader.jl index c770063..05444f1 100644 --- a/src/methods/rule_based/rules_loader.jl +++ b/src/methods/rule_based/rules_loader.jl @@ -31,7 +31,7 @@ function load_rules(rules_paths) println("Loaded $(length(RULES)) rules from $(length(rules_paths)) files.") end -load_rules() = load_rules([joinpath(@__DIR__, "rules/" * f) for f in all_rules_paths]) +load_rules() = load_rules([joinpath(@__DIR__, "rules2/" * f) for f in all_rules_paths]) # greater or equal function to sort identifiers function identifier_ge(id1, id2) diff --git a/src/methods/rule_based/rules_utility_functions.jl b/src/methods/rule_based/rules_utility_functions.jl index 75f9293..ee05333 100644 --- a/src/methods/rule_based/rules_utility_functions.jl +++ b/src/methods/rule_based/rules_utility_functions.jl @@ -56,10 +56,11 @@ function complexfree(expr) end # to distinguish between symbolic expressions and numbers -s(u) = isa(Symbolics.unwrap(u), Symbolics.Symbolic) +s(u) = isa(Symbolics.unwrap(u), SymbolicUtils.BasicSymbolic) function eq(a, b) - !s(a) && !s(b) && return isequal(a, b) + a = SymbolicUtils.unwrap_const(a) + b = SymbolicUtils.unwrap_const(b) return SymbolicUtils.simplify(a - b) |> SymbolicUtils._iszero end @@ -236,9 +237,17 @@ function intpart(a) end # Greater than -gt(u, v) = (s(u) || s(v)) ? false : u > v +function gt(u, v) + u = SymbolicUtils.unwrap_const(u) + v = SymbolicUtils.unwrap_const(v) + (s(u) || s(v)) ? false : u > v +end gt(u, v, w) = gt(u, v) && gt(v, w) -ge(u, v) = (s(u) || s(v)) ? false : u >= v +function ge(u, v) + u = SymbolicUtils.unwrap_const(u) + v = SymbolicUtils.unwrap_const(v) + (s(u) || s(v)) ? false : u >= v +end ge(u, v, w) = ge(u, v) && ge(v, w) lt(u, v) = (s(u) || s(v)) ? false : u < v lt(u, v, w) = lt(u, v) && lt(v, w) @@ -274,9 +283,9 @@ end neg(u) = !pos(u) && !eq(u, 0) # extended denominator -ext_den(u::Union{Num, SymbolicUtils.Symbolic, Rational, Integer}) = denominator(u) +ext_den(u::Union{Num, SymbolicUtils.BasicSymbolic, Rational, Integer}) = denominator(u) ext_den(u) = 1 -ext_num(u::Union{Num, SymbolicUtils.Symbolic, Rational, Integer}) = numerator(u) +ext_num(u::Union{Num, SymbolicUtils.BasicSymbolic, Rational, Integer}) = numerator(u) ext_num(u) = u # IntLinearQ[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. @@ -764,7 +773,7 @@ end function perfect_square(expr) expr = Symbolics.unwrap(expr) - !isa(expr, Symbolics.Symbolic) && return sqrt(expr) == floor(sqrt(expr)) + !s(expr) && return sqrt(expr) == floor(sqrt(expr)) !iscall(expr) && return false (operation(expr) === ^) && iseven(arguments(expr)[2]) && return true return false diff --git a/src/methods/rule_based/string_manipulation_helpers.jl b/src/methods/rule_based/string_manipulation_helpers.jl index 8da7d14..d51d9dd 100644 --- a/src/methods/rule_based/string_manipulation_helpers.jl +++ b/src/methods/rule_based/string_manipulation_helpers.jl @@ -369,7 +369,7 @@ function pretty_print_rule(rule, identifier) identifier == "0_1_0" && return "∫( +(a...), x) => sum([ ∫(f, x) for f in a ])" identifier == "0_1_12" && return "∫ a*f(x) dx => a*∫ f(x) dx" - s = string(rule) + s = string(rule.first) *" => "* string(rule.second) # manage conditions if_pos = findfirst("if", s) newline_pos = findfirst("\n", s) diff --git a/test/test_rule2.jl b/test/test_rule2.jl new file mode 100644 index 0000000..d8adfff --- /dev/null +++ b/test/test_rule2.jl @@ -0,0 +1,14 @@ +using Test + +@syms a + +@testset begin + r1 = :(sin(2*~x)) => :(2sin(~x)*cos(~x)) + + @test SymbolicIntegration.rule2(r1, sin(2a)) !== nothing + + r_defslot = :((~x)^(~!m)) => :(((~x)^(~m+1)/(~m+1))) + + @test SymbolicIntegration.rule2(r_defslot, a^2) !== nothing + @test SymbolicIntegration.rule2(r_defslot, a) !== nothing +end \ No newline at end of file