MATLAB: Given that the quadratic equation A has real roots show that equation B > = 0

coeffs

Hi all, I am trying to solve the following problem in MATLAB but I cannot make it work. I am new to MATLAB can anyone help me with this?
Given that the quadratic equation
2mx^2 + 2(m + 4)*x + 9 = 0
has real roots, show that
m^2 10*m + 16 0
The approach i took was:
syms x m
eq2 = m^2 - 10*m + 16
eq1 = 2*m*x^2 + (2*m + 8)*x + 9
c = coeffs(eq1,x)
but i get wrong result at this point instead of
a = 2m , b = 2(m + 4), c = 9
i am getting
c =
[ 9, 2*m + 8, 2*m]
Do you know a better way to solve this type of problems?
Any help would be appreciated.

Best Answer

instead of a = 2m , b = 2(m + 4), c = 9 i am getting ...
How about this instead?
syms x m
eq2 = m^2 - 10*m + 16
eq1 = 2*m*x^2 + (2*m + 8)*x + 9
C = coeffs(eq1,x)
a=C(3);
b=C(2);
c=C(1);