Let $L$ be a non-abelian nilpotent Lie algebra and $Z(L)$ be its center. Is it possible for $Z(L)$ to be a maximal ideal in $L$?
An attempt: Since $L$ is not abelian then there exists $x\in L, x\notin Z(L)$, now $\langle x\rangle_F + Z(L)$ is an ideal of $L$, by maximality of $Z(L)$ this ideal is $L$. Thus $dim\ L/Z(L)=1$ and the nilpotency class of $L$ is $2$ i.e $[L,[L,L]]=0$ if this implies that $Z(L)=[L,L]$ then we are done. since for a nilpotent Lie algebra $L$ we must have $dim\ L/[L,L]>1$.