MATLAB: How to solve equation without values

polynomialquadratic equation

hi,
I just want to solve the following equation. Just the simplified form without values.
I mean I just want to do the following task:
X1= 2- 4a
X2=3- 4a
I just want to use these values in the following expression
Capture.JPG
and get the simplified equation with only "a" as the variable

Best Answer

syms X1 X2 a
expr = 4*X1^2 - 4*X1*X2 + 2*X2^2;
new_expr = subs(expr, {X1, X2}, {2-4*a, 3-4*a});
simplify(new_expr)