R/huslerReissExpr.R

## This file is not to be edited. It is generated by ../inst/docs/mathnb/exprPrep.R
`huslerReissCopula.cdf.expr` <-
expression(0, exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))))
`huslerReissCopula.cdf.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr2 <- log(u1 * u2)
    .expr4 <- log(u2)/.expr2
    .expr5 <- 1/alpha
    .expr7 <- 1 - .expr4
    .expr10 <- 0.5 * alpha * log(.expr4/.expr7)
    .value <- exp(.expr2 * (.expr4 * pnorm(.expr5 + .expr10) + 
        .expr7 * pnorm(.expr5 - .expr10)))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`huslerReissCopula.cdfDerWrtArg.expr` <-
expression(0, exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (u2/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) - ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))))
`huslerReissCopula.cdfDerWrtArg.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- u1 * u2
    .expr2 <- log(.expr1)
    .expr3 <- log(u2)
    .expr4 <- .expr3/.expr2
    .expr5 <- 1/alpha
    .expr6 <- 0.5 * alpha
    .expr7 <- 1 - .expr4
    .expr8 <- .expr4/.expr7
    .expr10 <- .expr6 * log(.expr8)
    .expr11 <- .expr5 + .expr10
    .expr12 <- pnorm(.expr11)
    .expr14 <- .expr5 - .expr10
    .expr15 <- pnorm(.expr14)
    .expr17 <- .expr4 * .expr12 + .expr7 * .expr15
    .expr20 <- u2/.expr1
    .expr24 <- .expr3 * .expr20/.expr2^2
    .expr33 <- .expr6 * ((.expr24/.expr7 + .expr4 * .expr24/.expr7^2)/.expr8)
    .value <- exp(.expr2 * .expr17) * (.expr20 * .expr17 + .expr2 * 
        (.expr24 * .expr15 + .expr7 * (dnorm(.expr14) * .expr33) - 
            (.expr4 * (dnorm(.expr11) * .expr33) + .expr24 * 
                .expr12)))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`huslerReissCopula.cdfDerWrtPar.expr` <-
expression(0, exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (log(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) - (1 - 
    (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))))
`huslerReissCopula.cdfDerWrtPar.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr2 <- log(u1 * u2)
    .expr4 <- log(u2)/.expr2
    .expr5 <- 1/alpha
    .expr7 <- 1 - .expr4
    .expr9 <- log(.expr4/.expr7)
    .expr10 <- 0.5 * alpha * .expr9
    .expr11 <- .expr5 + .expr10
    .expr14 <- .expr5 - .expr10
    .expr21 <- 0.5 * .expr9
    .expr23 <- 1/alpha^2
    .value <- exp(.expr2 * (.expr4 * pnorm(.expr11) + .expr7 * 
        pnorm(.expr14))) * (.expr2 * (.expr4 * (dnorm(.expr11) * 
        (.expr21 - .expr23)) - .expr7 * (dnorm(.expr14) * (.expr23 + 
        .expr21))))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`huslerReissCopula.pdf.expr` <-
expression(0, exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (u1/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) * (u2/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) - ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))) + exp(log(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * ((1/(u1 * u2) - u2 * 
    u1/(u1 * u2)^2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) + u2/(u1 * u2) * ((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + (u1/(u1 * u2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u1 * u2) * (((1/u2 * 
    (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) - 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + ((1 - (log(u2)/log(u1 * u2))) * ((1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * ((((1/u2 * (u2/(u1 * u2)) + log(u2) * 
    (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
    (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
    u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * u2)) * 
    ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * 
        u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * 
        (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - 
    (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
    u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2))) - (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))))) - ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - 
            u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
            (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
            u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * 
            u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
            u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
            u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2)) - (1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) + (((1/u2 * 
    (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))))))))
`huslerReissCopula.pdf.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- u1 * u2
    .expr2 <- log(.expr1)
    .expr3 <- log(u2)
    .expr4 <- .expr3/.expr2
    .expr5 <- 1/alpha
    .expr6 <- 0.5 * alpha
    .expr7 <- 1 - .expr4
    .expr8 <- .expr4/.expr7
    .expr10 <- .expr6 * log(.expr8)
    .expr11 <- .expr5 + .expr10
    .expr12 <- pnorm(.expr11)
    .expr14 <- .expr5 - .expr10
    .expr15 <- pnorm(.expr14)
    .expr17 <- .expr4 * .expr12 + .expr7 * .expr15
    .expr19 <- exp(.expr2 * .expr17)
    .expr20 <- u1/.expr1
    .expr22 <- 1/u2
    .expr25 <- .expr2^2
    .expr27 <- .expr22/.expr2 - .expr3 * .expr20/.expr25
    .expr29 <- dnorm(.expr11)
    .expr32 <- .expr7^2
    .expr34 <- .expr27/.expr7 + .expr4 * .expr27/.expr32
    .expr36 <- .expr6 * (.expr34/.expr8)
    .expr37 <- .expr29 * .expr36
    .expr40 <- dnorm(.expr14)
    .expr41 <- .expr40 * .expr36
    .expr45 <- .expr27 * .expr12 + .expr4 * .expr37 - (.expr7 * 
        .expr41 + .expr27 * .expr15)
    .expr49 <- u2/.expr1
    .expr51 <- .expr3 * .expr49
    .expr52 <- .expr51/.expr25
    .expr55 <- .expr4 * .expr52
    .expr57 <- .expr52/.expr7 + .expr55/.expr32
    .expr59 <- .expr6 * (.expr57/.expr8)
    .expr60 <- .expr40 * .expr59
    .expr63 <- .expr29 * .expr59
    .expr67 <- .expr52 * .expr15 + .expr7 * .expr60 - (.expr4 * 
        .expr63 + .expr52 * .expr12)
    .expr75 <- 1/.expr1 - u2 * u1/.expr1^2
    .expr89 <- (.expr22 * .expr49 + .expr3 * .expr75)/.expr25 - 
        .expr51 * (2 * (.expr20 * .expr2))/.expr25^2
    .expr115 <- .expr6 * ((.expr89/.expr7 + .expr52 * .expr27/.expr32 + 
        ((.expr27 * .expr52 + .expr4 * .expr89)/.expr32 + .expr55 * 
            (2 * (.expr27 * .expr7))/.expr32^2))/.expr8 - .expr57 * 
        .expr34/.expr8^2)
    .value <- .expr19 * (.expr20 * .expr17 + .expr2 * .expr45) * 
        (.expr49 * .expr17 + .expr2 * .expr67) + .expr19 * (.expr75 * 
        .expr17 + .expr49 * .expr45 + (.expr20 * .expr67 + .expr2 * 
        (.expr89 * .expr15 - .expr52 * .expr41 + (.expr7 * (.expr14 * 
            .expr41 * .expr59 + .expr40 * .expr115) - .expr27 * 
            .expr60) - (.expr27 * .expr63 + .expr4 * (.expr29 * 
            .expr115 - .expr11 * .expr37 * .expr59) + (.expr89 * 
            .expr12 + .expr52 * .expr37)))))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`huslerReissCopula.pdfDerWrtArg.expr` <-
