3

Does Mathematica have the ability to solve this inequality:

(a + b * Cos[x])^2 + (c * Sin[x])^2 <= 1

for any x ∈ [0, 2*Pi]?

The answer should contain conditions/inequalities for a, b and c.

Domen
  • 23,608
  • 1
  • 27
  • 45
Aerterliusi
  • 353
  • 1
  • 5
  • Assuming the variables are real, Reduce[(a + bCos[x])^2 + (cSin[x])^2 <= 1, Reals] gives an answer. – bill s May 14 '23 at 18:09
  • @bills: No, it is not true. If you execute the code suggested by you, you'll see (a == -1 - bCos[x] && cSin[x] == 0) || (-1 - bCos[x] < a < 1 - bCos[x] && -Sqrt[1 - a^2 - 2 a bCos[x] - bCos[x]^2] <= cSin[x] <= Sqrt[1 - a^2 - 2 a bCos[x] - bCos[x]^2]) || (a == 1 - bCos[x] && cSin[x] == 0). – user64494 May 14 '23 at 18:31
  • @user64494 Bill S meant Reduce[(a + b*Cos[x])^2 + (c*Sin[x])^2 <= 1 && 0 <= x <= 2 \[Pi], {a, b, c}, Reals] . The implicit multiplications disappeared during the copy-and-paste. –  May 14 '23 at 19:50
  • @IAmANaïf: This results in (x == 0 && -1 - a <= b <= 1 - a) || (0 < x < \[Pi]/ 2 && ((b == (-1 - a) Sec[x] && c == 0) || ((-1 - a) Sec[x] < b < (1 - a) Sec[ x] && -\[Sqrt]((1 - a^2 - 2 a b Cos[x] - b^2 Cos[x]^2) Csc[ x]^2) <= c <= Sqrt[(1 - a^2 - 2 a b Cos[x] - b^2 Cos[x]^2) Csc[ x]^2])... <= Sqrt[(1 - a^2 - 2 a b Cos[x] - b^2 Cos[x]^2) Csc[x]^2]) – user64494 May 14 '23 at 19:54
  • @user64494 I am confused as I do not understand your point. I posted that full answer (and it is an answer to the question as asked as I understand the question). –  May 14 '23 at 20:02

4 Answers4

3

You could calculate the extremal points of $m(x)=(a+b\cos x)^2+(c\sin x)^2$ and make sure they are all smaller than 1:

m[x_] = (a + b*Cos[x])^2 + (c*Sin[x])^2;
m[x] /. Solve[m'[x] == 0, x] // FullSimplify // Union

(* {(a + b)^2 if ..., (a - b)^2 if ..., (c^2 (a^2 - b^2 + c^2))/(-b^2 + c^2) if ...} *)

where the conditions (if ...) are trivial and don't affect the result. So we can say that

$$ m(x)\le\max\left((a + b)^2,(a - b)^2,\frac{c^2 (a^2 - b^2 + c^2)}{c^2-b^2}\right) $$

and the inequality is satisfied if

$$ \max\left((a + b)^2,(a - b)^2,\frac{c^2 (a^2 - b^2 + c^2)}{c^2-b^2}\right)\le1 $$

Let's define a Region that satisfies these constraints:

R = ImplicitRegion[(a - b)^2 <= 1 &&
                   (a + b)^2 <= 1 &&
                   (c^2 (a^2 - b^2 + c^2))/(c^2 - b^2) <= 1,
                   {a, b, c}];

RegionPlot3D[R, Axes -> True, AxesLabel -> {a, b, c}, PlotPoints -> 100]

enter image description here

update

As Ulrich Neumann shows, the above condition is sufficient, but not necessary, for having $m(x)\le1\forall x\in\mathbb{R}$. For example, $(a,b,c)=(\frac38, \frac{11}{32}, \frac38)$ does not satisfy my conditions because $\frac{c^2(a^2-b^2+c^2)}{c^2-b^2}=\frac{1503}{1472}>1$. However, this maximum is not achieved on the reals, but rather for $x=2.43278i$ on the imaginary axis.

Roman
  • 47,322
  • 2
  • 55
  • 121
  • Unfortunately, m[x] (in your notation) can take values greater than 1 for some a,b, and c. – user64494 May 14 '23 at 18:52
  • 5
    @user64494 you're just trolling. Good luck! – Roman May 14 '23 at 19:38
  • Roman (@ does not work): Unfortunately, your reply is not constructive and polite. – user64494 May 14 '23 at 20:21
  • Roman (@ does not work): Your claim "However, this maximum is not achieved on the reals" does not correspond to reality in view of a = 3/8; b = 11/32; c = 3/8;Maximize[{(a + b*Cos[x])^2 + (c*Sin[x])^2, x >= 0 && x <= 2*Pi}, x] which results in {529/1024, {x -> 0}}. – user64494 May 16 '23 at 09:49
  • Roman (@ does not work): I think the reason for your answer to be only partial is the following: critical points may be inflection points, not only extremal points. – user64494 May 16 '23 at 10:46
  • Roman (@ does not work): Try to select the critical points where m''[x]!=0. Good luck! – user64494 May 16 '23 at 14:00
2

One may try

Resolve[ForAll[x,x>=0&&x<=2*Pi, (a+b*Cos[x])^2+(c*Sin[x])^2<=1],Reals]

Unfortunately, this simple-minded approach does not work. As the documentation says,

Resolve can always eliminate quantifiers from any collection of polynomial equations and inequations over complex numbers, and from any collection of polynomial equations and inequalities over real numbers

So we reduce the problem to a polynomial inequality in such a way

Resolve[ForAll[{cos, sin}, sin^2 + cos^2 == 1, (a + b*cos)^2 + (c*sin)^2 <= 1], Reals]

(a == 0 && a^2 + b^2 <= 1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && a^2 + c^2 <= 1) || (b == 0 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && a^2 + c^2 <= 1) || (a^2 + b^2 <= 1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && b - c == 0 && a^2 + c^2 <= 1) || (a^2 + b^2 <= 1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && b + c == 0 && a^2 + c^2 <= 1) || (a^2 + b^2 <= 1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && a^2 + c^2 <= 1 && b^2 + a^2 b^2 - b^4 - c^2 + a^2 c^2 + b^2 c^2 > 0) || (a^2 + b^2 <= 1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && a^2 + c^2 <= 1 && b^2 - c^2 + a^2 c^2 - b^2 c^2 + c^4 <= 0)

Addition. In fact, the answer of @UlrichNeumann coincides with my answer.

cond = Resolve[ForAll[u, (a + b*Cos[x])^2 + (c*Sin[x])^2 <= 1 /. x -> 2 ArcTan[u] //TrigExpand], Reals]

(a^2 - 2 a b + b^2 < 1 && a^2 + 2 a b + b^2 <= 1 && b^2 - c^2 + a^2 c^2 - b^2 c^2 + c^4 <= 0) || (a^2 - 2 a b + b^2 < 1 && a^2 + 2 a b + b^2 <= 1 && -b^2 + a^2 b^2 - b^4 + c^2 - 2 a^2 c^2 + a^4 c^2 + 4 b^2 c^2 - 2 a^2 b^2 c^2 + b^4 c^2 - 3 c^4 + 3 a^2 c^4 - 3 b^2 c^4 + 2 c^6 < 0) || (a^2 - 2 a b + b^2 <= 1 && a^2 + 2 a b + b^2 <= 1 && a^2 - b^2 + 2 c^2 <= 1 && -b^2 + a^2 b^2 - 2 a b^3 + b^4 + c^2 - 2 a^2 c^2 + a^4 c^2 + 2 a b c^2 - 2 a^3 b c^2 + 2 a b^3 c^2 - b^4 c^2 - c^4 + a^2 c^4 - 2 a b c^4 + b^2 c^4 >= 0) || (a^2 - 2 a b + b^2 <= 1 && a^2 + 2 a b + b^2 <= 1 && a^2 - b^2 + 2 c^2 < 1 && b^2 - c^2 + a^2 c^2 - b^2 c^2 + c^4 > 0)

and

Resolve[ForAll[{a, b, c},  Equivalent[cond, (a == 0 && 
  a^2 + b^2 <= 1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 &&
   a^2 + c^2 <= 1) || (b == 
   0 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && 
  a^2 + c^2 <= 1) || (a^2 + b^2 <= 
   1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && 
  b - c == 0 && 
  a^2 + c^2 <= 1) || (a^2 + b^2 <= 
   1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && 
  b + c == 0 && 
  a^2 + c^2 <= 1) || (a^2 + b^2 <= 
   1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && 
  a^2 + c^2 <= 1 && 
  b^2 + a^2 b^2 - b^4 - c^2 + a^2 c^2 + b^2 c^2 > 
   0) || (a^2 + b^2 <= 
   1 && -2 a^2 + a^4 - 2 b^2 - 2 a^2 b^2 + b^4 >= -1 && 
  a^2 + c^2 <= 1 && b^2 - c^2 + a^2 c^2 - b^2 c^2 + c^4 <= 0)]],Reals]

True

user64494
  • 26,149
  • 4
  • 27
  • 56
2

Similar to @Romans answer Weierstrass-transformation x -> 2 ArcTan[u] gives a more direct and smooth solution:

cond = Resolve[ForAll[u, (a + b*Cos[x])^2 + (c*Sin[x])^2 <= 1 /. x -> 2 ArcTan[u] //TrigExpand], Reals]
(*(a^2 - 2 a b + b^2 &lt; 1 &amp;&amp; a^2 + 2 a b + b^2 &lt;= 1 &amp;&amp; 

b^2 - c^2 + a^2 c^2 - b^2 c^2 + c^4 <= 0) || (a^2 - 2 a b + b^2 < 1 && a^2 + 2 a b + b^2 <= 1 && -b^2 + a^2 b^2 - b^4 + c^2 - 2 a^2 c^2 + a^4 c^2 + 4 b^2 c^2 - 2 a^2 b^2 c^2 + b^4 c^2 - 3 c^4 + 3 a^2 c^4 - 3 b^2 c^4 + 2 c^6 < 0) || (a^2 - 2 a b + b^2 <= 1 && a^2 + 2 a b + b^2 <= 1 && a^2 - b^2 + 2 c^2 <= 1 && -b^2 + a^2 b^2 - 2 a b^3 + b^4 + c^2 - 2 a^2 c^2 + a^4 c^2 + 2 a b c^2 - 2 a^3 b c^2 + 2 a b^3 c^2 - b^4 c^2 - c^4 + a^2 c^4 - 2 a b c^4 + b^2 c^4 >= 0) || (a^2 - 2 a b + b^2 <= 1 && a^2 + 2 a b + b^2 <= 1 && a^2 - b^2 + 2 c^2 < 1 && b^2 - c^2 + a^2 c^2 - b^2 c^2 + c^4 > 0)*)

R = ImplicitRegion[cond, {a, b, c}]; RegionPlot3D[R, Axes -> True, AxesLabel -> {a, b, c},PlotPoints -> 100]

enter image description here

addendum( see Roman's update)

cond /. {a -> 3/8, b -> 11/32, c -> 3/8}
(*True*)
Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55
0
$Version

13.2.1 for Microsoft Windows (64-bit) (January 27, 2023)
Reduce[(a + b*Cos[x])^2 + (c*Sin[x])^2 <= 1 && 0 <= x <= 2 \[Pi], {a, 
  b, c}, Reals]
(x == 0 && -1 - a <= b <= 1 - a) || 
  (0 < x < Pi/2 && ((b == (-1 - a)*Sec[x] && 
     c == 0) || ((-1 - a)*Sec[x] < b < 
      (1 - a)*Sec[x] && 
     -Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
         Csc[x]^2] <= c <= 
      Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
        Csc[x]^2]) || (b == (1 - a)*Sec[x] && 
     c == 0))) || (x == Pi/2 && 
   ((a == -1 && c == 0) || (-1 < a < 1 && 
     -Sqrt[1 - a^2] <= c <= Sqrt[1 - a^2]) || 
    (a == 1 && c == 0))) || (Pi/2 < x < Pi && 
   ((b == (1 - a)*Sec[x] && c == 0) || 
    ((1 - a)*Sec[x] < b < (-1 - a)*Sec[x] && 
     -Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
         Csc[x]^2] <= c <= 
      Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
        Csc[x]^2]) || (b == (-1 - a)*Sec[x] && 
     c == 0))) || (x == Pi && -1 + a <= b <= 
    1 + a) || (Pi < x < (3*Pi)/2 && 
   ((b == (1 - a)*Sec[x] && c == 0) || 
    ((1 - a)*Sec[x] < b < (-1 - a)*Sec[x] && 
     -Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
         Csc[x]^2] <= c <= 
      Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
        Csc[x]^2]) || (b == (-1 - a)*Sec[x] && 
     c == 0))) || (x == (3*Pi)/2 && 
   ((a == -1 && c == 0) || (-1 < a < 1 && 
     -Sqrt[1 - a^2] <= c <= Sqrt[1 - a^2]) || 
    (a == 1 && c == 0))) || ((3*Pi)/2 < x < 2*Pi && 
   ((b == (-1 - a)*Sec[x] && c == 0) || 
    ((-1 - a)*Sec[x] < b < (1 - a)*Sec[x] && 
     -Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
         Csc[x]^2] <= c <= 
      Sqrt[(1 - a^2 - 2*a*b*Cos[x] - b^2*Cos[x]^2)*
        Csc[x]^2]) || (b == (1 - a)*Sec[x] && 
     c == 0))) || (x == 2*Pi && -1 - a <= b <= 1 - a)
  • Do you pay your attention to the following places of the question "for any x ∈ [0, 2*Pi]" and "The answer should contain conditions/inequalities for a, b and c"? – user64494 May 14 '23 at 20:17
  • In your answer you find a,b,c which satisfy (a + b * Cos[x])^2 + (c * Sin[x])^2 <= 1 for a given x from 0 to 2*Pi. Compare with my answer. – user64494 May 14 '23 at 20:30