text:
export TimeSeries
export hourly_to_monthly
export monthly_to_hourly

"""
    TimeSeries
"""
mutable struct TimeSeries{T <: Real}
    name::String
    timestamps::Vector{DateTime}
    vals::Vector{T}

    function TimeSeries(name::String,
                        timestamps::Vector{DateTime},
                        vals::Vector{T}) where T <: Real

        if length(timestamps) != length(vals)
            throw(DimensionMismatch("timestamps and values do not have the same length."))
        end

        if !allunique(timestamps)
            throw(ErrorException("timestamps must be unique."))
        end

        if !issorted(timestamps)
            throw(ErrorException("timestamps must be sorted."))
        end

        return new{T}(name, timestamps, vals)
    end
end

# Additional constructors
function TimeSeries(name::String,
                    timestamps::Vector{Date},
                    values::Vector{T}) where T
    return TimeSeries(name,
                      DateTime.(timestamps),
                      values)
end

name(ts::TimeSeries) = ts.name
timestamps(ts::TimeSeries) = ts.timestamps
values(ts::TimeSeries) = ts.vals

# auxiliar functions
function verify_if_ts_are_equal(ts1::TimeSeries{T}, ts2::TimeSeries{T}) where T
    return ts1.name == ts2.name && ts1.timestamps == ts2.timestamps && ts1.vals == ts2.vals
end
function create_ts_name_from_ts_vector(time_series_vector, string)
    num_of_time_series = length(time_series_vector)
    new_name = ""
    for n = 1:num_of_time_series
        if n != 1
            new_name = new_name * " " * string * " " * time_series_vector[n].name
        else
            new_name = new_name * time_series_vector[n].name
        end
    end
    return new_name
end

function union_timestamps(time_series_vector)
    num_of_time_series = length(time_series_vector)
    new_timestamps = DateTime[]
    for n = 1:num_of_time_series
        new_timestamps = vcat(new_timestamps, time_series_vector[n].timestamps)
    end
    return sort(unique(new_timestamps))
end

# + functions
function sum_vals_from_ts_vector(time_series_vector::Vector{TimeSeries{T}},
                                 new_timestamps) where T
    num_of_time_series = length(time_series_vector)
    new_vals = T[]
    for tstamp in new_timestamps
        tstamp_val = T[]
        for tserie in time_series_vector
            index = findall(x -> x == tstamp, tserie.timestamps)
            if !isempty(index)
                push!(tstamp_val, tserie.vals[index[1]])
            end
        end
        push!(new_vals, sum(tstamp_val))
    end
    return new_vals
end

function sum_ts(time_series_vector)
    new_names      = create_ts_name_from_ts_vector(time_series_vector, "+")
    new_timestamps = union_timestamps(time_series_vector)
    new_vals       = sum_vals_from_ts_vector(time_series_vector, new_timestamps)
    return TimeSeries(new_names, new_timestamps, new_vals)
end

function (+)(ts1::TimeSeries, ts2::TimeSeries...)
    n_args = length(ts2)
    time_series_vector = [ts1]
    for n = 1:n_args
        push!(time_series_vector, ts2[n])
    end
    return sum_ts(time_series_vector)
end

# - functions
function subtract_vals_from_ts_vector(time_series_vector::Vector{TimeSeries{T}}, new_timestamps) where T
    num_of_time_series = length(time_series_vector)
    new_vals = T[]
    for tstamp in new_timestamps
        tstamp_val = T[]
        for num_ts = 1:num_of_time_series
            tserie = time_series_vector[num_ts]
            if num_ts == 1
                index = findall(x -> x == tstamp, tserie.timestamps)
                if !isempty(index)
                    push!(tstamp_val, tserie.vals[index[1]])
                end
            else
                index = findall(x -> x == tstamp, tserie.timestamps)
                if !isempty(index)
                    push!(tstamp_val, - tserie.vals[index[1]])
                end
            end
        end
        push!(new_vals, sum(tstamp_val))
    end
    return new_vals
end

function subtract_ts(time_series_vector)
    if length(time_series_vector) == 1
        new_names      = "- " * time_series_vector[1].name
        new_timestamps = time_series_vector[1].timestamps
        new_vals       = - time_series_vector[1].vals
    else
        new_names      = create_ts_name_from_ts_vector(time_series_vector, "-")
        new_timestamps = union_timestamps(time_series_vector)
        new_vals       = subtract_vals_from_ts_vector(time_series_vector, new_timestamps)
    end

    return TimeSeries(new_names, new_timestamps, new_vals)
end

function (-)(ts1::TimeSeries, ts2::TimeSeries...)
    n_args = length(ts2)
    time_series_vector = [ts1]
    for n = 1:n_args
        push!(time_series_vector, ts2[n])
    end
    return subtract_ts(time_series_vector)
end

# * functions
function multiply_vals_from_ts_vector(time_series_vector::Vector{TimeSeries{T}}, new_timestamps) where T
    num_of_time_series = length(time_series_vector)
    new_vals = T[]
    for tstamp in new_timestamps
        tstamp_val = T[]
        for tserie in time_series_vector
            index = findall(x -> x == tstamp, tserie.timestamps)
            if !isempty(index)
                push!(tstamp_val, tserie.vals[index[1]])
            end
        end
        push!(new_vals, prod(tstamp_val))
    end
    return new_vals
end

function product_ts(time_series_vector)
    new_names      = create_ts_name_from_ts_vector(time_series_vector, "*")
    new_timestamps = union_timestamps(time_series_vector)
    new_vals       = multiply_vals_from_ts_vector(time_series_vector, new_timestamps)
    return TimeSeries(new_names, new_timestamps, new_vals)
end

function (*)(ts1::TimeSeries, ts2::TimeSeries...)
    n_args = length(ts2)
    time_series_vector = [ts1]
    for n = 1:n_args
        push!(time_series_vector, ts2[n])
    end
    return product_ts(time_series_vector)
end

function observations_close_to_zero(ts::TimeSeries; zero_threshold=1e-8)
    for v in ts.vals
        if (v <= zero_threshold) && (v >= -zero_threshold)
            return true
        end
    end
    return false
end

"""
Function to convert an hourly timeseries to a monthly timeseries, using an aggregate function.
"""
function hourly_to_monthly(time_series::TimeSeries; agg_func::Function=mean)
    name = time_series.name
    timestamps = map(x -> DateTime(x...), unique(yearmonth.(time_series.timestamps)))
    vals = Vector{Float64}(undef, length(timestamps))
    for i = 1:length(timestamps)
        vals[i] = agg_func(time_series.vals[(time_series.timestamps .>= timestamps[i]) .& (time_series.timestamps .< (timestamps[i] + Month(1)))])
    end
    return TimeSeries(name, timestamps, vals)
end

"""
Function to convert a monthly timeseries to an hourly timeseries.
"""
function monthly_to_hourly(time_series::TimeSeries)
    name = time_series.name
    timestamps = Vector{DateTime}(undef, 0)
    for m in yearmonth.(time_series.timestamps)
        append!(timestamps, collect(firstdayofmonth(DateTime(m...)):Hour(1):(lastdayofmonth(DateTime(m...)) + Hour(23))))
    end
    vals = Vector{Float64}(undef, length(timestamps))
    for i = 1:length(time_series.timestamps)
        vals[(timestamps .>= time_series.timestamps[i]) .& (timestamps .< (time_series.timestamps[i] + Month(1)))] .= time_series.vals[i]
    end
    return TimeSeries(name, timestamps, vals)
end


text:
@testset "util" begin

A = Int[7 0 -1 0 -4 0 3; -9 4 2 -5 3 1 0; 0 0 2 0 1 -7 -2; 0 0 0 0 0 0 0; 2 2 2 2 2 2 2]

@testset "normalizemean" begin
    ans = Float64[6.285714285714286 -0.7142857142857142 -1.7142857142857142 -0.7142857142857142 -4.714285714285714 -0.7142857142857142 2.2857142857142856; -8.428571428571429 4.571428571428571 2.571428571428571 -4.428571428571429 3.571428571428571 1.5714285714285714 0.5714285714285714; 0.8571428571428571 0.8571428571428571 2.857142857142857 0.8571428571428571 1.8571428571428572 -6.142857142857143 -1.1428571428571428; 0 0 0 0 0 0 0; 0 0 0 0 0 0 0]

    B = normalizemean(A)
    @test mean(B,dims=2) ≈ zeros(5,1) atol=1e-9
    @test B ≈ ans

    C = Float64.(A)
    normalizemean!(C)
    @test mean(C,dims=2) ≈ zeros(5,1) atol=1e-9
    @test C ≈ ans
end

@testset "normalizemeanstd" begin
    ans = Float64[1.8217730766638152 -0.20701966780270625 -0.496847202726495 -0.20701966780270625 -1.3663298074978614 -0.20701966780270625 0.6624629369686601; -1.785421221372967 0.9683640522700837 0.5447047794019221 -0.9381026756366437 0.7565344158360029 0.33287514296784126 0.12104550653376046; 0.28878657066713365 0.28878657066713365 0.962621902223779 0.28878657066713365 0.6257042364454564 -2.069637089781125 -0.38504876088951157; 0 0 0 0 0 0 0; 0 0 0 0 0 0 0]

    B = normalizemeanstd(A)
    @test mean(B,dims=2) ≈ zeros(5,1) atol=1e-9
    @test std(B,dims=2).-[1,1,1,0,0] ≈ zeros(5,1) atol=1e-9
    @test B ≈ ans

    C = Float64.(A)
    normalizemeanstd!(C)
    @test mean(C,dims=2) ≈ zeros(5,1) atol=1e-9
    @test std(C,dims=2).-[1,1,1,0,0] ≈ zeros(5,1) atol=1e-9
    @test C ≈ ans
end

end

ext: jl


text:
worldcomm(comm = nothing) = something(comm, globalcomm())

selfcomm() = MPI.COMM_SELF

worldsize(comm = nothing) = MPI.Initialized() ? MPI.Comm_size(worldcomm(comm)) : nworkers()

myrank(comm = nothing) = MPI.Initialized() ? MPI.Comm_rank(worldcomm(comm)) : myid() - 1

bcast(x, root = 0, comm = nothing) =  MPI.Initialized() ? MPI.bcast(x, root, worldcomm(comm)) : x

allunique(x, comm = nothing) = sort(unique(allgather(unique(x), comm)))

allequal(x, comm = nothing) = length(unique(allgather(x, comm))) == 1

function allmean(x, comm = nothing)
    if MPI.Initialized()
        x = MPI.Allreduce(x, MPI.SUM, worldcomm(comm))
        x = x / worldsize(comm)
    end
    return x
end

allmean(x::DateTime, comm = nothing) = unix2datetime(allmean(datetime2unix(x), comm))

function allsum(x, comm = nothing)
    if MPI.Initialized()
        x = MPI.Allreduce(x, MPI.SUM, worldcomm(comm))
    end
    return x
end

function allmin(x, comm = nothing)
    if MPI.Initialized()
        x = MPI.Allreduce(x, MPI.SUM, worldcomm(comm))
    end
    return x
end

function allmax(x, comm = nothing)
    if MPI.Initialized()
        x = MPI.Allreduce(x, MPI.MAX, worldcomm(comm))
    end
    return x
end

barrier(comm = nothing) = MPI.Initialized() ? MPI.Barrier(worldcomm(comm)) : nothing

function part(x, comm = nothing; dims = -1)
    !MPI.Initialized() && return x
    rank = myrank(comm)
    wsize = worldsize(comm)
    part(x, rank, wsize, dims)
end