expression(0, (exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (u2/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) - ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))) * (u1/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) + exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) * ((1/(u1 * u2) - u1 * u2/(u1 * 
    u2)^2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) + u1/(u1 * u2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (u2/(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + log(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    ((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) - dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((((log(u2)/log(u1 * u2)) * (1/u2 * (u2/(u1 * u2))/log(u1 * 
            u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
            u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
            (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - 
                (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
            u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + 
            (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
                u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
                u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - 
            (log(u2)/log(u1 * u2))) + (1/u2/log(u1 * u2) - log(u2) * 
            (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * (log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2))) - log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * 
        u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
        (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
    u2)) * (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * 
    (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
    (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
    u2)^2)^2)) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
    u2)))^2 + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2) * (2 * (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
    (log(u2)/log(u1 * u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * 
    u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
    u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * u2))) + 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) - ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))^2)) + 
    (1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1/u2 * (u2/(u1 * 
    u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * 
    u2)^2)/log(u1 * u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
    u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))))))) * (u2/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) - ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))) + exp(log(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (u1/(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) * (u2/(u1 * u2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - u2 * u2/(u1 * u2)^2 * 
    ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
        u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) + (u2/(u1 * u2) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) + (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * u2)) * 
        (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
                u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * 
        alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + log(u1 * u2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (log(u2) * (u2 * 
    u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * u2)) * 
    (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + 
    log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
    u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + 
    ((log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * 
        (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
    (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))^2)) + (1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))))) - ((log(u2)/log(u1 * 
    u2)) * ((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) - 
    dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + 
        log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
            u2)))/(log(u1 * u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - 
        (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * u2)) * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * 
        u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + ((log(u2) * 
        (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * 
        u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))^2))) - log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (log(u2) * (u2 * 
    u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * u2)) * 
    (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))))))) + (exp(log(u1 * u2) * 
    ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
        u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))))) * (u2/(u1 * u2) * 
    ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
        u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) + (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * u2)) * 
        (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
                u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * 
        alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) * ((1/(u1 * u2) - u2 * u1/(u1 * u2)^2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) + u2/(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + (u1/(u1 * u2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u1 * u2) * (((1/u2 * 
    (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) - 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + ((1 - (log(u2)/log(u1 * u2))) * ((1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * ((((1/u2 * (u2/(u1 * u2)) + log(u2) * 
    (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
    (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
    u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * u2)) * 
    ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * 
        u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * 
        (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - 
    (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
    u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2))) - (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))))) - ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - 
            u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
            (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
            u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * 
            u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
            u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
            u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2)) - (1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) + (((1/u2 * 
    (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))))))) + exp(log(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * ((1/(u1 * u2) - u2 * 
    u1/(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (u2/(u1 * u2)^2 + 
    (u2/(u1 * u2)^2 - u2 * u1 * (2 * (u2 * (u1 * u2)))/((u1 * 
        u2)^2)^2)) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) + (u2/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    ((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) - dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((((log(u2)/log(u1 * u2)) * (1/u2 * (u2/(u1 * u2))/log(u1 * 
            u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
            u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
            (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - 
                (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
            u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + 
            (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
                u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
                u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - 
            (log(u2)/log(u1 * u2))) + (1/u2/log(u1 * u2) - log(u2) * 
            (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * (log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2))) - log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * 
        u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
        (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
    u2)) * (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * 
    (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
    (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
    u2)^2)^2)) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
    u2)))^2 + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2) * (2 * (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
    (log(u2)/log(u1 * u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * 
    u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
    u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * u2))) + 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) - ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))^2)) + 
    (1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1/u2 * (u2/(u1 * 
    u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * 
    u2)^2)/log(u1 * u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
    u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) - u2 * u2/(u1 * u2)^2 * ((1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) + ((1/(u1 * u2) - u1 * u2/(u1 * u2)^2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) - ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) + u1/(u1 * u2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (log(u2) * (u2 * 
    u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * u2)) * 
    (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + 
    log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
    u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + 
    ((log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * 
        (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
    (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))^2)) + (1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))))) - ((log(u2)/log(u1 * 
    u2)) * ((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) - 
    dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + 
        log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
            u2)))/(log(u1 * u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - 
        (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * u2)) * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * 
        u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + ((log(u2) * 
        (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * 
        u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))^2))) - log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (log(u2) * (u2 * 
    u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * u2)) * 
    (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))))) + (u2/(u1 * u2) * (((1/u2 * 
    (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) - 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + ((1 - (log(u2)/log(u1 * u2))) * ((1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * ((((1/u2 * (u2/(u1 * u2)) + log(u2) * 
    (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
    (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
    u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * u2)) * 
    ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * 
        u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * 
        (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - 
    (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
    u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2))) - (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))))) - ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - 
            u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
            (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
            u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * 
            u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
            u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
            u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2)) - (1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) + (((1/u2 * 
    (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))))) + log(u1 * u2) * (((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2) * (dnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) - ((log(u2) * (u2/(u1 * u2)^2 + (u2/(u1 * u2)^2 - 
    u2 * u1 * (2 * (u2 * (u1 * u2)))/((u1 * u2)^2)^2)) + 1/u2 * 
    (u2 * u2/(u1 * u2)^2))/log(u1 * u2)^2 + (1/u2 * (u2/(u1 * 
    u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2)) * (2 * 
    (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2 + ((log(u2) * 
    (u2/(u1 * u2)) * (2 * ((1/(u1 * u2) - u1 * u2/(u1 * u2)^2) * 
    log(u1 * u2) + u1/(u1 * u2) * (u2/(u1 * u2)))) - log(u2) * 
    (u2 * u2/(u1 * u2)^2) * (2 * (u1/(u1 * u2) * log(u1 * u2))))/(log(u1 * 
    u2)^2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
    log(u1 * u2))) * (2 * (2 * (u2/(u1 * u2) * log(u1 * u2)) * 
    (log(u1 * u2)^2)))/((log(u1 * u2)^2)^2)^2)) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
        u2)) * (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * 
        (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - 
        log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
            u2)))/(log(u1 * u2)^2)^2)) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (2 * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * 
        u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + ((1/u2 * 
        (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * u2) - 
        u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * (u1/(u1 * 
        u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2))/(1 - (log(u2)/log(u1 * u2))) + (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))) - ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))^2)) + (1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
                u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * 
        alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))))) + (log(u2) * (u2 * 
    u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * u2)) * 
    (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) + (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    ((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
                (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
                u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((((1/u2 * (u2/(u1 * u2)) + log(u2) * 
            (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
            log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
                u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
            u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * 
            u2)) * ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * 
            u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
            (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * 
            u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) * 
            (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2) * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
            (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2))) + (1 - (log(u2)/log(u1 * 
    u2))) * ((0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) - (1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * u2)) * (1/u2 * 
    (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * u2) - 
    u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * (u1/(u1 * 
    u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - 
    (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (2 * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
    (log(u2)/log(u1 * u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * 
    u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
    u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * u2))) + 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) - ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))^2)) + 
    (1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) - 
    (1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
                (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
                u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * alpha * ((((log(u2)/log(u1 * u2)) * 
        (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * 
            (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
        u2)))^2)^2 + ((log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * 
        u2)^2 + log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))^2)) + (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) - (1/u2 * (u2/(u1 * u2))/log(u1 * 
    u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
    u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2)) * (1 - (log(u2)/log(u1 * u2))))) - 
    ((log(u2)/log(u1 * u2)) * (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * 
        u2)^2 + log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)) * (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * u2))))))/((1 - 
    (log(u2)/log(u1 * u2)))^2)^2 - (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
    u2))))) * (2 * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    (1 - (log(u2)/log(u1 * u2)))) * ((1 - (log(u2)/log(u1 * u2)))^2)))/(((1 - 
    (log(u2)/log(u1 * u2)))^2)^2)^2 - (((log(u2)/log(u1 * u2)) * 
    ((log(u2) * (u2/(u1 * u2)^2 + (u2/(u1 * u2)^2 - u2 * u1 * 
        (2 * (u2 * (u1 * u2)))/((u1 * u2)^2)^2)) + 1/u2 * (u2 * 
        u2/(u1 * u2)^2))/log(u1 * u2)^2 + (1/u2 * (u2/(u1 * u2)) + 
        log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2)) * (2 * 
        (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2 + ((log(u2) * 
        (u2/(u1 * u2)) * (2 * ((1/(u1 * u2) - u1 * u2/(u1 * u2)^2) * 
        log(u1 * u2) + u1/(u1 * u2) * (u2/(u1 * u2)))) - log(u2) * 
        (u2 * u2/(u1 * u2)^2) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2))))/(log(u1 * u2)^2)^2 - log(u2) * (u2/(u1 * u2)) * 
        (2 * (u1/(u1 * u2) * log(u1 * u2))) * (2 * (2 * (u2/(u1 * 
        u2) * log(u1 * u2)) * (log(u1 * u2)^2)))/((log(u1 * u2)^2)^2)^2)) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * ((1/u2 * (u2/(u1 * 
        u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
        u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2) + ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
    (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * 
    u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) + 
    (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * 
        u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
        (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)))/(1 - 
    (log(u2)/log(u1 * u2)))^2 + ((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2)) * (2 * (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
    (log(u2)/log(u1 * u2)))^2)^2) - ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * 
    (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
    (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
    u2)^2)^2)) + (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + 
    log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (2 * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * 
            u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + (((log(u2) * 
    (u2/(u1 * u2)^2 + (u2/(u1 * u2)^2 - u2 * u1 * (2 * (u2 * 
        (u1 * u2)))/((u1 * u2)^2)^2)) + 1/u2 * (u2 * u2/(u1 * 
    u2)^2))/log(u1 * u2)^2 + (1/u2 * (u2/(u1 * u2)) + log(u2) * 
    (1/(u1 * u2) - u2 * u1/(u1 * u2)^2)) * (2 * (u2/(u1 * u2) * 
    log(u1 * u2)))/(log(u1 * u2)^2)^2 + ((log(u2) * (u2/(u1 * 
    u2)) * (2 * ((1/(u1 * u2) - u1 * u2/(u1 * u2)^2) * log(u1 * 
    u2) + u1/(u1 * u2) * (u2/(u1 * u2)))) - log(u2) * (u2 * u2/(u1 * 
    u2)^2) * (2 * (u1/(u1 * u2) * log(u1 * u2))))/(log(u1 * u2)^2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2))) * (2 * (2 * (u2/(u1 * u2) * log(u1 * u2)) * (log(u1 * 
        u2)^2)))/((log(u1 * u2)^2)^2)^2))/(1 - (log(u2)/log(u1 * 
    u2))) + ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - 
    u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * 
    u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) + (((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - 
    u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * 
    u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)/(1 - 
    (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * u2)) * 
    ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * 
        u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * 
        (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - 
    (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
    u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))^2 + (((log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * (((log(u2)/log(u1 * u2)) * (1/u2 * (u2/(u1 * u2))/log(u1 * 
    u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
    u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2)) + log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * 
    u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + 
    ((1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * 
        u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
        (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2))/(1 - (log(u2)/log(u1 * u2))) + (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)) + (((log(u2)/log(u1 * u2)) * (log(u2) * (u2 * 
    u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * u2)) * 
    (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
        u2)))^2)^2 + ((log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * 
    u2)^2 + log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)) * 
    ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2 - (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
    (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * 
    ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2) * (2 * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
    (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * 
    ((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))/(((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))^2)^2))) - (1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((((1/u2 * 
    (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2) * (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
        (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2)))) + ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + 
    log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
    u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + 
    ((log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * 
        (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
    (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))^2)) + (1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2 * (u2/(u1 * 
    u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * 
    u2)^2)/log(u1 * u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
    u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)) * (dnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))))) - 
    ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
        ((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
            (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * 
            alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
            u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
            (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))))) - dnorm(1/alpha + 
            0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
                u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
            u2)) * (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * 
            u2)^2 + log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + 
            (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
                (log(u2)/log(u1 * u2)))^2)^2 + ((log(u2) * (u2 * 
            u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * 
            u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * (log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2))) - (1/u2 * 
        (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * u2) - 
        u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * (u1/(u1 * 
        u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) + ((log(u2)/log(u1 * 
        u2)) * ((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * ((((1/u2 * 
        (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * 
        u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * 
        (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2)/(1 - 
        (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2 * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * u2)) * 
        ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * 
            u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * 
            u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * 
        ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2) * (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
        u2)))^2)^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))^2)) + dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * u2)) * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2) - (1/u2 * (u2/(u1 * u2))/log(u1 * 
        u2)^2 + (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
        u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2)) * (1 - (log(u2)/log(u1 * 
        u2))))) - ((log(u2)/log(u1 * u2)) * (log(u2) * (u2 * 
        u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * 
        u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)) * (2 * ((1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - 
        (log(u2)/log(u1 * u2))))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 - 
        (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
            u2)^2) * (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * u2))))) * 
            (2 * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
                (1 - (log(u2)/log(u1 * u2)))) * ((1 - (log(u2)/log(u1 * 
                u2)))^2)))/(((1 - (log(u2)/log(u1 * u2)))^2)^2)^2 - 
        (((log(u2)/log(u1 * u2)) * ((log(u2) * (u2/(u1 * u2)^2 + 
            (u2/(u1 * u2)^2 - u2 * u1 * (2 * (u2 * (u1 * u2)))/((u1 * 
                u2)^2)^2)) + 1/u2 * (u2 * u2/(u1 * u2)^2))/log(u1 * 
            u2)^2 + (1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * 
            u2) - u2 * u1/(u1 * u2)^2)) * (2 * (u2/(u1 * u2) * 
            log(u1 * u2)))/(log(u1 * u2)^2)^2 + ((log(u2) * (u2/(u1 * 
            u2)) * (2 * ((1/(u1 * u2) - u1 * u2/(u1 * u2)^2) * 
            log(u1 * u2) + u1/(u1 * u2) * (u2/(u1 * u2)))) - 
            log(u2) * (u2 * u2/(u1 * u2)^2) * (2 * (u1/(u1 * 
                u2) * log(u1 * u2))))/(log(u1 * u2)^2)^2 - log(u2) * 
            (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2))) * 
            (2 * (2 * (u2/(u1 * u2) * log(u1 * u2)) * (log(u1 * 
                u2)^2)))/((log(u1 * u2)^2)^2)^2)) + log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2 * ((1/u2 * (u2/(u1 * 
            u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
            u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) + ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
            (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + 
                log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * 
                  log(u1 * u2)))/(log(u1 * u2)^2)^2) + (1/u2 * 
            (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * 
            u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
            (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)))/(1 - 
            (log(u2)/log(u1 * u2)))^2 + ((1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * 
            u2)) * ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * 
            u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
            (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
            u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
            u2)))^2)^2) - ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2 * (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * 
        (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - 
        log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
            u2)))/(log(u1 * u2)^2)^2)) + (log(u2) * (u2 * u2/(u1 * 
        u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * u2)) * (2 * 
        (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
        (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (2 * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - (log(u2)/log(u1 * 
        u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2 + (((log(u2) * 
        (u2/(u1 * u2)^2 + (u2/(u1 * u2)^2 - u2 * u1 * (2 * (u2 * 
            (u1 * u2)))/((u1 * u2)^2)^2)) + 1/u2 * (u2 * u2/(u1 * 
        u2)^2))/log(u1 * u2)^2 + (1/u2 * (u2/(u1 * u2)) + log(u2) * 
        (1/(u1 * u2) - u2 * u1/(u1 * u2)^2)) * (2 * (u2/(u1 * 
        u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2 + ((log(u2) * 
        (u2/(u1 * u2)) * (2 * ((1/(u1 * u2) - u1 * u2/(u1 * u2)^2) * 
        log(u1 * u2) + u1/(u1 * u2) * (u2/(u1 * u2)))) - log(u2) * 
        (u2 * u2/(u1 * u2)^2) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2))))/(log(u1 * u2)^2)^2 - log(u2) * (u2/(u1 * u2)) * 
        (2 * (u1/(u1 * u2) * log(u1 * u2))) * (2 * (2 * (u2/(u1 * 
        u2) * log(u1 * u2)) * (log(u1 * u2)^2)))/((log(u1 * u2)^2)^2)^2))/(1 - 
        (log(u2)/log(u1 * u2))) + ((1/u2 * (u2/(u1 * u2)) + log(u2) * 
        (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
        log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
            u2)))/(log(u1 * u2)^2)^2) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)))/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) + (((1/u2 * (u2/(u1 * 
        u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
        u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * 
        u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
        u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
        u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))^2 + (((log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2) * (((log(u2)/log(u1 * u2)) * 
        (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * 
            u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
            (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
        u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + 
        (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
            u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
        u2))) + (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)) + (((log(u2)/log(u1 * u2)) * 
        (log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * 
            (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
        u2)))^2)^2 + ((log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * 
        u2)^2 + log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))^2 - (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2) * (2 * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2) * ((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))/(((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))^2)^2))) - (((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * ((1/alpha + 0.5 * 
        alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))))) - dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * u2)) * 
        (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * (1/(u1 * 
            u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - log(u2) * 
            (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2)) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
        u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + 
        (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
            u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
            u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
        u2))) + (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))) - ((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))^2))) - 0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
                (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
                u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) - (1/alpha + 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
                u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * 
        alpha * ((((log(u2)/log(u1 * u2)) * (log(u2) * (u2 * 
        u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * 
        u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2) * (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2 * (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
        u2)))^2)^2 + ((log(u2) * (u2 * u2/(u1 * u2)^2)/log(u1 * 
        u2)^2 + log(u2) * (u2/(u1 * u2)) * (2 * (u2/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
        (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))^2)))) - log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            ((((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - 
                u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
                (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
                u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
                u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
                (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                  u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
                u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
                (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * 
                u2)) * ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * 
                u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
                log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
                  log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
                u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * 
                (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * 
                u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
                (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
                u2)))^2)^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
                u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
                (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
                (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
                (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * 
                u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
                (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
                (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                  u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))^2)) - (1/alpha + 
            0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
                u2))))) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
                u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * 
            alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))) + (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        ((1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
            (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * 
            alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
            u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
            (log(u2)/log(u1 * u2))))))) * (0.5 * alpha * (((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))))) - dnorm(1/alpha + 
            0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
                u2))))) * (0.5 * alpha * ((((log(u2)/log(u1 * 
            u2)) * (1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + (log(u2) * 
            (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * u2)^2 - 
            log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * u2) * log(u1 * 
                u2)))/(log(u1 * u2)^2)^2)) + log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - log(u2) * 
            (u1/(u1 * u2))/log(u1 * u2)^2))/(1 - (log(u2)/log(u1 * 
            u2)))^2 + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
            (2 * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1 - 
                (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
            u2)))^2)^2 + ((1/u2 * (u2/(u1 * u2))/log(u1 * u2)^2 + 
            (log(u2) * (1/(u1 * u2) - u1 * u2/(u1 * u2)^2)/log(u1 * 
                u2)^2 - log(u2) * (u1/(u1 * u2)) * (2 * (u2/(u1 * 
                u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - 
            (log(u2)/log(u1 * u2))) + (1/u2/log(u1 * u2) - log(u2) * 
            (u1/(u1 * u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * (log(u2) * 
            (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2))) - (log(u2) * 
        (u2 * u2/(u1 * u2)^2)/log(u1 * u2)^2 + log(u2) * (u2/(u1 * 
        u2)) * (2 * (u2/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) - (((1/u2 * 
        (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * 
        u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * 
        (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2) * 
        (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
                u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) + ((log(u2) * 
        (u2/(u1 * u2)^2 + (u2/(u1 * u2)^2 - u2 * u1 * (2 * (u2 * 
            (u1 * u2)))/((u1 * u2)^2)^2)) + 1/u2 * (u2 * u2/(u1 * 
        u2)^2))/log(u1 * u2)^2 + (1/u2 * (u2/(u1 * u2)) + log(u2) * 
        (1/(u1 * u2) - u2 * u1/(u1 * u2)^2)) * (2 * (u2/(u1 * 
        u2) * log(u1 * u2)))/(log(u1 * u2)^2)^2 + ((log(u2) * 
        (u2/(u1 * u2)) * (2 * ((1/(u1 * u2) - u1 * u2/(u1 * u2)^2) * 
        log(u1 * u2) + u1/(u1 * u2) * (u2/(u1 * u2)))) - log(u2) * 
        (u2 * u2/(u1 * u2)^2) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2))))/(log(u1 * u2)^2)^2 - log(u2) * (u2/(u1 * u2)) * 
        (2 * (u1/(u1 * u2) * log(u1 * u2))) * (2 * (2 * (u2/(u1 * 
        u2) * log(u1 * u2)) * (log(u1 * u2)^2)))/((log(u1 * u2)^2)^2)^2)) * 
        pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
            (log(u2)/log(u1 * u2))))))))))))))
