I define the following piecewise function:
U[c_,n_,g_,p_]:=Piecewise[{{c^(1-g)/(1-g)-n^(1+p)/(1+p),g!=1}, {Log[c]-n^(1+p)/(1+p),g==1}}]
When I take the derivative
D[U[c,n,g,p],c]
It returns a a third unexpected line.
(In the image, gamma corresponds to g)
What is the meaning of this third line and how can I remove it from the printed output?