function allgather(x::Union{Number, AbstractArray{<:Number}}, comm = nothing; dims = 1)
    if MPI.Initialized()
        x = isa(x, Number) ? [x] : x
        counts = MPI.Allgather(Cint(length(x)), worldcomm(comm))
        recvbuf = MPI.Allgatherv(vec(x), counts, worldcomm(comm))
        ranges = zip(cumsum([1; counts[1:end - 1]]), cumsum(counts))
        shape = ntuple(i -> i == dims || dims < 1 ? (:) : size(x, i), ndims(x))
        xs = [reshape(view(recvbuf, i:j), shape) for (i, j) in ranges]
        @assert sum(length, xs) == sum(counts)
        return dims > 0 ? cat(xs..., dims = dims) : xs
    else
        return dims > 0 ? x : [x]
    end
end

allgather(x, comm = nothing; dims = 1) = cat(MPI.deserialize.(allgather(MPI.serialize(x), comm; dims = 0))..., dims = dims)

function gather(x::Union{Number, AbstractArray{<:Number}}, root, comm = nothing; dims = 1)
    if MPI.Initialized()
        x = isa(x, Number) ? [x] : x
        counts = MPI.Allgather(Cint(length(x)), worldcomm(comm))
        recvbuf = MPI.Gatherv(vec(x), counts, root, worldcomm(comm))
        if myrank(comm) == root
            ranges = zip(cumsum([1; counts[1:end - 1]]), cumsum(counts))
            shape = ntuple(i -> i == dims || dims < 1 ? (:) : size(x, i), ndims(x))
            xs = [reshape(view(recvbuf, i:j), shape) for (i, j) in ranges]
            @assert sum(length, xs) == sum(counts)
            return dims > 0 ? cat(xs..., dims = dims) : xs
        else
            return nothing
        end
    else
        return dims > 0 ? x : [x]
    end
end

function gather(x, root, comm = nothing; dims = 1)
    xs = gather(MPI.serialize(x), root, comm; dims = 0)
    isnothing(x) && return
    cat(MPI.deserialize.(xs)..., dims = dims)
end

function localsize()
    host = gethostname()
    sendbuf = Vector{UInt8}(host * "\n")
    recvbuf = allgather(sendbuf)
    hosts = split(String(recvbuf))
    count(hosts .== gethostname())
end

function pmap(f, xs)
    if @isdefined(MPI) && MPI.Initialized()
        comm, n = worldcomm(), length(xs)
        wsize, rank = worldsize(), myrank()
        if n >= wsize
            allgather(map(f, part(xs)))
        else
            q, r = divrem(wsize, n)
            splits = cumsum([i <= r ? q + 1 : q for i in 1:n])
            splits = [0; splits[1:end-1]]
            color = searchsortedlast(splits, rank) - 1
            if localcomm() === MPI.COMM_SELF
                loc_comm = MPI.Comm_split(comm, color, rank)
                setlocalcomm!(loc_comm)
            end
            ys = allgather(f(xs[color + 1]))
            ys[splits .+ 1]
        end
    else
        Distributed.pmap(f, xs)
    end
end

const _localcomm = Ref{MPI.Comm}(MPI.COMM_SELF)
const _globalcomm = Ref{MPI.Comm}(MPI.COMM_WORLD)

setlocalcomm!(comm) = _localcomm[] = comm
setglobalcomm!(comm) = _globalcomm[] = comm

localcomm() = _localcomm[]
globalcomm() = _globalcomm[]


text:
# Autogenerated wrapper script for wget2_jll for x86_64-w64-mingw32
export libwget, wget2

using GnuTLS_jll
using Gettext_jll
using Nettle_jll
using OpenSSL_jll
JLLWrappers.@generate_wrapper_header("wget2")
JLLWrappers.@declare_library_product(libwget, "libwget-1.dll")
JLLWrappers.@declare_executable_product(wget2)
function __init__()
    JLLWrappers.@generate_init_header(GnuTLS_jll, Gettext_jll, Nettle_jll, OpenSSL_jll)
    JLLWrappers.@init_library_product(
        libwget,
        "bin\\libwget-1.dll",
        RTLD_LAZY | RTLD_DEEPBIND,
    )

    JLLWrappers.@init_executable_product(
        wget2,
        "bin\\wget2.exe",
    )

    JLLWrappers.@generate_init_footer()
end  # __init__()


text:
using Distributions
using Base.Test

m = MixtureModel([Poisson(2.0), Binomial(10, 0.3)],
                 [0.4, 0.6])
x = rand(m, (100,))
@test_approx_eq exp(logpdf(m,x)) pdf(m,x)
@test Distributions.variate_form(typeof(m))=== Univariate
@test Distributions.value_support(typeof(m))=== Discrete


text:
#factorial

function factorial2(n)
  if n == 0
    return 1
  else
    return n * factorial2(n-1)
  end
end

function factorial3(n)
  m = 1
  for i in range(1, n)
    m *= i
  end
  return m
end

factorial4:: Int16 -> BigInt
function factorial4(n)
  if n == 0
    return BigInt(1)
  else
    return n * factorial4(n-1)
  end
end

println(factorial2(23))
println(factorial3(30))
println(factorial4(30))


text:
using CPLEX

JuDGE_MP_Solver = optimizer_with_attributes(CPLEX.Optimizer, "CPXPARAM_SolutionType" => 2,
                                                             "CPXPARAM_MIP_Tolerances_AbsMIPGap" => 0.0,
                                                             "CPXPARAM_MIP_Tolerances_Integrality" => 10^-6,
															 "CPX_PARAM_SCRIND" => 0,
                                                             "CPXPARAM_MIP_Display" => 0,
                                                             "CPXPARAM_ParamDisplay" => 0)

JuDGE_SP_Solver = optimizer_with_attributes(CPLEX.Optimizer, "CPXPARAM_MIP_Tolerances_MIPGap" => 0.0,
                                                             "CPXPARAM_MIP_Tolerances_Integrality" => 10^-6,
															 "CPX_PARAM_SCRIND" => 0,
                                                             "CPXPARAM_ParamDisplay" => 0)

JuDGE_DE_Solver = optimizer_with_attributes(CPLEX.Optimizer, "CPXPARAM_MIP_Tolerances_MIPGap" => 0.0,
                                                          	 "CPXPARAM_MIP_Tolerances_Integrality" => 10^-6,
															 "CPX_PARAM_SCRIND" => 1)


text:
using transD_GP, PyPlot
## model fixed parts, i.e., air, but only to be compatible with AEM ...
zfixed   = [-1e5]
ρfixed   = [1e12]
nmax = 200
# z grid spec starts, the first z and first ρ will be unused in MT
zstart = 0.
extendfrac, dz = 1.028, 10
zall, znall, zboundaries = transD_GP.setupz(zstart, extendfrac, dz=dz, n=50, showplot=true)
z, ρ, nfixed = transD_GP.makezρ(zboundaries; zfixed=zfixed, ρfixed=ρfixed)
## fill in detail in ohm-m
ρwater = 0.22
ρ[(z.>=zstart) .& (z.<35)] .= ρwater
ρ[(z.>=35) .& (z.<100)] .= 4.
ρ[(z.>=100) .& (z.<250)] .= 14
ρ[(z.>=250) .&(z.<600)] .= 0.8
ρ[z.>=600] .= 100
##
# ATTENTION: to get the first non water layer if wanting to use with CSEM
irxlayer = findlast(isequal.(ρ[2:end], ρwater))+1
T = 10 .^range(-2, 0, length=10)
F = transD_GP.MT1DInversion.create_synthetic(ρ[2:end], zboundaries, 1 ./T, irxlayer=irxlayer,
        rseed=125, showplot=true, noisefrac=0.05, logscaledepth=false)
transD_GP.get_misfit(F.d_log10_ρ, F.d_phase_deg, F.σ_log10_ρ, F.σ_phase_deg, 1 ./T, ρ[2:end], zboundaries, irxlayer)


