# Definir la FDP # Integrar f sobre el dominio # Definir la FDP f <- function(x){x/4*exp(-x^2/8)} # Integrar f sobre el dominio integrate(f, 0, Inf)$value test_function_definition("f", function_test = { test_expression_result("f(1)") test_expression_result("f(4)") test_expression_result("f(10)") test_expression_result("f(100)") }) test_function("integrate", args = c("f", "lower", "upper"), eval = c(F, T, T)) test_output_contains("1", incorrect_msg = "¿Accediste al valor de la integral?")