Prove $\{xy \mid |x|=|y|, x \neq y\}$ is not a linear language
Consider this string: $w=a^kb^ka^{2k+2k!}b^ka^k$. We will show that we can't write this string in form of $uvxyz$ in a way that the conditions of pumping lemma for linear languages statisfy.
Because $|uvyz|\leq k$ we have :  $|uv|\leq k$ and $|yz|\leq k$
So we can write: $uv=a^{f_1}$ ,  $yz=a^{f_2}$ ,   $y=a^{g_1}$ , $v=a^{g_2}$ where $g_1+g_2&gt;0$ (because  $yv$  is cannot be empty string) and $g_1+g_2\leq k$.
Now we pump $v$ and $y$  $n$-times and we have: $w'=a^{k+ng_1}b^ka^{2k+2k!}b^ka^{k+ng_2}$
We want to conclude this string is not in language for some $n$. So if we rewrite $w'$ as $w'=a^{k+ng_1}b^ka^xa^{2k+2k!-x}b^ka^{k+ng_2}$,
we should have:
$k+ng_1=2k+2k!-x$  and  $x=k+ng_2$
so $k+ng_1=2k+2k!-k-ng_2 \to n(g_1+g_2)=2k! \to n=\frac{2k!}{g_1+g_2}$.
Notice that $g_1\leq k , g_2 \leq k \to g_1+g_2 \leq 2k$  $\to$  $g_1+g_2| 2k!$
So we only need to set $n=\frac{2k!}{g_1+g_2}$ to have $w'=w''w''$ and this is a contradiction. So $L$ is not linear.