If $f(t)$ is of class $ C^1$ then $ \frac{f(t)}{\sin(t)}$ is also $ C^1$? Let $f:[0,\pi]\longrightarrow \mathbb{R}$ be a function of class $C^1$ such that $f(0)=f(\pi)=0$ 
Let $g:[0,\pi]\longrightarrow \mathbb{R}$ $$ g(t) = \left\{ 
  \begin{array}{c l}
     \frac{f(t)}{\sin(t)} & ,\quad t\in (0,\pi)\\
    f'(0) & ,\quad t=0 \\
    -f'(\pi) & ,\quad t=\pi
  \end{array} \right.$$
is this function of class $C^1$?
Any hint would be appreciated.
 A: $g$ is certainly $C^1$ on $(0,\pi)$, but it is not necessarily true that $g$ is $C^1$ at the endpoints.
Counterexample
Consider
$f(t) =
\begin{cases}
t^2 \sin(t) \sin(\tfrac{1}{t}) & \text{if } t \ne 0. \\
0 & \text{if } t = 0.
\end{cases}
$
First of all, observe that $f$ is $C^1$ ($C^\infty$) for $t \ne 0$,
and $f(0) = f(\pi) = 0$ as required.
Next, observe that $f'(0)$ exists and is $0$, because
$$
\left| \frac{f(h) - f(0)}{h} \right|
= \left| \frac{h^2 \sin(h) \sin(\tfrac{1}{h})}{h} \right|
\le |h \sin h| \le |h^2| \to 0 \text{ as } h \to 0.
$$
Furthermore, $f'$ is continuous at $0$ because
\begin{align*}
\left| f'(h) - f'(0) \right|
&=
\left|
   2 h \sin(h) \sin(\tfrac{1}{h})
 + h^2 \cos(h) \sin(\tfrac{1}{h})
 + h^2 \sin(h) \cos(\tfrac{1}{h}) \frac{-1}{h^2} \right| \\
&\le 2|h||\sin h| + |h|^2 + |\sin(h)| \\
&\le 2|h|^2 + |h|^2 + |h| \to 0 \text{ as } h \to 0.
\end{align*}
Therefore, we have shown $f$ is $C^1$.
However, $g$ is
given by
$$
g(t) =
\begin{cases}
t^2 \sin(\tfrac{1}{t}) & \text{if } t \in (0, \pi) \\
f'(0) = 0 & \text{if } t = 0 \\
-f'(\pi) & \text{if } t = \pi
\end{cases}
$$
which is not
$C^1$ on $[0, \pi]$,
because the derivative is not continuous at $0$.
Addendum
In the counterexample of above, while $g$ is not $C^1$, $g$ is still differentiable at $0$.  Christian Blatter's example of $f(t) = |t(\pi - t)|^{3/2}$ shows that $g$ need not even be differentiable at $0$ and $\pi$.
