klist <- seq(1,100,by=2) r1 <- 1/5 r2 <- 1/100 explist1 <- exp(-r1*klist) explist2 <- exp(-r2*klist) plot(klist, explist1+explist2, main = "sum of exponentials", xlab = "k", type = "h") plot(klist, log(explist1+explist2), main = "log sum of exponentials", xlab = "k", type = "h") par(mfrow = c(2,1)) plot(klist, explist1+explist2, xlab = "k", main = "split into two ranges", type = "h", xlim = c(0,15)) plot(klist, explist1+explist2, xlab = "k", main = "split into two ranges", type = "h", xlim = c(15,100))