Suppose that $f(x)=x^2$. Find $f((-1,\:1])$.
$y\in f((-1,\:1])$ iff $y=f(x)$ for some $x\in(-1\:1]$
iff $y=x^2$ for some $x\in(-1\:1]$
iff $y=x^2$ for some $x$ such that $-1<x≤1$
iff $y=x^2$ for some $x$ such that $-1<x<0$ or $0≤x≤1$
iff $y=x^2$ for some $x$ such that $0<x^2<1$ or $0≤x^2≤1$
iff $y=x^2$ for some $x$ such that $0≤x^2≤1$
iff $y=x^2$ and $0≤y≤1$.
Hence $f((-1\:1])=[0,\:1]$.
The forward direction appears valid, but I’m not entirely sure about the converse statements. It seems line $5$ does not imply line $4$.