`huslerReissCopula.pdfDerWrtArg.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- u1 * u2
    .expr2 <- log(.expr1)
    .expr3 <- log(u2)
    .expr4 <- .expr3/.expr2
    .expr5 <- 1/alpha
    .expr6 <- 0.5 * alpha
    .expr7 <- 1 - .expr4
    .expr8 <- .expr4/.expr7
    .expr10 <- .expr6 * log(.expr8)
    .expr11 <- .expr5 + .expr10
    .expr12 <- pnorm(.expr11)
    .expr14 <- .expr5 - .expr10
    .expr15 <- pnorm(.expr14)
    .expr17 <- .expr4 * .expr12 + .expr7 * .expr15
    .expr19 <- exp(.expr2 * .expr17)
    .expr20 <- u2/.expr1
    .expr22 <- .expr3 * .expr20
    .expr23 <- .expr2^2
    .expr24 <- .expr22/.expr23
    .expr26 <- dnorm(.expr14)
    .expr28 <- .expr4 * .expr24
    .expr29 <- .expr7^2
    .expr31 <- .expr24/.expr7 + .expr28/.expr29
    .expr33 <- .expr6 * (.expr31/.expr8)
    .expr34 <- .expr26 * .expr33
    .expr37 <- dnorm(.expr11)
    .expr38 <- .expr37 * .expr33
    .expr42 <- .expr24 * .expr15 + .expr7 * .expr34 - (.expr4 * 
        .expr38 + .expr24 * .expr12)
    .expr44 <- .expr20 * .expr17 + .expr2 * .expr42
    .expr45 <- .expr19 * .expr44
    .expr46 <- u1/.expr1
    .expr48 <- 1/u2
    .expr50 <- .expr3 * .expr46
    .expr52 <- .expr48/.expr2 - .expr50/.expr23
    .expr55 <- .expr4 * .expr52
    .expr57 <- .expr52/.expr7 + .expr55/.expr29
    .expr59 <- .expr6 * (.expr57/.expr8)
    .expr60 <- .expr37 * .expr59
    .expr63 <- .expr26 * .expr59
    .expr67 <- .expr52 * .expr12 + .expr4 * .expr60 - (.expr7 * 
        .expr63 + .expr52 * .expr15)
    .expr69 <- .expr46 * .expr17 + .expr2 * .expr67
    .expr71 <- 1/.expr1
    .expr72 <- .expr1^2
    .expr74 <- .expr71 - .expr1/.expr72
    .expr76 <- .expr46 * .expr42
    .expr78 <- .expr20 * .expr67
    .expr79 <- .expr11 * .expr38
    .expr81 <- .expr48 * .expr20
    .expr86 <- 2 * (.expr20 * .expr2)
    .expr88 <- .expr23^2
    .expr91 <- .expr81/.expr23 + (.expr3 * .expr74/.expr23 - 
        .expr50 * .expr86/.expr88)
    .expr93 <- .expr24 * .expr52
    .expr97 <- 2 * (.expr24 * .expr7)
    .expr99 <- .expr29^2
    .expr103 <- .expr52 * .expr24
    .expr106 <- (.expr4 * .expr91 + .expr93)/.expr29 + .expr55 * 
        .expr97/.expr99 + (.expr91/.expr7 + .expr103/.expr29)
    .expr109 <- .expr8^2
    .expr112 <- .expr6 * (.expr106/.expr8 - .expr57 * .expr31/.expr109)
    .expr114 <- .expr79 * .expr59 - .expr37 * .expr112
    .expr116 <- .expr24 * .expr60
    .expr118 <- .expr52 * .expr38
    .expr122 <- .expr24 * .expr63
    .expr124 <- .expr14 * .expr34
    .expr126 <- .expr26 * .expr112 + .expr124 * .expr59
    .expr129 <- .expr52 * .expr34
    .expr133 <- .expr4 * .expr114 - .expr116 - (.expr118 + .expr91 * 
        .expr12) - (.expr122 - .expr7 * .expr126 + (.expr129 - 
        .expr91 * .expr15))
    .expr141 <- .expr20 * .expr42
    .expr143 <- u2 * u2/.expr72
    .expr146 <- .expr24 * .expr34
    .expr147 <- .expr3 * .expr143
    .expr151 <- .expr147/.expr23 + .expr22 * .expr86/.expr88
    .expr155 <- .expr24 * .expr24
    .expr156 <- .expr4 * .expr151 + .expr155
    .expr164 <- .expr156/.expr29 + .expr28 * .expr97/.expr99 + 
        (.expr151/.expr7 + .expr155/.expr29)
    .expr169 <- .expr6 * (.expr164/.expr8 - .expr31 * .expr31/.expr109)
    .expr172 <- .expr26 * .expr169 + .expr124 * .expr33
    .expr178 <- .expr79 * .expr33 - .expr37 * .expr169
    .expr180 <- .expr24 * .expr38
    .expr185 <- .expr146 - .expr151 * .expr15 + (.expr146 - .expr7 * 
        .expr172) - (.expr4 * .expr178 - .expr180 - (.expr180 + 
        .expr151 * .expr12))
    .expr191 <- u2 * u1
    .expr193 <- .expr71 - .expr191/.expr72
    .expr197 <- .expr81 + .expr3 * .expr193
    .expr200 <- 2 * (.expr46 * .expr2)
    .expr201 <- .expr22 * .expr200
    .expr203 <- .expr197/.expr23 - .expr201/.expr88
    .expr206 <- .expr14 * .expr63
    .expr212 <- .expr103 + .expr4 * .expr203
    .expr215 <- 2 * (.expr52 * .expr7)
    .expr216 <- .expr28 * .expr215
    .expr219 <- .expr203/.expr7 + .expr93/.expr29 + (.expr212/.expr29 + 
        .expr216/.expr99)
    .expr221 <- .expr31 * .expr57
    .expr224 <- .expr6 * (.expr219/.expr8 - .expr221/.expr109)
    .expr226 <- .expr206 * .expr33 + .expr26 * .expr224
    .expr231 <- .expr11 * .expr60
    .expr233 <- .expr37 * .expr224 - .expr231 * .expr33
    .expr239 <- .expr203 * .expr15 - .expr122 + (.expr7 * .expr226 - 
        .expr129) - (.expr118 + .expr4 * .expr233 + (.expr203 * 
        .expr12 + .expr116))
    .expr245 <- u2/.expr72
    .expr252 <- .expr245 + (.expr245 - .expr191 * (2 * (u2 * 
        .expr1))/.expr72^2)
    .expr285 <- (.expr3 * .expr252 + .expr48 * .expr143)/.expr23 + 
        .expr197 * .expr86/.expr88 + ((.expr22 * (2 * (.expr74 * 
        .expr2 + .expr46 * .expr20)) - .expr147 * .expr200)/.expr88 - 
        .expr201 * (2 * (.expr86 * .expr23))/.expr88^2)
    .expr352 <- .expr6 * (((.expr28 * (2 * (.expr103 - .expr91 * 
        .expr7)) - .expr156 * .expr215)/.expr99 - .expr216 * 
        (2 * (.expr97 * .expr29))/.expr99^2 - ((.expr4 * .expr285 + 
        .expr24 * .expr203 + (.expr52 * .expr151 + .expr91 * 
        .expr24))/.expr29 + .expr212 * .expr97/.expr99) - ((.expr24 * 
        .expr91 + .expr151 * .expr52)/.expr29 + .expr93 * .expr97/.expr99 + 
        (.expr285/.expr7 + .expr203 * .expr24/.expr29)))/.expr8 + 
        .expr219 * .expr31/.expr109 + ((.expr31 * .expr106 + 
        .expr164 * .expr57)/.expr109 - .expr221 * (2 * (.expr31 * 
        .expr8))/.expr109^2))
    .value <- (.expr45 * .expr69 + .expr19 * (.expr74 * .expr17 + 
        .expr76 + (.expr78 + .expr2 * .expr133))) * .expr44 + 
        .expr19 * .expr69 * (.expr141 - .expr143 * .expr17 + 
            (.expr141 + .expr2 * .expr185)) + (.expr45 * (.expr193 * 
        .expr17 + .expr78 + (.expr76 + .expr2 * .expr239)) + 
        .expr19 * (.expr193 * .expr42 - .expr252 * .expr17 + 
            (.expr20 * .expr133 - .expr143 * .expr67) + (.expr74 * 
            .expr42 + .expr46 * .expr185 + (.expr20 * .expr239 + 
            .expr2 * (.expr203 * .expr34 - .expr285 * .expr15 + 
                (.expr24 * .expr126 + .expr151 * .expr63) + (.expr24 * 
                .expr226 + .expr7 * ((.expr33 * .expr63 - .expr14 * 
                .expr126) * .expr33 - .expr206 * .expr169 + (.expr26 * 
                .expr352 - .expr124 * .expr224)) + (.expr52 * 
                .expr172 + .expr91 * .expr34)) - (.expr52 * .expr178 - 
                .expr91 * .expr38 + (.expr4 * (.expr79 * .expr224 + 
                .expr37 * .expr352 - ((.expr11 * .expr114 - .expr33 * 
                .expr60) * .expr33 - .expr231 * .expr169)) - 
                .expr24 * .expr233) + (.expr24 * .expr114 - .expr151 * 
                .expr60 - (.expr203 * .expr38 + .expr285 * .expr12))))))))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})
`huslerReissCopula.pdfDerWrtPar.expr` <-
expression(0, (exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (log(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) - (1 - 
    (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) * (u1/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) + exp(log(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * u2))) * 
    pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) * (u1/(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) - (1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (1/alpha^2 + 0.5 * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    log(u1 * u2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))) - 1/alpha^2)) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) - (1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))) - 1/alpha^2)) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
        u2))) * ((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) * (0.5 * alpha * 
        (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
            u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) - (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))))) * (u2/(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * (log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) - ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))))) + exp(log(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * (u1/(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) + log(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - (log(u2)/log(u1 * 
    u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * pnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) * (u2/(u1 * u2) * ((log(u2)/log(u1 * u2)) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) - (1 - 
    (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + log(u1 * u2) * ((1 - (log(u2)/log(u1 * u2))) * 
    ((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) - log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) - ((log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) - (1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) * (0.5 * 
    alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2))))) + (exp(log(u1 * 
    u2) * ((log(u2)/log(u1 * u2)) * pnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) + 
    (1 - (log(u2)/log(u1 * u2))) * pnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))))) * 
    (log(u1 * u2) * ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))) - 1/alpha^2)) - (1 - (log(u2)/log(u1 * 
        u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (1/alpha^2 + 0.5 * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))))) * 
    ((1/(u1 * u2) - u2 * u1/(u1 * u2)^2) * ((log(u2)/log(u1 * 
        u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
        u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) + u2/(u1 * u2) * 
        ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
            u2)^2) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) + (log(u2)/log(u1 * 
            u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
                u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((1 - 
            (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 0.5 * 
            alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
            (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
            log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) + (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2) * pnorm(1/alpha - 0.5 * alpha * 
            log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
                u2))))))) + (u1/(u1 * u2) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
        u2))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) - ((log(u2)/log(u1 * 
        u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * pnorm(1/alpha + 0.5 * 
        alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) + log(u1 * u2) * (((1/u2 * (u2/(u1 * u2)) + 
        log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
        u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) - log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
        (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
                u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) + ((1 - 
        (log(u2)/log(u1 * u2))) * ((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * ((((1/u2 * (u2/(u1 * u2)) + log(u2) * 
            (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
            log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
                u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
            u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * 
            u2)) * ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * 
            u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
            (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
            u2)^2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + (log(u2)/log(u1 * 
            u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) * 
            (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2) * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
            (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * 
            u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))^2))) - (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha - 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))))) - ((1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) + (log(u2)/log(u1 * u2)) * 
        (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            ((((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - 
                u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * 
                (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
                u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * 
                u2))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
                (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                  u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2 + (((1/u2/log(u1 * 
                u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
                (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2) + (log(u2)/log(u1 * 
                u2)) * ((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * 
                u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
                log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
                  log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
                u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * 
                (u2/(u1 * u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * 
                u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * 
                (1 - (log(u2)/log(u1 * u2)))))/((1 - (log(u2)/log(u1 * 
                u2)))^2)^2))/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
                u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
                (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
                (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
                (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * 
                u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
                (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
                (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                  u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))^2)) - (1/alpha + 
            0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
                u2))))) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * 
            (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
                u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
                u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
                u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
                u2))/(1 - (log(u2)/log(u1 * u2))))))) * (0.5 * 
            alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) + (((1/u2 * (u2/(u1 * u2)) + log(u2) * 
        (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
        log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
            u2)))/(log(u1 * u2)^2)^2) * pnorm(1/alpha + 0.5 * 
        alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))))))) + exp(log(u1 * u2) * ((log(u2)/log(u1 * 
    u2)) * pnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) + (1 - (log(u2)/log(u1 * 
    u2))) * pnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) * ((1/(u1 * u2) - u2 * 
    u1/(u1 * u2)^2) * ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) - 1/alpha^2)) - (1 - (log(u2)/log(u1 * u2))) * (dnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2))))))) + u2/(u1 * u2) * ((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) - 1/alpha^2)) + (log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) - (1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) * (0.5 * 
    alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))))) - ((1 - (log(u2)/log(u1 * u2))) * ((1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (1/alpha^2 + 0.5 * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) * 
    (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1/u2/log(u1 * u2) - 
    log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2) * (dnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2)))))))) + (u1/(u1 * u2) * ((1 - (log(u2)/log(u1 * 
    u2))) * ((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) + 
    dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * ((log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) - log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (1/alpha^2 + 0.5 * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) - 
    ((log(u2)/log(u1 * u2)) * (dnorm(1/alpha + 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - 
            (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
            (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
            u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))) - (1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 
        0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))) * (0.5 * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))) - 1/alpha^2)) * (0.5 * alpha * 
        ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
            u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
            u2))/(1 - (log(u2)/log(u1 * u2))))))) + log(u2) * 
        (u2/(u1 * u2))/log(u1 * u2)^2 * (dnorm(1/alpha + 0.5 * 
        alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))) - 1/alpha^2)))) + log(u1 * u2) * ((1 - (log(u2)/log(u1 * 
    u2))) * (((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * ((1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) * (0.5 * alpha * 
    (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) + dnorm(1/alpha - 
    0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))) * (0.5 * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) - (1/alpha^2 + 0.5 * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) + 
    (1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
                (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
                u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))) + ((1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))))) * (0.5 * alpha * 
    ((((1/u2 * (u2/(u1 * u2)) + log(u2) * (1/(u1 * u2) - u2 * 
        u1/(u1 * u2)^2))/log(u1 * u2)^2 - log(u2) * (u2/(u1 * 
        u2)) * (2 * (u1/(u1 * u2) * log(u1 * u2)))/(log(u1 * 
        u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2 * (1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * 
        u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
        u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * 
        log(u1 * u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2) * (2 * ((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * 
        u2)))))/((1 - (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * 
        (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2))))^2)) + dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * ((((1/u2 * (u2/(u1 * 
    u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2) * (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
        (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2)))) - (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2) * ((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2)))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * 
    u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
    u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) + 
    dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * ((log(u2) * (u2/(u1 * 
        u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))))) - (((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2) * (dnorm(1/alpha - 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) + log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * 
    ((1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha - 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (1/alpha^2 + 0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2)))))) * (0.5 * alpha * (((1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))) + dnorm(1/alpha - 0.5 * alpha * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * (((1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - 
        log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))))))) - ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * ((log(u2) * 
    (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * u2))) + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) - (1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) * (0.5 * 
    alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (log(u2)/log(u1 * 
    u2)) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * ((((1/u2 * (u2/(u1 * 
    u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2) * (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
        (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2)) - (1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) - 1/alpha^2)) * (0.5 * alpha * ((((1/u2 * (u2/(u1 * 
    u2)) + log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * 
    u2)^2 - log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
    u2)))/(log(u1 * u2)^2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
    log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2 * (1/u2/log(u1 * 
        u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
        u2)))^2 + (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
    u2))/log(u1 * u2)^2) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2) + (log(u2)/log(u1 * u2)) * ((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2))/(1 - (log(u2)/log(u1 * u2)))^2 + 
    (log(u2)/log(u1 * u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2) * (2 * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
        u2))/log(u1 * u2)^2) * (1 - (log(u2)/log(u1 * u2)))))/((1 - 
        (log(u2)/log(u1 * u2)))^2)^2))/((log(u2)/log(u1 * u2))/(1 - 
    (log(u2)/log(u1 * u2)))) - (log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2) * ((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))^2)) - (((0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))) - 1/alpha^2) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * alpha * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))))) + (1/alpha + 0.5 * 
    alpha * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))) * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) - (1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) * (0.5 * 
    alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2)))))))) * (0.5 * alpha * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2)))))) + 
    (1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (dnorm(1/alpha + 0.5 * alpha * 
        log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
        (0.5 * alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * 
            u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2))) + 
            (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
                (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
                u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
            u2))))))) * (0.5 * ((log(u2) * (u2/(u1 * u2))/log(u1 * 
        u2)^2/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * 
        u2)) * (log(u2) * (u2/(u1 * u2))/log(u1 * u2)^2)/(1 - 
        (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2)))))))) + (((1/u2 * (u2/(u1 * u2)) + 
    log(u2) * (1/(u1 * u2) - u2 * u1/(u1 * u2)^2))/log(u1 * u2)^2 - 
    log(u2) * (u2/(u1 * u2)) * (2 * (u1/(u1 * u2) * log(u1 * 
        u2)))/(log(u1 * u2)^2)^2) * (dnorm(1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (0.5 * log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
        u2)))) - 1/alpha^2)) + log(u2) * (u2/(u1 * u2))/log(u1 * 
    u2)^2 * (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2))))) * (0.5 * (((1/u2/log(u1 * 
    u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * 
    u2))) + (log(u2)/log(u1 * u2)) * (1/u2/log(u1 * u2) - log(u2) * 
    (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * 
    u2))/(1 - (log(u2)/log(u1 * u2)))))) - (1/alpha + 0.5 * alpha * 
    log((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * u2))))) * 
    (dnorm(1/alpha + 0.5 * alpha * log((log(u2)/log(u1 * u2))/(1 - 
        (log(u2)/log(u1 * u2))))) * (0.5 * log((log(u2)/log(u1 * 
        u2))/(1 - (log(u2)/log(u1 * u2)))) - 1/alpha^2)) * (0.5 * 
    alpha * (((1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * 
    u2)^2)/(1 - (log(u2)/log(u1 * u2))) + (log(u2)/log(u1 * u2)) * 
    (1/u2/log(u1 * u2) - log(u2) * (u1/(u1 * u2))/log(u1 * u2)^2)/(1 - 
    (log(u2)/log(u1 * u2)))^2)/((log(u2)/log(u1 * u2))/(1 - (log(u2)/log(u1 * 
    u2))))))))))))))
`huslerReissCopula.pdfDerWrtPar.algr` <-
expression({
    .value <- 0
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
}, {
    .expr1 <- u1 * u2
    .expr2 <- log(.expr1)
    .expr3 <- log(u2)
    .expr4 <- .expr3/.expr2
    .expr5 <- 1/alpha
    .expr6 <- 0.5 * alpha
    .expr7 <- 1 - .expr4
    .expr8 <- .expr4/.expr7
    .expr9 <- log(.expr8)
    .expr10 <- .expr6 * .expr9
    .expr11 <- .expr5 + .expr10
    .expr12 <- pnorm(.expr11)
    .expr14 <- .expr5 - .expr10
    .expr15 <- pnorm(.expr14)
    .expr17 <- .expr4 * .expr12 + .expr7 * .expr15
    .expr19 <- exp(.expr2 * .expr17)
    .expr20 <- dnorm(.expr11)
    .expr21 <- 0.5 * .expr9
    .expr23 <- 1/alpha^2
    .expr24 <- .expr21 - .expr23
    .expr25 <- .expr20 * .expr24
    .expr27 <- dnorm(.expr14)
    .expr28 <- .expr23 + .expr21
    .expr29 <- .expr27 * .expr28
    .expr31 <- .expr4 * .expr25 - .expr7 * .expr29
    .expr33 <- .expr19 * (.expr2 * .expr31)
    .expr34 <- u1/.expr1
    .expr36 <- 1/u2
    .expr39 <- .expr2^2
    .expr41 <- .expr36/.expr2 - .expr3 * .expr34/.expr39
    .expr45 <- .expr7^2
    .expr47 <- .expr41/.expr7 + .expr4 * .expr41/.expr45
    .expr48 <- .expr47/.expr8
    .expr49 <- .expr6 * .expr48
    .expr50 <- .expr20 * .expr49
    .expr53 <- .expr27 * .expr49
    .expr57 <- .expr41 * .expr12 + .expr4 * .expr50 - (.expr7 * 
        .expr53 + .expr41 * .expr15)
    .expr59 <- .expr34 * .expr17 + .expr2 * .expr57
    .expr63 <- 0.5 * .expr48
    .expr65 <- .expr11 * .expr25
    .expr67 <- .expr20 * .expr63 - .expr65 * .expr49
    .expr70 <- .expr14 * .expr29
    .expr73 <- .expr70 * .expr49 + .expr27 * .expr63
    .expr77 <- .expr41 * .expr25 + .expr4 * .expr67 - (.expr7 * 
        .expr73 - .expr41 * .expr29)
    .expr82 <- u2/.expr1
    .expr84 <- .expr3 * .expr82
    .expr85 <- .expr84/.expr39
    .expr88 <- .expr4 * .expr85
    .expr90 <- .expr85/.expr7 + .expr88/.expr45
    .expr91 <- .expr90/.expr8
    .expr92 <- .expr6 * .expr91
    .expr93 <- .expr27 * .expr92
    .expr96 <- .expr20 * .expr92
    .expr100 <- .expr85 * .expr15 + .expr7 * .expr93 - (.expr4 * 
        .expr96 + .expr85 * .expr12)
    .expr107 <- 0.5 * .expr91
    .expr109 <- .expr70 * .expr92 + .expr27 * .expr107
    .expr115 <- .expr20 * .expr107 - .expr65 * .expr92
    .expr119 <- .expr7 * .expr109 - .expr85 * .expr29 - (.expr4 * 
        .expr115 + .expr85 * .expr25)
    .expr128 <- 1/.expr1 - u2 * u1/.expr1^2
    .expr142 <- (.expr36 * .expr82 + .expr3 * .expr128)/.expr39 - 
        .expr84 * (2 * (.expr34 * .expr2))/.expr39^2
    .expr146 <- .expr14 * .expr53
    .expr167 <- (.expr142/.expr7 + .expr85 * .expr41/.expr45 + 
        ((.expr41 * .expr85 + .expr4 * .expr142)/.expr45 + .expr88 * 
            (2 * (.expr41 * .expr7))/.expr45^2))/.expr8 - .expr90 * 
        .expr47/.expr8^2
    .expr168 <- .expr6 * .expr167
    .expr177 <- .expr11 * .expr50
    .expr202 <- 0.5 * .expr167
    .value <- (.expr33 * .expr59 + .expr19 * (.expr34 * .expr31 + 
        .expr2 * .expr77)) * (.expr82 * .expr17 + .expr2 * .expr100) + 
        .expr19 * .expr59 * (.expr82 * .expr31 + .expr2 * .expr119) + 
        (.expr33 * (.expr128 * .expr17 + .expr82 * .expr57 + 
            (.expr34 * .expr100 + .expr2 * (.expr142 * .expr15 - 
                .expr85 * .expr53 + (.expr7 * (.expr146 * .expr92 + 
                .expr27 * .expr168) - .expr41 * .expr93) - (.expr41 * 
                .expr96 + .expr4 * (.expr20 * .expr168 - .expr177 * 
                .expr92) + (.expr142 * .expr12 + .expr85 * .expr50))))) + 
            .expr19 * (.expr128 * .expr31 + .expr82 * .expr77 + 
                (.expr34 * .expr119 + .expr2 * (.expr7 * ((.expr14 * 
                  .expr73 - .expr28 * .expr53) * .expr92 + .expr146 * 
                  .expr107 + (.expr70 * .expr168 + .expr27 * 
                  .expr202)) - .expr41 * .expr109 - (.expr142 * 
                  .expr29 + .expr85 * .expr73) - (.expr41 * .expr115 + 
                  .expr4 * (.expr20 * .expr202 - .expr65 * .expr168 - 
                    ((.expr24 * .expr50 + .expr11 * .expr67) * 
                      .expr92 + .expr177 * .expr107)) + (.expr142 * 
                  .expr25 + .expr85 * .expr67))))))
    .grad <- array(0, c(length(.value), 1L), list(NULL, c("s")))
    .grad[, "s"] <- 0
    attr(.value, "gradient") <- .grad
    .value
})

Try the copula package in your browser

Any scripts or data that you put into this service are public.

copula documentation built on Sept. 11, 2024, 7:48 p.m.