During my self learning I come across the function for which I want to find (Fenchel) conjugate and the subdifferential $\partial \psi$ function, could you please help! I have no clue about this topic.
$$\psi (t) = \begin{cases} \frac 1 2 t^2& t > 0\\ -t & t \leq 0 \end{cases}$$
You should draw a little picture of the graph of $\psi$.
$\psi^*(y) = \sup_t yt-\psi(t)$.
From the picture it should be clear that there are three cases 1. $y\ge 0$, 2. $y \in[-1,0)$ and 3. $y<-1$.
Case 1. $y \ge 0$, we see that $\sup_{t < 0} yt-\psi(t)= \sup_{t < 0} (y+1)t = 0$ and $\sup_{t \ge 0} yt-\psi(t)= \sup_{t \ge 0} yt - {1 \over 2} t^2 = {1 \over 2} y^2$ and so $\psi^*(y) = {1 \over 2} y^2$.
Case 2. $y \in[-1,0)$, we see that $\sup_{t < 0} yt-\psi(t)= \sup_{t < 0} (y+1)t = 0$ and $\sup_{t \ge 0} yt-\psi(t)= \sup_{t \ge 0} yt - {1 \over 2} t^2 = 0$ and so $\psi^*(y) = 0$.
Case 3. $y <-1$, we see that $\sup_{t < 0} yt-\psi(t)= \sup_{t < 0} (y+1)t = +\infty$ and $\sup_{t \ge 0} yt-\psi(t)= \sup_{t \ge 0} yt - {1 \over 2} t^2 = 0$ and so $\psi^*(y) = +\infty$.
To compute the subgradient, perhaps the most straightforward way is to compute the (one sided) directional derivatives. Then the subgradient is the convex set whose support function is the directional derivative.
If $\psi$ is $C^1$ at $t$ then $d \psi(t,h) = \psi'(t) h$ and so $\partial \psi(t) = \{ \psi'(t) \}$.
We see that $\psi$ is $C^1$ everywhere except at $t=0$, in which case we have $d \psi(0, h) = -h$ for $h <0$ and $d \psi(0,h) = th$ for $h \ge 0$ and so $\partial \psi(0) = [-1,0]$.