I know that any [a,b] are compact. However, if it is compact, then $f(\,[0,1]\,)$ with the continuous function $f(x)=\ln(x)$ would be compact too, but $f(\,[0,1]\,)=(-\infty,0]$ which is not compact. What is wrong with that?
For second question, I think $(0,1]=[0,1]$ and it is compact in $\mathbb R^{+}$ considering $f$ is defined on $\mathbb R^+$. But with the same logic in first question, it seems not compact. What is wrong with that?