# How to solve a conditional inequality?

I am trying to use Mathematica to solve a conditional inequality.

Find all (real) numbers $a$ and $b$ such that $|a| + |b| \ge 2/ \sqrt{3}$ and for any real $x$ the inequality $|a\sin x + b \sin 2x| \le 1$ holds

I tried the expression

Reduce[{ForAll[{x}, Abs[a*Sin[x] + b*Sin[2 x]] <= 1] &&
Abs[a] + Abs[b] >= 2/Sqrt}, {a, b}, Reals]


Unfortunately, the above expression is running for a few hours without any output. Is there a better way to solve the problem?

• could you please improve the title? – chris May 28 '15 at 9:35
• @ chris: What do you suggest? – user64494 May 28 '15 at 9:37
• something slightly less generic! – chris May 28 '15 at 9:42
• @ chris: Hope this is it now. – user64494 May 28 '15 at 9:45
• I think this title covers most questions asked on this site. – chris May 28 '15 at 9:47

Perhaps

sol = Reduce[ForAll[{u}, -1 <= u <= 1 \[Implies]
Abs[a*u + b*2 u Sqrt[1 - u^2]] <= 1 &&
Abs[a*u - b*2 u Sqrt[1 - u^2]] <= 1 &&
Abs[a] + Abs[b] >= 2/Sqrt], {a, b}, Reals]
(*
(a == -(4/(3 Sqrt)) && (b == -(2/(3 Sqrt)) || b == 2/(3 Sqrt))) ||
(a ==  4/(3 Sqrt)  && (b == -(2/(3 Sqrt)) || b == 2/(3 Sqrt)))
*)


Polynomial systems are usually easier and Sqrt can be often be converted. If the degree is not too high, you can get a result. Here we can replace Sin[x] -> u and Sin[2x] == 2 Sin[x] Cos[x] -> 2 u * (± Sqrt[1 - u^2]), where ± is to be interpreted such that both resulting inequalities must be satisfied. This is because all combinations of signs of sine and cosine are possible if x ranges over all real numbers.

[The simplicity of the answer suggests that perhaps a simple mathematical solution might exist, but I have to go. Someone else?]

• @ Michael E2 : Thank you for your attention to the problem. I need some time to think about that. However, I have doubts concerning the answer. I think it should be XOR instead of && (see Wiki ) in Abs[au + bu Sqrt[1 - u^2]] <= 1 && Abs[au - bu Sqrt[1 - u^2]] <= 1. Also as a rule, the solution of an inequality is of the inequality form too. – user64494 May 28 '15 at 10:51
• It appears, that the inequalities within Reduce have b*u instead of 2*b*u. It also may well be, that the task is interesting precisely because of the possible solutions being restricted to a finite number of points. – LLlAMnYP May 28 '15 at 12:43
• @ Michael E2: I got &&. Sorry, your code is running for a few hours without any output. I think the upvoter somewhat hurried. – user64494 May 28 '15 at 14:19
• @LLlAMnYP The 2's were left off accidentally. The output is correct. – Michael E2 May 28 '15 at 19:00
• @MichaelE2 @user64494 On my machine (MMA 10.1, win7x64 enterprise) the code with and without correcting the coefficient before b run quite quickly (few seconds max) and with the correct coefficient gave the cited result. – LLlAMnYP May 28 '15 at 21:21