Just needed a double check on my working to see if I am on the right track!

Prove that $\displaystyle f(x) = x^4$ is continuous at $\displaystyle x = 0$.

$\displaystyle | f(x) - f(0) | = | x^4 |$

Given $\displaystyle \epsilon > 0$, we have $\displaystyle | f(x) - f(0)| < \epsilon$, provided that $\displaystyle | x^4 | < \epsilon$

Therefore, $\displaystyle \delta = \epsilon$.

Is this correct?

And I have another question about continuity!

Let $\displaystyle {Q}$ denotes the set of rational numbers, consider the function

$\displaystyle g(x)=\left\{\begin{array}{cc}sin x, &\mbox{ } x \in {Q}\\x, &\mbox{ } x \notin {Q}\end{array}\right.$

(i) Prove that g(x) is continuous at x=0.

(ii) State the least upper bound for g on the interval [0,1] and state whether g attains a maximum on [0,1].Give clear explanations to justify your statements.