4
$\begingroup$

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

See here for more info.

I tried the expression

Reduce[{ForAll[{x}, Abs[a*Sin[x] + b*Sin[2 x]] <= 1] && 
  Abs[a] + Abs[b] >= 2/Sqrt[3]}, {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?

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

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[3]], {a, b}, Reals]
(*
  (a == -(4/(3 Sqrt[3])) && (b == -(2/(3 Sqrt[3])) || b == 2/(3 Sqrt[3]))) ||
   (a ==  4/(3 Sqrt[3])  && (b == -(2/(3 Sqrt[3])) || b == 2/(3 Sqrt[3])))
*)

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?]

$\endgroup$
  • $\begingroup$ @ 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. $\endgroup$ – user64494 May 28 '15 at 10:51
  • $\begingroup$ 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. $\endgroup$ – LLlAMnYP May 28 '15 at 12:43
  • $\begingroup$ @ Michael E2: I got &&. Sorry, your code is running for a few hours without any output. I think the upvoter somewhat hurried. $\endgroup$ – user64494 May 28 '15 at 14:19
  • $\begingroup$ @LLlAMnYP The 2's were left off accidentally. The output is correct. $\endgroup$ – Michael E2 May 28 '15 at 19:00
  • $\begingroup$ @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. $\endgroup$ – LLlAMnYP May 28 '15 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.