I have a set of symbolic expressions of several variables, and I want Matlab to find the conditions on the variables such that the expressions meet certain criteria, such as being real-valued or one expression being less than another. For example,
syms a b c x;x = solve(a*x^2 + b*x + c == 0,x)
returns the familiar quadratic formula as a vector:
x = -(b + (b^2 - 4*a*c)^(1/2))/(2*a) -(b - (b^2 - 4*a*c)^(1/2))/(2*a)
For these two solutions for x, I'd like to know: (a) the conditions on a, b, and c such that x is real-valued (obviously b^2 > 4*a*c for this example); (b) the conditions on a, b, and c such that x(1) > x(2).
If it helps, I know that all my symbolic variables (a, b, and c in the example) are positive-valued. Also, I'm only interested in positive values of x.
Thanks, Rich
Best Answer