text:
@testset "6.2.2 (e x)^m (a+b x^n)^p cosh" begin
    (a, b, c, d, x, ) = @variables a b c d x

    #= ::Package:: =#

    #= ::Title:: =#
    #=Integrands*of*the*form*(e*x)^m*(a+b*x^n)^p*cosh(c+d*x)=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(e*x)^m*(a+b*x^1)^p*cosh(c+d*x)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [x^3*(a + b*x)*cosh(c + d*x), x, 11, (-6*a*cosh(c + d*x))/d^4 - (24*b*x*cosh(c + d*x))/d^4 - (3*a*x^2*cosh(c + d*x))/d^2 - (4*b*x^3*cosh(c + d*x))/d^2 + (24*b*sinh(c + d*x))/d^5 + (6*a*x*sinh(c + d*x))/d^3 + (12*b*x^2*sinh(c + d*x))/d^3 + (a*x^3*sinh(c + d*x))/d + (b*x^4*sinh(c + d*x))/d]
    @test_int [x^2*(a + b*x)*cosh(c + d*x), x, 9, (-6*b*cosh(c + d*x))/d^4 - (2*a*x*cosh(c + d*x))/d^2 - (3*b*x^2*cosh(c + d*x))/d^2 + (2*a*sinh(c + d*x))/d^3 + (6*b*x*sinh(c + d*x))/d^3 + (a*x^2*sinh(c + d*x))/d + (b*x^3*sinh(c + d*x))/d]
    @test_int [x*(a + b*x)*cosh(c + d*x), x, 7, -((a*cosh(c + d*x))/d^2) - (2*b*x*cosh(c + d*x))/d^2 + (2*b*sinh(c + d*x))/d^3 + (a*x*sinh(c + d*x))/d + (b*x^2*sinh(c + d*x))/d]
    @test_int [(a + b*x)*cosh(c + d*x), x, 2, -((b*cosh(c + d*x))/d^2) + ((a + b*x)*sinh(c + d*x))/d]
    @test_int [((a + b*x)*cosh(c + d*x))/x, x, 6, a*cosh(c)*CoshIntegral(d*x) + (b*sinh(c + d*x))/d + a*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x)*cosh(c + d*x))/x^2, x, 9, -((a*cosh(c + d*x))/x) + b*cosh(c)*CoshIntegral(d*x) + a*d*CoshIntegral(d*x)*sinh(c) + a*d*cosh(c)*SinhIntegral(d*x) + b*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x)*cosh(c + d*x))/x^3, x, 11, -(a*cosh(c + d*x))/(2*x^2) - (b*cosh(c + d*x))/x + (a*d^2*cosh(c)*CoshIntegral(d*x))/2 + b*d*CoshIntegral(d*x)*sinh(c) - (a*d*sinh(c + d*x))/(2*x) + b*d*cosh(c)*SinhIntegral(d*x) + (a*d^2*sinh(c)*SinhIntegral(d*x))/2]
    @test_int [((a + b*x)*cosh(c + d*x))/x^4, x, 13, -(a*cosh(c + d*x))/(3*x^3) - (b*cosh(c + d*x))/(2*x^2) - (a*d^2*cosh(c + d*x))/(6*x) + (b*d^2*cosh(c)*CoshIntegral(d*x))/2 + (a*d^3*CoshIntegral(d*x)*sinh(c))/6 - (a*d*sinh(c + d*x))/(6*x^2) - (b*d*sinh(c + d*x))/(2*x) + (a*d^3*cosh(c)*SinhIntegral(d*x))/6 + (b*d^2*sinh(c)*SinhIntegral(d*x))/2]
    @test_int [((a + b*x)*cosh(c + d*x))/x^5, x, 15, -(a*cosh(c + d*x))/(4*x^4) - (b*cosh(c + d*x))/(3*x^3) - (a*d^2*cosh(c + d*x))/(24*x^2) - (b*d^2*cosh(c + d*x))/(6*x) + (a*d^4*cosh(c)*CoshIntegral(d*x))/24 + (b*d^3*CoshIntegral(d*x)*sinh(c))/6 - (a*d*sinh(c + d*x))/(12*x^3) - (b*d*sinh(c + d*x))/(6*x^2) - (a*d^3*sinh(c + d*x))/(24*x) + (b*d^3*cosh(c)*SinhIntegral(d*x))/6 + (a*d^4*sinh(c)*SinhIntegral(d*x))/24]

    @test_int [x^2*(a + b*x)^2*cosh(c + d*x), x, 14, (-12*a*b*cosh(c + d*x))/d^4 - (24*b^2*x*cosh(c + d*x))/d^4 - (2*a^2*x*cosh(c + d*x))/d^2 - (6*a*b*x^2*cosh(c + d*x))/d^2 - (4*b^2*x^3*cosh(c + d*x))/d^2 + (24*b^2*sinh(c + d*x))/d^5 + (2*a^2*sinh(c + d*x))/d^3 + (12*a*b*x*sinh(c + d*x))/d^3 + (12*b^2*x^2*sinh(c + d*x))/d^3 + (a^2*x^2*sinh(c + d*x))/d + (2*a*b*x^3*sinh(c + d*x))/d + (b^2*x^4*sinh(c + d*x))/d]
    @test_int [x*(a + b*x)^2*cosh(c + d*x), x, 11, (-6*b^2*cosh(c + d*x))/d^4 - (a^2*cosh(c + d*x))/d^2 - (4*a*b*x*cosh(c + d*x))/d^2 - (3*b^2*x^2*cosh(c + d*x))/d^2 + (4*a*b*sinh(c + d*x))/d^3 + (6*b^2*x*sinh(c + d*x))/d^3 + (a^2*x*sinh(c + d*x))/d + (2*a*b*x^2*sinh(c + d*x))/d + (b^2*x^3*sinh(c + d*x))/d]
    @test_int [(a + b*x)^2*cosh(c + d*x), x, 3, (-2*b*(a + b*x)*cosh(c + d*x))/d^2 + (2*b^2*sinh(c + d*x))/d^3 + ((a + b*x)^2*sinh(c + d*x))/d]
    @test_int [((a + b*x)^2*cosh(c + d*x))/x, x, 8, -((b^2*cosh(c + d*x))/d^2) + a^2*cosh(c)*CoshIntegral(d*x) + (2*a*b*sinh(c + d*x))/d + (b^2*x*sinh(c + d*x))/d + a^2*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x)^2*cosh(c + d*x))/x^2, x, 10, -((a^2*cosh(c + d*x))/x) + 2*a*b*cosh(c)*CoshIntegral(d*x) + a^2*d*CoshIntegral(d*x)*sinh(c) + (b^2*sinh(c + d*x))/d + a^2*d*cosh(c)*SinhIntegral(d*x) + 2*a*b*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x)^2*cosh(c + d*x))/x^3, x, 14, -(a^2*cosh(c + d*x))/(2*x^2) - (2*a*b*cosh(c + d*x))/x + b^2*cosh(c)*CoshIntegral(d*x) + (a^2*d^2*cosh(c)*CoshIntegral(d*x))/2 + 2*a*b*d*CoshIntegral(d*x)*sinh(c) - (a^2*d*sinh(c + d*x))/(2*x) + 2*a*b*d*cosh(c)*SinhIntegral(d*x) + b^2*sinh(c)*SinhIntegral(d*x) + (a^2*d^2*sinh(c)*SinhIntegral(d*x))/2]
    @test_int [((a + b*x)^2*cosh(c + d*x))/x^4, x, 17, -(a^2*cosh(c + d*x))/(3*x^3) - (a*b*cosh(c + d*x))/x^2 - (b^2*cosh(c + d*x))/x - (a^2*d^2*cosh(c + d*x))/(6*x) + a*b*d^2*cosh(c)*CoshIntegral(d*x) + b^2*d*CoshIntegral(d*x)*sinh(c) + (a^2*d^3*CoshIntegral(d*x)*sinh(c))/6 - (a^2*d*sinh(c + d*x))/(6*x^2) - (a*b*d*sinh(c + d*x))/x + b^2*d*cosh(c)*SinhIntegral(d*x) + (a^2*d^3*cosh(c)*SinhIntegral(d*x))/6 + a*b*d^2*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x)^2*cosh(c + d*x))/x^5, x, 20, -(a^2*cosh(c + d*x))/(4*x^4) - (2*a*b*cosh(c + d*x))/(3*x^3) - (b^2*cosh(c + d*x))/(2*x^2) - (a^2*d^2*cosh(c + d*x))/(24*x^2) - (a*b*d^2*cosh(c + d*x))/(3*x) + (b^2*d^2*cosh(c)*CoshIntegral(d*x))/2 + (a^2*d^4*cosh(c)*CoshIntegral(d*x))/24 + (a*b*d^3*CoshIntegral(d*x)*sinh(c))/3 - (a^2*d*sinh(c + d*x))/(12*x^3) - (a*b*d*sinh(c + d*x))/(3*x^2) - (b^2*d*sinh(c + d*x))/(2*x) - (a^2*d^3*sinh(c + d*x))/(24*x) + (a*b*d^3*cosh(c)*SinhIntegral(d*x))/3 + (b^2*d^2*sinh(c)*SinhIntegral(d*x))/2 + (a^2*d^4*sinh(c)*SinhIntegral(d*x))/24]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(x^4*cosh(c + d*x))/(a + b*x), x, 15, (-6*cosh(c + d*x))/(b*d^4) - (a^2*cosh(c + d*x))/(b^3*d^2) + (2*a*x*cosh(c + d*x))/(b^2*d^2) - (3*x^2*cosh(c + d*x))/(b*d^2) + (a^4*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^5 - (2*a*sinh(c + d*x))/(b^2*d^3) - (a^3*sinh(c + d*x))/(b^4*d) + (6*x*sinh(c + d*x))/(b*d^3) + (a^2*x*sinh(c + d*x))/(b^3*d) - (a*x^2*sinh(c + d*x))/(b^2*d) + (x^3*sinh(c + d*x))/(b*d) + (a^4*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^5]
    @test_int [(x^3*cosh(c + d*x))/(a + b*x), x, 11, (a*cosh(c + d*x))/(b^2*d^2) - (2*x*cosh(c + d*x))/(b*d^2) - (a^3*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^4 + (2*sinh(c + d*x))/(b*d^3) + (a^2*sinh(c + d*x))/(b^3*d) - (a*x*sinh(c + d*x))/(b^2*d) + (x^2*sinh(c + d*x))/(b*d) - (a^3*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^4]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x), x, 8, -(cosh(c + d*x)/(b*d^2)) + (a^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^3 - (a*sinh(c + d*x))/(b^2*d) + (x*sinh(c + d*x))/(b*d) + (a^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^3]
    @test_int [(x*cosh(c + d*x))/(a + b*x), x, 6, -((a*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^2) + sinh(c + d*x)/(b*d) - (a*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^2]
    @test_int [cosh(c + d*x)/(a + b*x), x, 3, (cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b + (sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b]
    @test_int [cosh(c + d*x)/(x*(a + b*x)), x, 8, (cosh(c)*CoshIntegral(d*x))/a - (cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a + (sinh(c)*SinhIntegral(d*x))/a - (sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a]
    @test_int [cosh(c + d*x)/(x^2*(a + b*x)), x, 12, -(cosh(c + d*x)/(a*x)) - (b*cosh(c)*CoshIntegral(d*x))/a^2 + (b*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a^2 + (d*CoshIntegral(d*x)*sinh(c))/a + (d*cosh(c)*SinhIntegral(d*x))/a - (b*sinh(c)*SinhIntegral(d*x))/a^2 + (b*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^2]
    @test_int [cosh(c + d*x)/(x^3*(a + b*x)), x, 17, -cosh(c + d*x)/(2*a*x^2) + (b*cosh(c + d*x))/(a^2*x) + (b^2*cosh(c)*CoshIntegral(d*x))/a^3 + (d^2*cosh(c)*CoshIntegral(d*x))/(2*a) - (b^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a^3 - (b*d*CoshIntegral(d*x)*sinh(c))/a^2 - (d*sinh(c + d*x))/(2*a*x) - (b*d*cosh(c)*SinhIntegral(d*x))/a^2 + (b^2*sinh(c)*SinhIntegral(d*x))/a^3 + (d^2*sinh(c)*SinhIntegral(d*x))/(2*a) - (b^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^3]

    @test_int [(x^4*cosh(c + d*x))/(a + b*x)^2, x, 15, (2*a*cosh(c + d*x))/(b^3*d^2) - (2*x*cosh(c + d*x))/(b^2*d^2) - (a^4*cosh(c + d*x))/(b^5*(a + b*x)) - (4*a^3*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^5 + (a^4*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^6 + (2*sinh(c + d*x))/(b^2*d^3) + (3*a^2*sinh(c + d*x))/(b^4*d) - (2*a*x*sinh(c + d*x))/(b^3*d) + (x^2*sinh(c + d*x))/(b^2*d) + (a^4*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^6 - (4*a^3*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^5]
    @test_int [(x^3*cosh(c + d*x))/(a + b*x)^2, x, 12, -(cosh(c + d*x)/(b^2*d^2)) + (a^3*cosh(c + d*x))/(b^4*(a + b*x)) + (3*a^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^4 - (a^3*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^5 - (2*a*sinh(c + d*x))/(b^3*d) + (x*sinh(c + d*x))/(b^2*d) - (a^3*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^5 + (3*a^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^4]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x)^2, x, 10, -((a^2*cosh(c + d*x))/(b^3*(a + b*x))) - (2*a*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^3 + (a^2*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^4 + sinh(c + d*x)/(b^2*d) + (a^2*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^4 - (2*a*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^3]
    @test_int [(x*cosh(c + d*x))/(a + b*x)^2, x, 9, (a*cosh(c + d*x))/(b^2*(a + b*x)) + (cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^2 - (a*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^3 - (a*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^3 + (sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^2]
    @test_int [cosh(c + d*x)/(a + b*x)^2, x, 4, -(cosh(c + d*x)/(b*(a + b*x))) + (d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^2 + (d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^2]
    @test_int [cosh(c + d*x)/(x*(a + b*x)^2), x, 12, cosh(c + d*x)/(a*(a + b*x)) + (cosh(c)*CoshIntegral(d*x))/a^2 - (cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a^2 - (d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/(a*b) + (sinh(c)*SinhIntegral(d*x))/a^2 - (d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(a*b) - (sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^2]
    @test_int [cosh(c + d*x)/(x^2*(a + b*x)^2), x, 16, -(cosh(c + d*x)/(a^2*x)) - (b*cosh(c + d*x))/(a^2*(a + b*x)) - (2*b*cosh(c)*CoshIntegral(d*x))/a^3 + (2*b*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a^3 + (d*CoshIntegral(d*x)*sinh(c))/a^2 + (d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/a^2 + (d*cosh(c)*SinhIntegral(d*x))/a^2 - (2*b*sinh(c)*SinhIntegral(d*x))/a^3 + (d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^2 + (2*b*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^3]

    @test_int [(x^3*cosh(c + d*x))/(a + b*x)^3, x, 15, (a^3*cosh(c + d*x))/(2*b^4*(a + b*x)^2) - (3*a^2*cosh(c + d*x))/(b^4*(a + b*x)) - (3*a*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^4 - (a^3*d^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/(2*b^6) + (3*a^2*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^5 + sinh(c + d*x)/(b^3*d) + (a^3*d*sinh(c + d*x))/(2*b^5*(a + b*x)) + (3*a^2*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^5 - (3*a*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^4 - (a^3*d^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(2*b^6)]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x)^3, x, 14, -(a^2*cosh(c + d*x))/(2*b^3*(a + b*x)^2) + (2*a*cosh(c + d*x))/(b^3*(a + b*x)) + (cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/b^3 + (a^2*d^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/(2*b^5) - (2*a*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^4 - (a^2*d*sinh(c + d*x))/(2*b^4*(a + b*x)) - (2*a*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^4 + (sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^3 + (a^2*d^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(2*b^5)]
    @test_int [(x*cosh(c + d*x))/(a + b*x)^3, x, 11, (a*cosh(c + d*x))/(2*b^2*(a + b*x)^2) - cosh(c + d*x)/(b^2*(a + b*x)) - (a*d^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/(2*b^4) + (d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/b^3 + (a*d*sinh(c + d*x))/(2*b^3*(a + b*x)) + (d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/b^3 - (a*d^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(2*b^4)]
    @test_int [cosh(c + d*x)/(a + b*x)^3, x, 5, -cosh(c + d*x)/(2*b*(a + b*x)^2) + (d^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/(2*b^3) - (d*sinh(c + d*x))/(2*b^2*(a + b*x)) + (d^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(2*b^3)]
    @test_int [cosh(c + d*x)/(x*(a + b*x)^3), x, 17, cosh(c + d*x)/(2*a*(a + b*x)^2) + cosh(c + d*x)/(a^2*(a + b*x)) + (cosh(c)*CoshIntegral(d*x))/a^3 - (cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a^3 - (d^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/(2*a*b^2) - (d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/(a^2*b) + (d*sinh(c + d*x))/(2*a*b*(a + b*x)) + (sinh(c)*SinhIntegral(d*x))/a^3 - (d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(a^2*b) - (sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^3 - (d^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(2*a*b^2)]
    @test_int [cosh(c + d*x)/(x^2*(a + b*x)^3), x, 21, -(cosh(c + d*x)/(a^3*x)) - (b*cosh(c + d*x))/(2*a^2*(a + b*x)^2) - (2*b*cosh(c + d*x))/(a^3*(a + b*x)) - (3*b*cosh(c)*CoshIntegral(d*x))/a^4 + (3*b*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a^4 + (d^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/(2*a^2*b) + (d*CoshIntegral(d*x)*sinh(c))/a^3 + (2*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/a^3 - (d*sinh(c + d*x))/(2*a^2*(a + b*x)) + (d*cosh(c)*SinhIntegral(d*x))/a^3 - (3*b*sinh(c)*SinhIntegral(d*x))/a^4 + (2*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^3 + (3*b*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^4 + (d^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(2*a^2*b)]
    @test_int [cosh(c + d*x)/(x^3*(a + b*x)^3), x, 26, -cosh(c + d*x)/(2*a^3*x^2) + (3*b*cosh(c + d*x))/(a^4*x) + (b^2*cosh(c + d*x))/(2*a^3*(a + b*x)^2) + (3*b^2*cosh(c + d*x))/(a^4*(a + b*x)) + (6*b^2*cosh(c)*CoshIntegral(d*x))/a^5 + (d^2*cosh(c)*CoshIntegral(d*x))/(2*a^3) - (6*b^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/a^5 - (d^2*cosh(c - (a*d)/b)*CoshIntegral((a*d)/b + d*x))/(2*a^3) - (3*b*d*CoshIntegral(d*x)*sinh(c))/a^4 - (3*b*d*CoshIntegral((a*d)/b + d*x)*sinh(c - (a*d)/b))/a^4 - (d*sinh(c + d*x))/(2*a^3*x) + (b*d*sinh(c + d*x))/(2*a^3*(a + b*x)) - (3*b*d*cosh(c)*SinhIntegral(d*x))/a^4 + (6*b^2*sinh(c)*SinhIntegral(d*x))/a^5 + (d^2*sinh(c)*SinhIntegral(d*x))/(2*a^3) - (3*b*d*cosh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^4 - (6*b^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/a^5 - (d^2*sinh(c - (a*d)/b)*SinhIntegral((a*d)/b + d*x))/(2*a^3)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(e*x)^m*(a+b*x^2)^p*cosh(c+d*x)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [x^3*(a + b*x^2)*cosh(c + d*x), x, 12, (-120*b*cosh(c + d*x))/d^6 - (6*a*cosh(c + d*x))/d^4 - (60*b*x^2*cosh(c + d*x))/d^4 - (3*a*x^2*cosh(c + d*x))/d^2 - (5*b*x^4*cosh(c + d*x))/d^2 + (120*b*x*sinh(c + d*x))/d^5 + (6*a*x*sinh(c + d*x))/d^3 + (20*b*x^3*sinh(c + d*x))/d^3 + (a*x^3*sinh(c + d*x))/d + (b*x^5*sinh(c + d*x))/d]
    @test_int [x^2*(a + b*x^2)*cosh(c + d*x), x, 10, (-24*b*x*cosh(c + d*x))/d^4 - (2*a*x*cosh(c + d*x))/d^2 - (4*b*x^3*cosh(c + d*x))/d^2 + (24*b*sinh(c + d*x))/d^5 + (2*a*sinh(c + d*x))/d^3 + (12*b*x^2*sinh(c + d*x))/d^3 + (a*x^2*sinh(c + d*x))/d + (b*x^4*sinh(c + d*x))/d]
    @test_int [x*(a + b*x^2)*cosh(c + d*x), x, 8, (-6*b*cosh(c + d*x))/d^4 - (a*cosh(c + d*x))/d^2 - (3*b*x^2*cosh(c + d*x))/d^2 + (6*b*x*sinh(c + d*x))/d^3 + (a*x*sinh(c + d*x))/d + (b*x^3*sinh(c + d*x))/d]
    @test_int [(a + b*x^2)*cosh(c + d*x), x, 6, (-2*b*x*cosh(c + d*x))/d^2 + (2*b*sinh(c + d*x))/d^3 + (a*sinh(c + d*x))/d + (b*x^2*sinh(c + d*x))/d]
    @test_int [((a + b*x^2)*cosh(c + d*x))/x, x, 7, -((b*cosh(c + d*x))/d^2) + a*cosh(c)*CoshIntegral(d*x) + (b*x*sinh(c + d*x))/d + a*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^2)*cosh(c + d*x))/x^2, x, 7, -((a*cosh(c + d*x))/x) + a*d*CoshIntegral(d*x)*sinh(c) + (b*sinh(c + d*x))/d + a*d*cosh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^2)*cosh(c + d*x))/x^3, x, 10, -(a*cosh(c + d*x))/(2*x^2) + b*cosh(c)*CoshIntegral(d*x) + (a*d^2*cosh(c)*CoshIntegral(d*x))/2 - (a*d*sinh(c + d*x))/(2*x) + b*sinh(c)*SinhIntegral(d*x) + (a*d^2*sinh(c)*SinhIntegral(d*x))/2]
    @test_int [((a + b*x^2)*cosh(c + d*x))/x^4, x, 12, -(a*cosh(c + d*x))/(3*x^3) - (b*cosh(c + d*x))/x - (a*d^2*cosh(c + d*x))/(6*x) + b*d*CoshIntegral(d*x)*sinh(c) + (a*d^3*CoshIntegral(d*x)*sinh(c))/6 - (a*d*sinh(c + d*x))/(6*x^2) + b*d*cosh(c)*SinhIntegral(d*x) + (a*d^3*cosh(c)*SinhIntegral(d*x))/6]
    @test_int [((a + b*x^2)*cosh(c + d*x))/x^5, x, 14, -(a*cosh(c + d*x))/(4*x^4) - (b*cosh(c + d*x))/(2*x^2) - (a*d^2*cosh(c + d*x))/(24*x^2) + (b*d^2*cosh(c)*CoshIntegral(d*x))/2 + (a*d^4*cosh(c)*CoshIntegral(d*x))/24 - (a*d*sinh(c + d*x))/(12*x^3) - (b*d*sinh(c + d*x))/(2*x) - (a*d^3*sinh(c + d*x))/(24*x) + (b*d^2*sinh(c)*SinhIntegral(d*x))/2 + (a*d^4*sinh(c)*SinhIntegral(d*x))/24]

    @test_int [x^2*(a + b*x^2)^2*cosh(c + d*x), x, 17, (-720*b^2*x*cosh(c + d*x))/d^6 - (48*a*b*x*cosh(c + d*x))/d^4 - (2*a^2*x*cosh(c + d*x))/d^2 - (120*b^2*x^3*cosh(c + d*x))/d^4 - (8*a*b*x^3*cosh(c + d*x))/d^2 - (6*b^2*x^5*cosh(c + d*x))/d^2 + (720*b^2*sinh(c + d*x))/d^7 + (48*a*b*sinh(c + d*x))/d^5 + (2*a^2*sinh(c + d*x))/d^3 + (360*b^2*x^2*sinh(c + d*x))/d^5 + (24*a*b*x^2*sinh(c + d*x))/d^3 + (a^2*x^2*sinh(c + d*x))/d + (30*b^2*x^4*sinh(c + d*x))/d^3 + (2*a*b*x^4*sinh(c + d*x))/d + (b^2*x^6*sinh(c + d*x))/d]
    @test_int [x*(a + b*x^2)^2*cosh(c + d*x), x, 14, (-120*b^2*cosh(c + d*x))/d^6 - (12*a*b*cosh(c + d*x))/d^4 - (a^2*cosh(c + d*x))/d^2 - (60*b^2*x^2*cosh(c + d*x))/d^4 - (6*a*b*x^2*cosh(c + d*x))/d^2 - (5*b^2*x^4*cosh(c + d*x))/d^2 + (120*b^2*x*sinh(c + d*x))/d^5 + (12*a*b*x*sinh(c + d*x))/d^3 + (a^2*x*sinh(c + d*x))/d + (20*b^2*x^3*sinh(c + d*x))/d^3 + (2*a*b*x^3*sinh(c + d*x))/d + (b^2*x^5*sinh(c + d*x))/d]
    @test_int [(a + b*x^2)^2*cosh(c + d*x), x, 11, (-24*b^2*x*cosh(c + d*x))/d^4 - (4*a*b*x*cosh(c + d*x))/d^2 - (4*b^2*x^3*cosh(c + d*x))/d^2 + (24*b^2*sinh(c + d*x))/d^5 + (4*a*b*sinh(c + d*x))/d^3 + (a^2*sinh(c + d*x))/d + (12*b^2*x^2*sinh(c + d*x))/d^3 + (2*a*b*x^2*sinh(c + d*x))/d + (b^2*x^4*sinh(c + d*x))/d]
    @test_int [((a + b*x^2)^2*cosh(c + d*x))/x, x, 11, (-6*b^2*cosh(c + d*x))/d^4 - (2*a*b*cosh(c + d*x))/d^2 - (3*b^2*x^2*cosh(c + d*x))/d^2 + a^2*cosh(c)*CoshIntegral(d*x) + (6*b^2*x*sinh(c + d*x))/d^3 + (2*a*b*x*sinh(c + d*x))/d + (b^2*x^3*sinh(c + d*x))/d + a^2*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^2)^2*cosh(c + d*x))/x^2, x, 10, -((a^2*cosh(c + d*x))/x) - (2*b^2*x*cosh(c + d*x))/d^2 + a^2*d*CoshIntegral(d*x)*sinh(c) + (2*b^2*sinh(c + d*x))/d^3 + (2*a*b*sinh(c + d*x))/d + (b^2*x^2*sinh(c + d*x))/d + a^2*d*cosh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^2)^2*cosh(c + d*x))/x^3, x, 12, -((b^2*cosh(c + d*x))/d^2) - (a^2*cosh(c + d*x))/(2*x^2) + 2*a*b*cosh(c)*CoshIntegral(d*x) + (a^2*d^2*cosh(c)*CoshIntegral(d*x))/2 - (a^2*d*sinh(c + d*x))/(2*x) + (b^2*x*sinh(c + d*x))/d + 2*a*b*sinh(c)*SinhIntegral(d*x) + (a^2*d^2*sinh(c)*SinhIntegral(d*x))/2]
    @test_int [((a + b*x^2)^2*cosh(c + d*x))/x^4, x, 13, -(a^2*cosh(c + d*x))/(3*x^3) - (2*a*b*cosh(c + d*x))/x - (a^2*d^2*cosh(c + d*x))/(6*x) + 2*a*b*d*CoshIntegral(d*x)*sinh(c) + (a^2*d^3*CoshIntegral(d*x)*sinh(c))/6 + (b^2*sinh(c + d*x))/d - (a^2*d*sinh(c + d*x))/(6*x^2) + 2*a*b*d*cosh(c)*SinhIntegral(d*x) + (a^2*d^3*cosh(c)*SinhIntegral(d*x))/6]
    @test_int [((a + b*x^2)^2*cosh(c + d*x))/x^5, x, 17, -(a^2*cosh(c + d*x))/(4*x^4) - (a*b*cosh(c + d*x))/x^2 - (a^2*d^2*cosh(c + d*x))/(24*x^2) + b^2*cosh(c)*CoshIntegral(d*x) + a*b*d^2*cosh(c)*CoshIntegral(d*x) + (a^2*d^4*cosh(c)*CoshIntegral(d*x))/24 - (a^2*d*sinh(c + d*x))/(12*x^3) - (a*b*d*sinh(c + d*x))/x - (a^2*d^3*sinh(c + d*x))/(24*x) + b^2*sinh(c)*SinhIntegral(d*x) + a*b*d^2*sinh(c)*SinhIntegral(d*x) + (a^2*d^4*sinh(c)*SinhIntegral(d*x))/24]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(x^4*cosh(c + d*x))/(a + b*x^2), x, 14, (-2*x*cosh(c + d*x))/(b*d^2) + ((-a)^(3/2)*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^(5/2)) - ((-a)^(3/2)*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^(5/2)) + (2*sinh(c + d*x))/(b*d^3) - (a*sinh(c + d*x))/(b^2*d) + (x^2*sinh(c + d*x))/(b*d) - ((-a)^(3/2)*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^(5/2)) - ((-a)^(3/2)*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^(5/2))]
    @test_int [(x^3*cosh(c + d*x))/(a + b*x^2), x, 12, -(cosh(c + d*x)/(b*d^2)) - (a*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^2) - (a*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^2) + (x*sinh(c + d*x))/(b*d) + (a*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^2) - (a*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^2)]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x^2), x, 11, (sqrt(-a)*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^(3/2)) - (sqrt(-a)*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^(3/2)) + sinh(c + d*x)/(b*d) - (sqrt(-a)*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^(3/2)) - (sqrt(-a)*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^(3/2))]
    @test_int [(x*cosh(c + d*x))/(a + b*x^2), x, 8, (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b) + (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b) - (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b) + (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b)]
    @test_int [cosh(c + d*x)/(a + b*x^2), x, 8, (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*sqrt(-a)*sqrt(b)) - (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*sqrt(-a)*sqrt(b)) - (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*sqrt(-a)*sqrt(b)) - (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*sqrt(-a)*sqrt(b))]
    @test_int [cosh(c + d*x)/(x*(a + b*x^2)), x, 13, (cosh(c)*CoshIntegral(d*x))/a - (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a) - (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a) + (sinh(c)*SinhIntegral(d*x))/a + (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a) - (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a)]
    @test_int [cosh(c + d*x)/(x^2*(a + b*x^2)), x, 14, -(cosh(c + d*x)/(a*x)) + (sqrt(b)*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*(-a)^(3/2)) - (sqrt(b)*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*(-a)^(3/2)) + (d*CoshIntegral(d*x)*sinh(c))/a + (d*cosh(c)*SinhIntegral(d*x))/a - (sqrt(b)*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*(-a)^(3/2)) - (sqrt(b)*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*(-a)^(3/2))]
    @test_int [cosh(c + d*x)/(x^3*(a + b*x^2)), x, 18, -cosh(c + d*x)/(2*a*x^2) - (b*cosh(c)*CoshIntegral(d*x))/a^2 + (d^2*cosh(c)*CoshIntegral(d*x))/(2*a) + (b*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^2) + (b*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^2) - (d*sinh(c + d*x))/(2*a*x) - (b*sinh(c)*SinhIntegral(d*x))/a^2 + (d^2*sinh(c)*SinhIntegral(d*x))/(2*a) - (b*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^2) + (b*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^2)]

    @test_int [(x^4*cosh(c + d*x))/(a + b*x^2)^2, x, 24, (x*cosh(c + d*x))/(2*b^2) - (x^3*cosh(c + d*x))/(2*b*(a + b*x^2)) + (3*sqrt(-a)*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*b^(5/2)) - (3*sqrt(-a)*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*b^(5/2)) - (a*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(4*b^3) - (a*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(4*b^3) + sinh(c + d*x)/(b^2*d) + (a*d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*b^3) - (3*sqrt(-a)*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*b^(5/2)) - (a*d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*b^3) - (3*sqrt(-a)*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*b^(5/2))]
    @test_int [(x^3*cosh(c + d*x))/(a + b*x^2)^2, x, 20, cosh(c + d*x)/(2*b^2) - (x^2*cosh(c + d*x))/(2*b*(a + b*x^2)) + (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^2) + (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^2) - (sqrt(-a)*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(4*b^(5/2)) + (sqrt(-a)*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(4*b^(5/2)) - (sqrt(-a)*d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*b^(5/2)) - (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*b^2) - (sqrt(-a)*d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*b^(5/2)) + (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*b^2)]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x^2)^2, x, 17, -(x*cosh(c + d*x))/(2*b*(a + b*x^2)) + (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*sqrt(-a)*b^(3/2)) - (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*sqrt(-a)*b^(3/2)) + (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(4*b^2) + (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(4*b^2) - (d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*b^2) - (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*sqrt(-a)*b^(3/2)) + (d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*b^2) - (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*sqrt(-a)*b^(3/2))]
    @test_int [(x*cosh(c + d*x))/(a + b*x^2)^2, x, 9, -cosh(c + d*x)/(2*b*(a + b*x^2)) - (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(4*sqrt(-a)*b^(3/2)) + (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(4*sqrt(-a)*b^(3/2)) - (d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*sqrt(-a)*b^(3/2)) - (d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*sqrt(-a)*b^(3/2))]
    @test_int [cosh(c + d*x)/(a + b*x^2)^2, x, 18, -cosh(c + d*x)/(4*a*sqrt(b)*(sqrt(-a) - sqrt(b)*x)) + cosh(c + d*x)/(4*a*sqrt(b)*(sqrt(-a) + sqrt(b)*x)) - (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*(-a)^(3/2)*sqrt(b)) + (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*(-a)^(3/2)*sqrt(b)) - (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(4*a*b) - (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(4*a*b) + (d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*a*b) + (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*(-a)^(3/2)*sqrt(b)) - (d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*a*b) + (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*(-a)^(3/2)*sqrt(b))]
    @test_int [cosh(c + d*x)/(x*(a + b*x^2)^2), x, 22, cosh(c + d*x)/(2*a*(a + b*x^2)) + (cosh(c)*CoshIntegral(d*x))/a^2 - (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^2) - (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^2) - (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(4*(-a)^(3/2)*sqrt(b)) + (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(4*(-a)^(3/2)*sqrt(b)) + (sinh(c)*SinhIntegral(d*x))/a^2 - (d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*(-a)^(3/2)*sqrt(b)) + (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^2) - (d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*(-a)^(3/2)*sqrt(b)) - (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^2)]
    @test_int [cosh(c + d*x)/(x^2*(a + b*x^2)^2), x, 32, -(cosh(c + d*x)/(a^2*x)) + (sqrt(b)*cosh(c + d*x))/(4*a^2*(sqrt(-a) - sqrt(b)*x)) - (sqrt(b)*cosh(c + d*x))/(4*a^2*(sqrt(-a) + sqrt(b)*x)) - (3*sqrt(b)*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*(-a)^(5/2)) + (3*sqrt(b)*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*(-a)^(5/2)) + (d*CoshIntegral(d*x)*sinh(c))/a^2 + (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(4*a^2) + (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(4*a^2) + (d*cosh(c)*SinhIntegral(d*x))/a^2 - (d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*a^2) + (3*sqrt(b)*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(4*(-a)^(5/2)) + (d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*a^2) + (3*sqrt(b)*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(4*(-a)^(5/2))]

    @test_int [(x^3*cosh(c + d*x))/(a + b*x^2)^3, x, 27, -(x^2*cosh(c + d*x))/(4*b*(a + b*x^2)^2) - cosh(c + d*x)/(4*b^2*(a + b*x^2)) + (d^2*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*b^3) + (d^2*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*b^3) - (3*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(16*sqrt(-a)*b^(5/2)) + (3*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(16*sqrt(-a)*b^(5/2)) - (d*x*sinh(c + d*x))/(8*b^2*(a + b*x^2)) - (3*d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*sqrt(-a)*b^(5/2)) - (d^2*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*b^3) - (3*d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*sqrt(-a)*b^(5/2)) + (d^2*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*b^3)]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x^2)^3, x, 28, -cosh(c + d*x)/(16*a*b^(3/2)*(sqrt(-a) - sqrt(b)*x)) + cosh(c + d*x)/(16*a*b^(3/2)*(sqrt(-a) + sqrt(b)*x)) - (x*cosh(c + d*x))/(4*b*(a + b*x^2)^2) - (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(3/2)*b^(3/2)) + (d^2*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*sqrt(-a)*b^(5/2)) + (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(3/2)*b^(3/2)) - (d^2*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*sqrt(-a)*b^(5/2)) - (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(16*a*b^2) - (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(16*a*b^2) - (d*sinh(c + d*x))/(8*b^2*(a + b*x^2)) + (d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a*b^2) + (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(3/2)*b^(3/2)) - (d^2*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*sqrt(-a)*b^(5/2)) - (d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a*b^2) + (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(3/2)*b^(3/2)) - (d^2*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*sqrt(-a)*b^(5/2))]
    @test_int [(x*cosh(c + d*x))/(a + b*x^2)^3, x, 19, -cosh(c + d*x)/(4*b*(a + b*x^2)^2) - (d^2*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a*b^2) - (d^2*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a*b^2) + (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(16*(-a)^(3/2)*b^(3/2)) - (d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(16*(-a)^(3/2)*b^(3/2)) - (d*sinh(c + d*x))/(16*a*b^(3/2)*(sqrt(-a) - sqrt(b)*x)) + (d*sinh(c + d*x))/(16*a*b^(3/2)*(sqrt(-a) + sqrt(b)*x)) + (d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(3/2)*b^(3/2)) + (d^2*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a*b^2) + (d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(3/2)*b^(3/2)) - (d^2*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a*b^2)]
    @test_int [cosh(c + d*x)/(a + b*x^2)^3, x, 28, -cosh(c + d*x)/(16*(-a)^(3/2)*sqrt(b)*(sqrt(-a) - sqrt(b)*x)^2) - (3*cosh(c + d*x))/(16*a^2*sqrt(b)*(sqrt(-a) - sqrt(b)*x)) + cosh(c + d*x)/(16*(-a)^(3/2)*sqrt(b)*(sqrt(-a) + sqrt(b)*x)^2) + (3*cosh(c + d*x))/(16*a^2*sqrt(b)*(sqrt(-a) + sqrt(b)*x)) + (3*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(5/2)*sqrt(b)) + (d^2*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(3/2)*b^(3/2)) - (3*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(5/2)*sqrt(b)) - (d^2*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(3/2)*b^(3/2)) - (3*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(16*a^2*b) - (3*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(16*a^2*b) + (d*sinh(c + d*x))/(16*(-a)^(3/2)*b*(sqrt(-a) - sqrt(b)*x)) + (d*sinh(c + d*x))/(16*(-a)^(3/2)*b*(sqrt(-a) + sqrt(b)*x)) + (3*d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a^2*b) - (3*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(5/2)*sqrt(b)) - (d^2*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(3/2)*b^(3/2)) - (3*d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a^2*b) - (3*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(5/2)*sqrt(b)) - (d^2*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(3/2)*b^(3/2))]
    @test_int [cosh(c + d*x)/(x*(a + b*x^2)^3), x, 41, cosh(c + d*x)/(4*a*(a + b*x^2)^2) + cosh(c + d*x)/(2*a^2*(a + b*x^2)) + (cosh(c)*CoshIntegral(d*x))/a^3 - (cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^3) + (d^2*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a^2*b) - (cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^3) + (d^2*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a^2*b) + (5*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(16*(-a)^(5/2)*sqrt(b)) - (5*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(16*(-a)^(5/2)*sqrt(b)) + (d*sinh(c + d*x))/(16*a^2*sqrt(b)*(sqrt(-a) - sqrt(b)*x)) - (d*sinh(c + d*x))/(16*a^2*sqrt(b)*(sqrt(-a) + sqrt(b)*x)) + (sinh(c)*SinhIntegral(d*x))/a^3 + (5*d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(5/2)*sqrt(b)) + (sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^3) - (d^2*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a^2*b) + (5*d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(5/2)*sqrt(b)) - (sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^3) + (d^2*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a^2*b)]
    @test_int [cosh(c + d*x)/(x^2*(a + b*x^2)^3), x, 60, -(cosh(c + d*x)/(a^3*x)) - (sqrt(b)*cosh(c + d*x))/(16*(-a)^(5/2)*(sqrt(-a) - sqrt(b)*x)^2) + (7*sqrt(b)*cosh(c + d*x))/(16*a^3*(sqrt(-a) - sqrt(b)*x)) + (sqrt(b)*cosh(c + d*x))/(16*(-a)^(5/2)*(sqrt(-a) + sqrt(b)*x)^2) - (7*sqrt(b)*cosh(c + d*x))/(16*a^3*(sqrt(-a) + sqrt(b)*x)) + (15*sqrt(b)*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(7/2)) + (d^2*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(5/2)*sqrt(b)) - (15*sqrt(b)*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(7/2)) - (d^2*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(5/2)*sqrt(b)) + (d*CoshIntegral(d*x)*sinh(c))/a^3 + (7*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(16*a^3) + (7*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(16*a^3) + (d*sinh(c + d*x))/(16*(-a)^(5/2)*(sqrt(-a) - sqrt(b)*x)) + (d*sinh(c + d*x))/(16*(-a)^(5/2)*(sqrt(-a) + sqrt(b)*x)) + (d*cosh(c)*SinhIntegral(d*x))/a^3 - (7*d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a^3) - (15*sqrt(b)*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(7/2)) - (d^2*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(5/2)*sqrt(b)) + (7*d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a^3) - (15*sqrt(b)*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(7/2)) - (d^2*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(5/2)*sqrt(b))]
    @test_int [cosh(c + d*x)/(x^3*(a + b*x^2)^3), x, 46, -cosh(c + d*x)/(2*a^3*x^2) - (b*cosh(c + d*x))/(4*a^2*(a + b*x^2)^2) - (b*cosh(c + d*x))/(a^3*(a + b*x^2)) - (3*b*cosh(c)*CoshIntegral(d*x))/a^4 + (d^2*cosh(c)*CoshIntegral(d*x))/(2*a^3) + (3*b*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^4) - (d^2*cosh(c + (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a^3) + (3*b*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^4) - (d^2*cosh(c - (sqrt(-a)*d)/sqrt(b))*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a^3) + (9*sqrt(b)*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) + d*x)*sinh(c - (sqrt(-a)*d)/sqrt(b)))/(16*(-a)^(7/2)) - (9*sqrt(b)*d*CoshIntegral((sqrt(-a)*d)/sqrt(b) - d*x)*sinh(c + (sqrt(-a)*d)/sqrt(b)))/(16*(-a)^(7/2)) - (d*sinh(c + d*x))/(2*a^3*x) - (sqrt(b)*d*sinh(c + d*x))/(16*a^3*(sqrt(-a) - sqrt(b)*x)) + (sqrt(b)*d*sinh(c + d*x))/(16*a^3*(sqrt(-a) + sqrt(b)*x)) - (3*b*sinh(c)*SinhIntegral(d*x))/a^4 + (d^2*sinh(c)*SinhIntegral(d*x))/(2*a^3) + (9*sqrt(b)*d*cosh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*(-a)^(7/2)) - (3*b*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(2*a^4) + (d^2*sinh(c + (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) - d*x))/(16*a^3) + (9*sqrt(b)*d*cosh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*(-a)^(7/2)) + (3*b*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(2*a^4) - (d^2*sinh(c - (sqrt(-a)*d)/sqrt(b))*SinhIntegral((sqrt(-a)*d)/sqrt(b) + d*x))/(16*a^3)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*(e*x)^m*(a+b*x^3)^p*cosh(c+d*x)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [x^3*(a + b*x^3)*cosh(c + d*x), x, 13, (-6*a*cosh(c + d*x))/d^4 - (720*b*x*cosh(c + d*x))/d^6 - (3*a*x^2*cosh(c + d*x))/d^2 - (120*b*x^3*cosh(c + d*x))/d^4 - (6*b*x^5*cosh(c + d*x))/d^2 + (720*b*sinh(c + d*x))/d^7 + (6*a*x*sinh(c + d*x))/d^3 + (360*b*x^2*sinh(c + d*x))/d^5 + (a*x^3*sinh(c + d*x))/d + (30*b*x^4*sinh(c + d*x))/d^3 + (b*x^6*sinh(c + d*x))/d]
    @test_int [x^2*(a + b*x^3)*cosh(c + d*x), x, 11, (-120*b*cosh(c + d*x))/d^6 - (2*a*x*cosh(c + d*x))/d^2 - (60*b*x^2*cosh(c + d*x))/d^4 - (5*b*x^4*cosh(c + d*x))/d^2 + (2*a*sinh(c + d*x))/d^3 + (120*b*x*sinh(c + d*x))/d^5 + (a*x^2*sinh(c + d*x))/d + (20*b*x^3*sinh(c + d*x))/d^3 + (b*x^5*sinh(c + d*x))/d]
    @test_int [x^1*(a + b*x^3)*cosh(c + d*x), x, 9, -((a*cosh(c + d*x))/d^2) - (24*b*x*cosh(c + d*x))/d^4 - (4*b*x^3*cosh(c + d*x))/d^2 + (24*b*sinh(c + d*x))/d^5 + (a*x*sinh(c + d*x))/d + (12*b*x^2*sinh(c + d*x))/d^3 + (b*x^4*sinh(c + d*x))/d]
    @test_int [(a + b*x^3)*cosh(c + d*x), x, 7, (-6*b*cosh(c + d*x))/d^4 - (3*b*x^2*cosh(c + d*x))/d^2 + (a*sinh(c + d*x))/d + (6*b*x*sinh(c + d*x))/d^3 + (b*x^3*sinh(c + d*x))/d]
    @test_int [((a + b*x^3)*cosh(c + d*x))/x^1, x, 8, (-2*b*x*cosh(c + d*x))/d^2 + a*cosh(c)*CoshIntegral(d*x) + (2*b*sinh(c + d*x))/d^3 + (b*x^2*sinh(c + d*x))/d + a*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^3)*cosh(c + d*x))/x^2, x, 8, -((b*cosh(c + d*x))/d^2) - (a*cosh(c + d*x))/x + a*d*CoshIntegral(d*x)*sinh(c) + (b*x*sinh(c + d*x))/d + a*d*cosh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^3)*cosh(c + d*x))/x^3, x, 8, -(a*cosh(c + d*x))/(2*x^2) + (a*d^2*cosh(c)*CoshIntegral(d*x))/2 + (b*sinh(c + d*x))/d - (a*d*sinh(c + d*x))/(2*x) + (a*d^2*sinh(c)*SinhIntegral(d*x))/2]
    @test_int [((a + b*x^3)*cosh(c + d*x))/x^4, x, 11, -(a*cosh(c + d*x))/(3*x^3) - (a*d^2*cosh(c + d*x))/(6*x) + b*cosh(c)*CoshIntegral(d*x) + (a*d^3*CoshIntegral(d*x)*sinh(c))/6 - (a*d*sinh(c + d*x))/(6*x^2) + (a*d^3*cosh(c)*SinhIntegral(d*x))/6 + b*sinh(c)*SinhIntegral(d*x)]

    @test_int [x^1*(a + b*x^3)^2*cosh(c + d*x), x, 17, (-5040*b^2*cosh(c + d*x))/d^8 - (a^2*cosh(c + d*x))/d^2 - (48*a*b*x*cosh(c + d*x))/d^4 - (2520*b^2*x^2*cosh(c + d*x))/d^6 - (8*a*b*x^3*cosh(c + d*x))/d^2 - (210*b^2*x^4*cosh(c + d*x))/d^4 - (7*b^2*x^6*cosh(c + d*x))/d^2 + (48*a*b*sinh(c + d*x))/d^5 + (5040*b^2*x*sinh(c + d*x))/d^7 + (a^2*x*sinh(c + d*x))/d + (24*a*b*x^2*sinh(c + d*x))/d^3 + (840*b^2*x^3*sinh(c + d*x))/d^5 + (2*a*b*x^4*sinh(c + d*x))/d + (42*b^2*x^5*sinh(c + d*x))/d^3 + (b^2*x^7*sinh(c + d*x))/d]
    @test_int [(a + b*x^3)^2*cosh(c + d*x), x, 14, (-12*a*b*cosh(c + d*x))/d^4 - (720*b^2*x*cosh(c + d*x))/d^6 - (6*a*b*x^2*cosh(c + d*x))/d^2 - (120*b^2*x^3*cosh(c + d*x))/d^4 - (6*b^2*x^5*cosh(c + d*x))/d^2 + (720*b^2*sinh(c + d*x))/d^7 + (a^2*sinh(c + d*x))/d + (12*a*b*x*sinh(c + d*x))/d^3 + (360*b^2*x^2*sinh(c + d*x))/d^5 + (2*a*b*x^3*sinh(c + d*x))/d + (30*b^2*x^4*sinh(c + d*x))/d^3 + (b^2*x^6*sinh(c + d*x))/d]
    @test_int [((a + b*x^3)^2*cosh(c + d*x))/x^1, x, 14, (-120*b^2*cosh(c + d*x))/d^6 - (4*a*b*x*cosh(c + d*x))/d^2 - (60*b^2*x^2*cosh(c + d*x))/d^4 - (5*b^2*x^4*cosh(c + d*x))/d^2 + a^2*cosh(c)*CoshIntegral(d*x) + (4*a*b*sinh(c + d*x))/d^3 + (120*b^2*x*sinh(c + d*x))/d^5 + (2*a*b*x^2*sinh(c + d*x))/d + (20*b^2*x^3*sinh(c + d*x))/d^3 + (b^2*x^5*sinh(c + d*x))/d + a^2*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^3)^2*cosh(c + d*x))/x^2, x, 13, (-2*a*b*cosh(c + d*x))/d^2 - (a^2*cosh(c + d*x))/x - (24*b^2*x*cosh(c + d*x))/d^4 - (4*b^2*x^3*cosh(c + d*x))/d^2 + a^2*d*CoshIntegral(d*x)*sinh(c) + (24*b^2*sinh(c + d*x))/d^5 + (2*a*b*x*sinh(c + d*x))/d + (12*b^2*x^2*sinh(c + d*x))/d^3 + (b^2*x^4*sinh(c + d*x))/d + a^2*d*cosh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^3)^2*cosh(c + d*x))/x^3, x, 12, (-6*b^2*cosh(c + d*x))/d^4 - (a^2*cosh(c + d*x))/(2*x^2) - (3*b^2*x^2*cosh(c + d*x))/d^2 + (a^2*d^2*cosh(c)*CoshIntegral(d*x))/2 + (2*a*b*sinh(c + d*x))/d - (a^2*d*sinh(c + d*x))/(2*x) + (6*b^2*x*sinh(c + d*x))/d^3 + (b^2*x^3*sinh(c + d*x))/d + (a^2*d^2*sinh(c)*SinhIntegral(d*x))/2]
    @test_int [((a + b*x^3)^2*cosh(c + d*x))/x^4, x, 14, -(a^2*cosh(c + d*x))/(3*x^3) - (a^2*d^2*cosh(c + d*x))/(6*x) - (2*b^2*x*cosh(c + d*x))/d^2 + 2*a*b*cosh(c)*CoshIntegral(d*x) + (a^2*d^3*CoshIntegral(d*x)*sinh(c))/6 + (2*b^2*sinh(c + d*x))/d^3 - (a^2*d*sinh(c + d*x))/(6*x^2) + (b^2*x^2*sinh(c + d*x))/d + (a^2*d^3*cosh(c)*SinhIntegral(d*x))/6 + 2*a*b*sinh(c)*SinhIntegral(d*x)]
    @test_int [((a + b*x^3)^2*cosh(c + d*x))/x^5, x, 15, -((b^2*cosh(c + d*x))/d^2) - (a^2*cosh(c + d*x))/(4*x^4) - (a^2*d^2*cosh(c + d*x))/(24*x^2) - (2*a*b*cosh(c + d*x))/x + (a^2*d^4*cosh(c)*CoshIntegral(d*x))/24 + 2*a*b*d*CoshIntegral(d*x)*sinh(c) - (a^2*d*sinh(c + d*x))/(12*x^3) - (a^2*d^3*sinh(c + d*x))/(24*x) + (b^2*x*sinh(c + d*x))/d + 2*a*b*d*cosh(c)*SinhIntegral(d*x) + (a^2*d^4*sinh(c)*SinhIntegral(d*x))/24]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [(x^4*cosh(c + d*x))/(a + b*x^3), x, 15, -(cosh(c + d*x)/(b*d^2)) + ((-1)^(2/3)*a^(2/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*b^(5/3)) - ((-1)^(1/3)*a^(2/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*b^(5/3)) + (a^(2/3)*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*b^(5/3)) + (x*sinh(c + d*x))/(b*d) - ((-1)^(2/3)*a^(2/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*b^(5/3)) + (a^(2/3)*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*b^(5/3)) - ((-1)^(1/3)*a^(2/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*b^(5/3))]
    @test_int [(x^3*cosh(c + d*x))/(a + b*x^3), x, 14, ((-1)^(1/3)*a^(1/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*b^(4/3)) - ((-1)^(2/3)*a^(1/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*b^(4/3)) - (a^(1/3)*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*b^(4/3)) + sinh(c + d*x)/(b*d) - ((-1)^(1/3)*a^(1/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*b^(4/3)) - (a^(1/3)*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*b^(4/3)) - ((-1)^(2/3)*a^(1/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*b^(4/3))]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x^3), x, 11, (cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*b) + (cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*b) + (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*b) - (sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*b) + (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*b) + (sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*b)]
    @test_int [(x^1*cosh(c + d*x))/(a + b*x^3), x, 11, -(((-1)^(2/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(1/3)*b^(2/3))) + ((-1)^(1/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*a^(1/3)*b^(2/3)) - (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(1/3)*b^(2/3)) + ((-1)^(2/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(1/3)*b^(2/3)) - (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(1/3)*b^(2/3)) + ((-1)^(1/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(1/3)*b^(2/3))]
    @test_int [cosh(c + d*x)/(a + b*x^3), x, 11, -(((-1)^(1/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(2/3)*b^(1/3))) + ((-1)^(2/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*a^(2/3)*b^(1/3)) + (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(2/3)*b^(1/3)) + ((-1)^(1/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(2/3)*b^(1/3)) + (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(2/3)*b^(1/3)) + ((-1)^(2/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(2/3)*b^(1/3))]
    @test_int [cosh(c + d*x)/(x^1*(a + b*x^3)), x, 16, (cosh(c)*CoshIntegral(d*x))/a - (cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a) - (cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*a) - (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a) + (sinh(c)*SinhIntegral(d*x))/a + (sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a) - (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a) - (sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*a)]
    @test_int [cosh(c + d*x)/(x^2*(a + b*x^3)), x, 17, -(cosh(c + d*x)/(a*x)) + ((-1)^(2/3)*b^(1/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(4/3)) - ((-1)^(1/3)*b^(1/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*a^(4/3)) + (b^(1/3)*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(4/3)) + (d*CoshIntegral(d*x)*sinh(c))/a + (d*cosh(c)*SinhIntegral(d*x))/a - ((-1)^(2/3)*b^(1/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(4/3)) + (b^(1/3)*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(4/3)) - ((-1)^(1/3)*b^(1/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(4/3))]
    @test_int [cosh(c + d*x)/(x^3*(a + b*x^3)), x, 18, -(cosh(c + d*x)/(2*a*x^2)) + (d^2*cosh(c)*CoshIntegral(d*x))/(2*a) + ((-1)^(1/3)*b^(2/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(5/3)) - ((-1)^(2/3)*b^(2/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*a^(5/3)) - (b^(2/3)*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(5/3)) - (d*sinh(c + d*x))/(2*a*x) + (d^2*sinh(c)*SinhIntegral(d*x))/(2*a) - ((-1)^(1/3)*b^(2/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^(5/3)) - (b^(2/3)*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(5/3)) - ((-1)^(2/3)*b^(2/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*a^(5/3))]

    @test_int [(x^3*cosh(c + d*x))/(a + b*x^3)^2, x, 23, -((x*cosh(c + d*x))/(3*b*(a + b*x^3))) - ((-1)^(1/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(2/3)*b^(4/3)) + ((-1)^(2/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(9*a^(2/3)*b^(4/3)) + (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(2/3)*b^(4/3)) - (d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(9*a^(1/3)*b^(5/3)) - ((-1)^(2/3)*d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(1/3)*b^(5/3)) + ((-1)^(1/3)*d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(1/3)*b^(5/3)) + ((-1)^(2/3)*d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(1/3)*b^(5/3)) + ((-1)^(1/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(2/3)*b^(4/3)) - (d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(1/3)*b^(5/3)) + (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(2/3)*b^(4/3)) + ((-1)^(1/3)*d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(1/3)*b^(5/3)) + ((-1)^(2/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(2/3)*b^(4/3))]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x^3)^2, x, 12, -(cosh(c + d*x)/(3*b*(a + b*x^3))) + (d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(9*a^(2/3)*b^(4/3)) - ((-1)^(1/3)*d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(2/3)*b^(4/3)) + ((-1)^(2/3)*d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(2/3)*b^(4/3)) + ((-1)^(1/3)*d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(2/3)*b^(4/3)) + (d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(2/3)*b^(4/3)) + ((-1)^(2/3)*d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(2/3)*b^(4/3))]
    @test_int [(x^1*cosh(c + d*x))/(a + b*x^3)^2, x, 34, cosh(c + d*x)/(3*a*b*x) - cosh(c + d*x)/(3*b*x*(a + b*x^3)) - ((-1)^(2/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(4/3)*b^(2/3)) + ((-1)^(1/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(9*a^(4/3)*b^(2/3)) - (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(4/3)*b^(2/3)) - (d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(9*a*b) - (d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(9*a*b) - (d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(9*a*b) + (d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a*b) + ((-1)^(2/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(4/3)*b^(2/3)) - (d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a*b) - (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(4/3)*b^(2/3)) - (d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a*b) + ((-1)^(1/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(4/3)*b^(2/3))]
    @test_int [cosh(c + d*x)/(a + b*x^3)^2, x, 36, cosh(c + d*x)/(3*a*b*x^2) - cosh(c + d*x)/(3*b*x^2*(a + b*x^3)) - (2*(-1)^(1/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(5/3)*b^(1/3)) + (2*(-1)^(2/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(9*a^(5/3)*b^(1/3)) + (2*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(5/3)*b^(1/3)) + (d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(9*a^(4/3)*b^(2/3)) + ((-1)^(2/3)*d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(4/3)*b^(2/3)) - ((-1)^(1/3)*d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(4/3)*b^(2/3)) - ((-1)^(2/3)*d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(4/3)*b^(2/3)) + (2*(-1)^(1/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(5/3)*b^(1/3)) + (d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(4/3)*b^(2/3)) + (2*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(5/3)*b^(1/3)) - ((-1)^(1/3)*d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(4/3)*b^(2/3)) + (2*(-1)^(2/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(5/3)*b^(1/3))]
    @test_int [cosh(c + d*x)/(x^1*(a + b*x^3)^2), x, 41, cosh(c + d*x)/(3*a*b*x^3) - cosh(c + d*x)/(3*b*x^3*(a + b*x^3)) + (cosh(c)*CoshIntegral(d*x))/a^2 - (cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^2) - (cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(3*a^2) - (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^2) - (d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(9*a^(5/3)*b^(1/3)) + ((-1)^(1/3)*d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(5/3)*b^(1/3)) - ((-1)^(2/3)*d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(9*a^(5/3)*b^(1/3)) + (sinh(c)*SinhIntegral(d*x))/a^2 - ((-1)^(1/3)*d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(9*a^(5/3)*b^(1/3)) + (sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(3*a^2) - (d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(5/3)*b^(1/3)) - (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(3*a^2) - ((-1)^(2/3)*d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(9*a^(5/3)*b^(1/3)) - (sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(3*a^2)]

    @test_int [(x^5*cosh(c + d*x))/(a + b*x^3)^3, x, 36, -((x^3*cosh(c + d*x))/(6*b*(a + b*x^3)^2)) - cosh(c + d*x)/(6*b^2*(a + b*x^3)) - ((-1)^(2/3)*d^2*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(1/3)*b^(8/3)) + ((-1)^(1/3)*d^2*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(54*a^(1/3)*b^(8/3)) - (d^2*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(1/3)*b^(8/3)) + (2*d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(27*a^(2/3)*b^(7/3)) - (2*(-1)^(1/3)*d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(27*a^(2/3)*b^(7/3)) + (2*(-1)^(2/3)*d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(27*a^(2/3)*b^(7/3)) - (d*x*sinh(c + d*x))/(18*b^2*(a + b*x^3)) + (2*(-1)^(1/3)*d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(2/3)*b^(7/3)) + ((-1)^(2/3)*d^2*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(1/3)*b^(8/3)) + (2*d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(2/3)*b^(7/3)) - (d^2*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(1/3)*b^(8/3)) + (2*(-1)^(2/3)*d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(2/3)*b^(7/3)) + ((-1)^(1/3)*d^2*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(1/3)*b^(8/3))]
    @test_int [(x^4*cosh(c + d*x))/(a + b*x^3)^3, x, 47, cosh(c + d*x)/(9*a*b^2*x) - (x^2*cosh(c + d*x))/(6*b*(a + b*x^3)^2) - cosh(c + d*x)/(9*b^2*x*(a + b*x^3)) - ((-1)^(2/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(4/3)*b^(5/3)) - ((-1)^(1/3)*d^2*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(2/3)*b^(7/3)) + ((-1)^(1/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(27*a^(4/3)*b^(5/3)) + ((-1)^(2/3)*d^2*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(54*a^(2/3)*b^(7/3)) - (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(4/3)*b^(5/3)) + (d^2*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(2/3)*b^(7/3)) - (d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(27*a*b^2) - (d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(27*a*b^2) - (d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(27*a*b^2) - (d*sinh(c + d*x))/(18*b^2*(a + b*x^3)) + (d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a*b^2) + ((-1)^(2/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(4/3)*b^(5/3)) + ((-1)^(1/3)*d^2*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(2/3)*b^(7/3)) - (d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a*b^2) - (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(4/3)*b^(5/3)) + (d^2*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(2/3)*b^(7/3)) - (d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(27*a*b^2) + ((-1)^(1/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(4/3)*b^(5/3)) + ((-1)^(2/3)*d^2*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(2/3)*b^(7/3))]
    @test_int [(x^3*cosh(c + d*x))/(a + b*x^3)^3, x, 71, cosh(c + d*x)/(18*a*b^2*x^2) - (x*cosh(c + d*x))/(6*b*(a + b*x^3)^2) - cosh(c + d*x)/(18*b^2*x^2*(a + b*x^3)) - ((-1)^(1/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(5/3)*b^(4/3)) - (d^2*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a*b^2) + ((-1)^(2/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(27*a^(5/3)*b^(4/3)) - (d^2*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(54*a*b^2) + (cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(5/3)*b^(4/3)) - (d^2*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a*b^2) + (d*sinh(c + d*x))/(18*a*b^2*x) - (d*sinh(c + d*x))/(18*b^2*x*(a + b*x^3)) + ((-1)^(1/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(5/3)*b^(4/3)) + (d^2*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a*b^2) + (sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(5/3)*b^(4/3)) - (d^2*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a*b^2) + ((-1)^(2/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(5/3)*b^(4/3)) - (d^2*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(54*a*b^2)]
    @test_int [(x^2*cosh(c + d*x))/(a + b*x^3)^3, x, 37, -(cosh(c + d*x)/(6*b*(a + b*x^3)^2)) + ((-1)^(2/3)*d^2*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(4/3)*b^(5/3)) - ((-1)^(1/3)*d^2*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(54*a^(4/3)*b^(5/3)) + (d^2*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(4/3)*b^(5/3)) + (d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(27*a^(5/3)*b^(4/3)) - ((-1)^(1/3)*d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(27*a^(5/3)*b^(4/3)) + ((-1)^(2/3)*d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(27*a^(5/3)*b^(4/3)) + (d*sinh(c + d*x))/(18*a*b^2*x^2) - (d*sinh(c + d*x))/(18*b^2*x^2*(a + b*x^3)) + ((-1)^(1/3)*d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(5/3)*b^(4/3)) - ((-1)^(2/3)*d^2*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(4/3)*b^(5/3)) + (d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(5/3)*b^(4/3)) + (d^2*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(4/3)*b^(5/3)) + ((-1)^(2/3)*d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(5/3)*b^(4/3)) - ((-1)^(1/3)*d^2*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(4/3)*b^(5/3))]
    @test_int [(x^1*cosh(c + d*x))/(a + b*x^3)^3, x, 89, -(cosh(c + d*x)/(18*a*b^2*x^4)) + (2*cosh(c + d*x))/(9*a^2*b*x) - cosh(c + d*x)/(6*b*x*(a + b*x^3)^2) + cosh(c + d*x)/(18*b^2*x^4*(a + b*x^3)) - (2*(-1)^(2/3)*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(7/3)*b^(2/3)) + ((-1)^(1/3)*d^2*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(5/3)*b^(4/3)) + (2*(-1)^(1/3)*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(27*a^(7/3)*b^(2/3)) - ((-1)^(2/3)*d^2*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x))/(54*a^(5/3)*b^(4/3)) - (2*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(7/3)*b^(2/3)) - (d^2*cosh(c - (a^(1/3)*d)/b^(1/3))*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(5/3)*b^(4/3)) - (2*d*CoshIntegral((a^(1/3)*d)/b^(1/3) + d*x)*sinh(c - (a^(1/3)*d)/b^(1/3)))/(27*a^2*b) - (2*d*CoshIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3)))/(27*a^2*b) - (2*d*CoshIntegral(-(((-1)^(2/3)*a^(1/3)*d)/b^(1/3)) - d*x)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3)))/(27*a^2*b) + (d*sinh(c + d*x))/(18*a*b^2*x^3) - (d*sinh(c + d*x))/(18*b^2*x^3*(a + b*x^3)) + (2*d*cosh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^2*b) + (2*(-1)^(2/3)*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(27*a^(7/3)*b^(2/3)) - ((-1)^(1/3)*d^2*sinh(c + ((-1)^(1/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(1/3)*a^(1/3)*d)/b^(1/3) - d*x))/(54*a^(5/3)*b^(4/3)) - (2*d*cosh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^2*b) - (2*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(7/3)*b^(2/3)) - (d^2*sinh(c - (a^(1/3)*d)/b^(1/3))*SinhIntegral((a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(5/3)*b^(4/3)) - (2*d*cosh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(27*a^2*b) + (2*(-1)^(1/3)*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(27*a^(7/3)*b^(2/3)) - ((-1)^(2/3)*d^2*sinh(c - ((-1)^(2/3)*a^(1/3)*d)/b^(1/3))*SinhIntegral(((-1)^(2/3)*a^(1/3)*d)/b^(1/3) + d*x))/(54*a^(5/3)*b^(4/3))]
    end

max_stars_repo_path: test/6 Hyperbolic functions/6.2 Hyperbolic cosine/6.2.2 (e x)^m (a+b x^n)^p cosh.jl


text:
y = [1, 2, 3, missing, 3, 2, 1, NaN, 0, 1]
plot(y, marker="o")
ylim(-1, 4)


text:
using Documenter, BioSequences

makedocs()
deploydocs(
    deps = Deps.pip("mkdocs", "pygments", "mkdocs-material"),
    repo = "github.com/BioJulia/BioBridgeR.jl.git",
    julia = "0.6",
    osname = "linux",
)


text:
## A simple self-contained GML parser ##

const GML_REGEX_TOKEN = r"[a-zA-Z0-9\+\-\.]+"
const GML_REGEX_STRING = r"\"[^\"]*\""

mutable struct ReaderState{I<:IO}
    io::I
    cur_line::String
    cur_char::Int
end

match_length(r::Regex, s::ReaderState) = length(match(r, s.cur_line, s.cur_char).match)

function next_token(s::ReaderState)::String
    while s.cur_char > length(s.cur_line)   # get new line if finished
        eof(s.io) && return ""
        line = strip(chomp(readline(s.io)))
        if length(line) == 0 || line[1] == '#'
            continue
        end
        s.cur_line = line
        s.cur_char = 1
    end
    c = s.cur_line[s.cur_char]
    while c == ' ' || c == '\t'             # skip whitespace
        s.cur_char += 1
        c = s.cur_line[s.cur_char]
    end
    if c == '[' || c == ']'                 # different kinds of tokens
        r = s.cur_char:s.cur_char
    elseif c == '"'
        r = s.cur_char:s.cur_char + match_length(GML_REGEX_STRING, s) - 1
    else
        r = s.cur_char:s.cur_char + match_length(GML_REGEX_TOKEN, s) - 1
    end
    s.cur_char = r.stop + 1
    return s.cur_line[r]
end

function read_list(s::ReaderState)
    list = Vector{Tuple{Symbol,Any}}()
    while true
        t1 = next_token(s)
        (t1 == "]" || t1 == "") && break
        t2 = next_token(s)
        (t2 == "]") && error("unpaired key")
        if t2 == "["
            push!(list, (Symbol(t1), read_list(s)))
        else
            push!(list, (Symbol(t1), parse(t2)))
        end
    end
    return list
end

function get_key(list, key, default)
    for (k, v) = list
        k == key && return v
    end
    return default
end

iter_key(list, key) = (v for (k, v) = list if k == key)

# TODO: auto-detect start_id as min(graph.node.id)
# TODO: reorganize this for fewer memory allocations (igraph is noticeably faster)

function make_graph(list::Vector{Tuple{Symbol,Any}}, start_id)
    dir = Bool(get_key(list, :directed, 0))
    g = Graph(directed=dir)
    for node = iter_key(list, :node)
        attrs = Dict{Symbol,Any}()
        id = -1
        prune = Int[]
        for (i, (k, v)) = enumerate(node)
            if k == :id
                id = v
                push!(prune, i)
            elseif !isleaftype(typeof(v))
                push!(prune, i)
            end
        end
        id == -1 && continue
        deleteat!(node, prune)
        for (k, v) = node
            if !hasnodeattr(g, k)
                addnodeattr!(g, k, defval(typeof(v)))
            end
        end
        if id > nodecount(g) - start_id
            addnodes!(g, id - nodecount(g) - start_id)
        end
        addnode!(g; node...)
    end
    for edge = iter_key(list, :edge)
        attrs = Dict{Symbol,Any}()
        src, tgt = -1, -1
        prune = Int[]
        for (i, (k, v)) = enumerate(edge)
            if k == :source
                src = v + 1 - start_id
                push!(prune, i)
            elseif k == :target
                tgt = v + 1 - start_id
                push!(prune, i)
            elseif !isleaftype(typeof(v))
                push!(prune, i)
            end
        end
        deleteat!(edge, prune)
        for (k, v) = edge
            if !hasedgeattr(g, k)
                addedgeattr!(g, k, defval(typeof(v)))
            end
        end
        addedge!(g, src, tgt; edge...)
    end
    return g
end

function read_gml(io::IO; start_id=0, kvargs...)
    r = ReaderState(io, "", 1)
    res = read_list(r)
    graph = get_key(res, :graph, Tuple{Symbol,Any}[])
    return make_graph(graph, start_id)
end

function write_gml(io::IO, g::Graph)
    println(io, "graph [")
    println(io, "\tdirected ", Int(isdirected(g)))
    for n = nodes(g)
        println(io, "\tnode [")
        println(io, "\t\tid ", n)
        println(io, "\t]")
    end
    for e = edges(g)
        println(io, "\tedge [")
        println(io, "\t\tsource ", e.source)
        println(io, "\t\ttarget ", e.target)
        println(io, "\t]")
    end
    println(io, "]")
end