Calculation of two less than equal
5 views (last 30 days)
John D'Errico on 28 Nov 2020
Edited: John D'Errico on 28 Nov 2020
You want to solve for a scalar m such that the inequalities are always true? Regardless, does a solution ever exist? Note that unless C > 1, sqrt(C-1) is not real.
fplot(@(C) (1 + sqrt(2*C-1))/2,[1,10])
legend('sqrt(C-1)','1 + sqrt(2*C-1))/2')
You should see that m exists only of C is at least 5. But as long as C is greater than 5, an interval of solutions will exist, for EACH calue of C. We can find the point where the two curves cross.
solve((1 + sqrt(2*C-1))/2 == sqrt(C-1))
So NO element of C may be less than 5. If that ever happens, then m will not exist. Whem C == 5, M can have only a unique value, thus 2, so the interval collapses to a point.
If you want to solve for a scalar m such that this is ALWAYS true for all values of C, then it is equally trivial, although a solution may likely not exist, For example, consider a vector C that lies between 10 amd 20.
C = rand(1,10)*10 + 10;
m_min = (1 + sqrt(max(C )*2 -1))/2
m_max = sqrt(min(C ) - 1)
So we must have m >= 3.6, but also we need m <= 3.07. Clearly no solution exists. We can do further computations to show what range C can have such that a solution can exist.