Complete $2$-step solvable Lie algebras A Lie algebra is complete if its center is zero and all its derivations are inner. I would like to study a class of Lie algebras, in particular

Let $C$ be the class of finite dimensional $2$-step solvable Lie algebras with trivial center (over $\mathbb{R}$ or $\mathbb{C}$). Is the completeness of the Lie algebras of this class already studied? or it's simply out of reach?


How completeness is connected to rigidity in this class? (a Lie algebra $\mathfrak{g}$ is called rigid if any sufficiently close
Lie algebra -for the Zariski topology- is isomorphic to it).
Nijenhuis & Richardson. Deformations of Lie Algebra Structures

 A: $\DeclareMathOperator\g{\mathfrak{g}}\newcommand{\mk}{\mathfrak}$Here are some general facts.
Proposition. Let $\g$ be a metabelian (=2-step solvable) Lie algebra, finite-dimensional over a field of char. zero. If $\g$ has a trivial center then there exists an abelian subalgebra $\mk{a}$ of $\g$ such that $\g=\mk{a}\ltimes [\g,\g]$.
Proof: let $\mk{a}$ be a Cartan subalgebra of $\g$ (i.e. self-normalized, nilpotent subalgebra). Let $\mk{w}$ be the intersection of the lower central series of $\g$. It is known (this is in Bourbaki) that $\mk{a}$ indeed exists, and that $\g=\mk{a}+\mk{w}$. Then $\mk{w}$ is nilpotent, and hence $\mk{a}\cap\mk{w}$ is a nilpotent ideal of $\g$, on which $\g$ acts nilpotently. If nonzero, we deduce that it intersects the center non-trivially. So $\g=\mk{a}\ltimes\mk{w}$. If $\mk{b}$ is the kernel of the $\mk{a}$-action on $\mk{w}$, then $\mk{b}$ is a nilpotent ideal of $\g$ on which $\g$ acts nilpotently, and for the same reason, since $\g$ has trivial center, we deduce that $\mk{b}=0$. Since $\mk{w}\subset [\g,\g]$, we deduce that the $[\g,\g]=[\mk{a},\mk{a}]\ltimes \mk{w}$.
Since $\mk{w}$ is metabelian, we deduce that $\mk{w}$ is abelian, and since $\mk{b}=0$ we also deduce that $[\mk{a},\mk{a}]=0$. That is, $\mk{a}$ is abelian. We deduce that $\mk{w}=[\g,\g]$. This proves the proposition. $\Box$

The above semidirect decomposition induces a Lie algebra grading of $\g$, namely $\g_0=\mk{a}$ and $\g_1=[\g,\g]$. This yields, in turn, a grading of the derivation Lie algebra of $\g$, also concentrated in degree $\{0,1\}$ (no derivation has degree $-1$, since the derivations map the derived subalgebra into itself). Formally, this yields a decomposition $\mathrm{OutDer}(\g)=\mathrm{OutDer}(\g)_0\oplus \mathrm{OutDer}(\g)_1$.
Asking that all derivations are inner means that all derivations of derivations of degree 0 and 1 are inner.

If $\mk{a}$ has dimension 1, we can pursue to the end:
first, in this case, a derivation of degree 1 is easily seen to be inner. And a derivation of degree zero has to be zero on $\mk{a}$ and hence is given by a linear endomorphism of the space $[\g,\g]$. Hence we deduce easily that every derivation is inner if and only if the 1-dimensional line generated by the derivation defining the action, equals its own centralizer. This is the case only if $[\g,\g]$ has dimension 1.

Actually, in a solvable Lie algebra, every derivation maps the whole Lie algebra in the nilpotent radical. In many cases, $[\g,\g]$ equals the nilpotent radical and then we see that for $\mathrm{OutDer}(\g)_0$ to be zero, a necessary and sufficient condition is that the image of $\mk{a}$ in the Lie algebra of endomorphisms of $[\g,\g]$ is maximal abelian. (In general, $[\g,\g]$ is possibly larger and this is then a necessary condition anyway.)
I don't see right away what $\mathrm{OutDer}(\g)_1$ is, even when $[\g,\g]$ equals the nilpotent radical. I don't immediately see an example where it's nonzero.
One way to anticipate a sensible answer would be to compute $\mathrm{OutDer}(\g)$ in various small-dimensional cases (where $\mk{a}$ maps to a maximal abelian subalgebra of the matrix algebra). This should be doable efficiently (it's enough to consider the complex case, since over subfields the dimension of the outer derivation Lie algebra is the same as the one after complexification).
