public BigDecimal f_integrated(BigDecimal x)
    {
        BigDecimal out = BigDecimal.ZERO;
        for(Term i : terms)
        {