Show that the graph of $y=x^3\sin(\pi/x)$ extends to a smooth arc Here's the problem:

Let $y(x)$ be a real-valued function defined on the interval $x\in [0,1]$ by means of the equation
  $$y(x)= \left\{
\begin{array}{lr}
       x^3\sin(\frac{\pi}{x}) \;\;\;\mathbb{for}  & x \in (0,1]
       \\0 \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\mathbb{for} & x=0
       \end{array}
   \right.$$
(a) Show that $z=x+iy(x)$ represent an arc $C$ that intersects the real axis at points $z=\frac{1}{n}$ $\forall n \in \mathbb{Z^+}$, and $z=0$
(b) Verify that the arc $C$ in part (a) is, in fact, a smooth arc.

Okay so I figured out part (a). Now, I think I figured out part (b), but am not sure if my logic was valid. Here's the work:

Attempted work for (b)
In order for an arc to be smooth, $z'$ must be continuous on $[a,b]$ and non-zero on $(a,b)$. Since $z=x+iy(x)$, differentiating our result on $(0,1]$ will give us 
  $$z'=1+i(3x^2\sin(\frac{\pi}{x})-\pi x\cos(\frac{\pi}{x}))$$ 
  Clearly, $x'$ is continuous on $[0,1]$ and non-zero on $(0,1)$ since any value we plug in will just give us $1$. $y'(x)$ is clearly defined for all values NOT $0$, so it is certainly continuous on $(0,1]$. Further, because of the relation between cosine and sine, it follows that $y'$ is non-zero on $(0,1)$ since sine and cosine will never be $0$ at the same time. We wish to show that $y'$ is continuous at $0$.
Suppose that $y' \to 0$ when $x \to 0$. Then given $\epsilon >0$, we wish to show $\exists \delta >0$ s.t $\forall x \in (0,1]$ and 
  $$|x-0|<\delta \implies |3x^2\sin(\frac{\pi}{x})-\pi x\cos(\frac{\pi}{x})-0|<\epsilon$$
  Observe that since $|sin(x)| \leq 1$, $|cos(x)| \leq 1$, we can extend this to $|sin(\frac{\pi}{x})|,|cos(\frac{\pi}{x})|$. Thus, observe that
  $$|3x^2\sin(\frac{\pi}{x})-\pi x\cos(\frac{\pi}{x})| \leq |3x^2\sin(\frac{\pi}{x})|+|-\pi x\cos(\frac{\pi}{x})-0| \leq |3x^2|+\pi|x|$$
  Since $x>0$, it follows that
  $$|3x^2|+\pi|x| = 3x^2+\pi x < 3x^2 + 4x = 3x(x+\frac{4}{3})<\epsilon$$
  $$\impliedby 3x < \frac{\epsilon}{x+\frac{4}{3}}$$
  And since $x \leq 1$,
  $$\frac{\epsilon}{x+\frac{4}{3}} \leq \frac{\epsilon}{1+\frac{4}{3}} = \frac{3\epsilon}{7}$$
  so
  $$3x<\frac{3\epsilon}{7} \impliedby x=|x-0|< \frac{\epsilon}{7} = \delta$$
  Thus, given $\epsilon >0$, $\exists \delta=\frac{\epsilon}{7}$ s.t $\forall x\in (0,1]$ and
  $$|x-0|<\frac{\epsilon}{7} \implies |3x^2\sin(\frac{\pi}{x})-\pi x\cos(\frac{\pi}{x})-0|<\epsilon$$
  It is clear that $y'(x)$ is continuous at $0$. So $y'(x)$ is continuous on $[0,1]$ $\implies$ our arc is smooth.

So my question: was what I did valid in the proof? Or did I pull some strings that shouldn't have been pulled?
 A: You are beginning with "Suppose that $y'\to0$ when $x\to 0$"; but you mean: "First I shall prove that $y'(x)\to0$ when $x\to0$". Then you go on and prove it alright. (Actually it is not necessary to carry out an $\epsilon$-$\delta$ proof. The claim follows immediately using the principle $a(x)b(x)\to0$ when $|a(x)|$ is bounded and $b(x)\to0$.)
But now comes the flaw: In order to prove that $y'$ is continuous at $0$ you have to show that $\lim_{x\to0}y'(x)=y'(0)$. But you have not looked at $y'(0)$ at all. Therefore it remains to verify that  $y'(0)=0$ as well. The value $y'(0)$ cannot be computed by formal term-differentiation, since  the function $y(\cdot)$ is defined per exception handling at $0$. In order to compute $y'(0)$ you have to resort to the definition  of the derivative instead:
$$y'(0)=\lim_{x\to0}{y(x)-y(0)\over x-0}=\lim_{x\to0}{y(x)\over x}=\ldots\quad.$$
A: The proof is correct; once you arrive at

$$|3x^2|+\pi|x| = 3x^2+\pi x < 3x^2 + 4x,$$

you can directly use $3x^2 \leq 3x$ if $0<x\leq 1$; this allows you to write
$$ |3x^2|+\pi|x| = 3x^2+\pi x < 3x + \pi x = x(3+\pi) = |x|(3+\pi)$$
as $x$ is non negative. Choosing $\delta=\frac{\epsilon}{3+\pi}$ you can end the proof, as well (maybe quicker).
