assume(f > 0, g_xx > 0);

A: matrix(
    [0, 0, f * alpha / g_xx, -f * alpha * m, 0],
    [0, 0, alpha, 0, 0],
    [alpha, 0, 0, 0, -2 * alpha],
    [0, 0, 0, 0, -alpha * g_xx],
    [0, 0, 0, -alpha, 0]
);

A . transpose(matrix([v1,v2,v3,v4,v5]));

load("eigen");

results :eigenvectors(A);

lambda : matrix(
    [results[1][1][1],0,0,0,0],
    [0,results[1][1][3],0,0,0],
    [0,0,results[1][1][5],0,0],
    [0,0,0,results[1][1][4],0],
    [0,0,0,0,results[1][1][2]]
);

transpose(matrix(
        results[2][1][1], results[2][3][1], results[2][5][1], results[2][4][1], results[2][2][1]
)) . matrix(
    [f,0,0,0,0],
    [0,f*(g_xx^2*m-2),0,0,0],
    [0,0,1,0,0],
    [0,0,0,f*(g_xx^2*m-2),0],
    [0,0,0,0,f]
)$
ratsimp(%)$
evR : %;

evR . transpose(matrix([v1,v2,v3,v4,v5]));

invert(evR)$
ratsimp(%)$
evL : %;

evL . transpose(matrix([v1,v2,v3,v4,v5]));

evR . lambda . evL$
ratsimp(%)$
% - A;

matrix(
    [2*f*(g_xx^2-f),0,0,0,0],
    [0,2*f*(g_xx^2-f),0,0,0],
    [0,0,f,0,0],
    [0,0,0,2*f*(g_xx^2-f),0],
    [0,0,0,0,2*f*(g_xx^2-f)]    
) . evL . transpose(matrix([a_x, d_xxx, K_xx, Theta, Z_x]))$
ratsimp(%);