```
X=rcauchy(10)
h <- function(x)
log(1+(x-X[1])^2) +
log(1+(x-X[2])^2) +
log(1+(x-X[3])^2) +
log(1+(x-X[4])^2) +
log(1+(x-X[5])^2) +
log(1+(x-X[6])^2) +
log(1+(x-X[7])^2) +
log(1+(x-X[8])^2) +
log(1+(x-X[9])^2) +
log(1+(x-X[10])^2)
h1 <- function(x)sum(log(1+(x-X)^2))
h(2)
h1(2)
curve(h, from = -8, to = 7,lwd=3)
xa=seq(-8,7,l=101)
y=sapply(xa,function(x)h1(x))
lines(xa,y,col=2,lty=3,lwd=3)
```