2
$\begingroup$

Find the value range of real number a, so that for any real number x and $\theta \in\left[0, \frac{\pi}{2}\right]$, make $(x+3+2 \sin \theta \cos \theta)^{2}+(x+a \sin \theta+a \cos \theta)^{2} \geqslant \frac{1}{8}$ constant.

ForAll[{θ, x}, 
 0 <= θ <= Pi/
  2, (x + 3 + 2 Sin[θ] Cos[θ])^2 + (x + 
     a*Sin[θ] + a*Cos[θ])^2 >= 1/8]
Resolve[%, Reals]

But the above code has been running, can not get the correct result. How to solve this problem correctly?

Reference answer:

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ This uses Reduce[] and not Resolve[], but using the Weierstrass substitution (as always) goes a long way: Simplify[Reduce[FullSimplify[TrigExpand[(x + 3 + 2 Sin[θ] Cos[θ])^2 + (x + a Sin[θ] + a Cos[θ])^2 >= 1/8 /. θ -> 2 ArcTan[t]]] && 0 < t < 1, {t, a, x}] /. t -> Tan[θ/2]] $\endgroup$
    – J. M.'s torpor
    Feb 24 at 7:01
1
$\begingroup$

We set $y=\cos\theta$ and $z=\sin\theta$,then according to the conditions, $y^2+z^2==1$ and $y\geq 0, z\geq 0$.

And we consider the inverse problem,that is Exists $x,y,z$ such that $$(x + 3 + 2 zy)^2 + (x + az + ay)^2 \leq 1/8$$

Method one

Maximize[{a, (x + 3 + 2 z*y)^2 + (x + a*z + a*y)^2 <= 1/8, y >= 0, 
  z >= 0, y^2 + z^2 == 1}, {x, y, z, a}]

7/2, {x -> -(13/4), y -> 0, z -> 1, a -> 7/2}}

Minimize[{a, (x + 3 + 2 z*y)^2 + (x + a*z + a*y)^2 <= 1/8, y >= 0, 
  z >= 0, y^2 + z^2 == 1}, {x, y, z, a}]

{Sqrt[6], {..., a -> Sqrt[6]}}

Method two

Resolve[Exists[{x, y, 
   z}, {(x + 3 + 2 z*y)^2 + (x + a*z + a*y)^2 <1/8, y >= 0, z >= 0, 
   y^2 + z^2 == 1}], Reals]

Sqrt[6] < a < 7/2

$\endgroup$
5
  • $\begingroup$ I see the inequality $$ (x+3+2 \sin \theta \cos \theta)^{2}+(x+a \sin \theta+a \cos \theta)^{2} \geqslant \frac{1}{8}$$ in the question under consideration, not $\le$. $\endgroup$
    – user64494
    Feb 24 at 12:44
  • $\begingroup$ @user64494 Note that Forall x,y,z, f(x,y,z)>=c opposition Exist x,y,z, f(x,y,z)<c $\endgroup$
    – cvgmt
    Feb 24 at 12:56
  • 1
    $\begingroup$ The inverse inequality is $$(x+3+2 \sin \theta \cos \theta)^{2}+(x+a \sin \theta+a \cos \theta)^{2}< \frac{1}{8} $$ and Maximize[{a, (x + 3 + 2 z*y)^2 + (x + a*z + a*y)^2 < 1/8 && y >= 0 && z >= 0 && y^2 + z^2 == 1}, {x, y, z, a}] performs the message "Maximize::wksol: Warning: there is no maximum in the region in which the objective function is defined and the constraints are satisfied; a result on the boundary will be returned." $\endgroup$
    – user64494
    Feb 24 at 13:02
  • $\begingroup$ You correctly found the bounds for a, but for the negation of the problem under consideration, not the problem. This is not it. $\endgroup$
    – user64494
    Feb 24 at 13:12
  • 2
    $\begingroup$ @user64494 This means that a=7/2 and a=Sqrt[6] can not attain at the negation problem,so it indicate that Sqrt[6] < a < 7/2 $\endgroup$
    – cvgmt
    Feb 24 at 13:35
1
$\begingroup$

According to ForAll documentation, when you use multiple variables, you can't specify a satisfying condition, your ForAll code has one extra argument:

Resolve[ForAll[
  x, (x + 3 + 2 Sin[\[Theta]] Cos[\[Theta]])^2 + (x + 
        a*Sin[\[Theta]] + a*Cos[\[Theta]])^2 >= 1/8 && 
   0 <= \[Theta] <= Pi/2], Reals]

Out:

enter image description here

$\endgroup$
1
  • $\begingroup$ But the reference answer is $a \leq \sqrt{6}$ or $a \geq \frac{7}{2}$. $\endgroup$ Feb 24 at 8:05
1
$\begingroup$

Executing an equivalent form of your code

Reduce[ForAll[{x, \[Theta]}, (x + 3 + 
    2 Sin[\[Theta]] Cos[\[Theta]])^2 + (x + a*Sin[\[Theta]] + 
    a*Cos[\[Theta]])^2 >= 1/8 && \[Theta] >= 0 && \[Theta] <= 
Pi/2], a, Reals]

, one obtains

...Reduce:This system cannot be solved with the methods available to Reduce

However, this can be done in two steps. First,

Reduce[ForAll[x, (x + 3 + 2 Sin[\[Theta]] Cos[\[Theta]])^2 + (x + 
     a*Sin[\[Theta]] + a*Cos[\[Theta]])^2 >= 1/8 && \[Theta] >= 
 0 && \[Theta] <= Pi/2], a, Reals] // Simplify

(\[Theta] >= 0 && 2 \[Theta] < \[Pi] && (a <= (5 + 4 Cos[\[Theta]] Sin[\[Theta]])/( 2 (Cos[\[Theta]] + Sin[\[Theta]])) || a >= (7 + 4 Cos[\[Theta]] Sin[\[Theta]])/( 2 (Cos[\[Theta]] + Sin[\[Theta]])))) || (2 \[Theta] == \[Pi] && (2 a <= 5 || 2 a >= 7))

produces the required bounds for concrete values of \[Theta].

Second, one finds the bounds valid for all $\theta \in [0,\pi/2]$ by

Minimize[{(5 + 4 Cos[\[Theta]] Sin[\[Theta]])/(2 (Cos[\[Theta]] + Sin[\[Theta]])), 
[Theta] >= 0 && \[Theta] <= Pi/2}, \[Theta]]

{(5 + 4 Cos[2 ArcTan[ Root[1 - 8 # + 2 #^2 + 8 #^3 + #^4& , 3, 0]]] Sin[2 ArcTan[ Root[1 - 8 # + 2 #^2 + 8 #^3 + #^4& , 3, 0]]])/(2 (Cos[2 ArcTan[ Root[1 - 8 # + 2 #^2 + 8 #^3 + #^4& , 3, 0]]] + Sin[2 ArcTan[ Root[1 - 8 # + 2 #^2 + 8 #^3 + #^4& , 3, 0]]])), {\[Theta] -> 2 ArcTan[ Root[1 - 8 # + 2 #^2 + 8 #^3 + #^4& , 3, 0]]}}

which produces the upper bouds for a in terms of quadric and this can be expressed through radicals. To obtain numbers,

N[%]

{2.44949, {\[Theta] -> 0.261799}}

The lower bound for a is simpler.

Maximize[{(7 + 4 Cos[\[Theta]] Sin[\[Theta]])/(2 (Cos[\[Theta]] + Sin[\[Theta]])), \
[Theta] >= 0 && \[Theta] <= Pi/2}, \[Theta]]

{7/2, {\[Theta] -> 0}}

Therefore, since $2.44949 <5/2$, there is no bounds for a which are valid for all the $\theta \in [0,\pi/2]$.

$\endgroup$
4
  • $\begingroup$ Thank you very much for your help, but it's strange that the reference answer is $a \leq \sqrt{6}$ or $a \geq \frac{7}{2}$. $\endgroup$ Feb 24 at 8:07
  • 1
    $\begingroup$ @Alittlemouseonthepampas: I can say nothing, not seeing the solution which derives this answer. $\endgroup$
    – user64494
    Feb 24 at 9:08
  • $\begingroup$ @Alittlemouseonthepampas: Your "Reference answer" is unclear to me. Do you see math mistakes in my answer? $\endgroup$
    – user64494
    Feb 24 at 9:09
  • $\begingroup$ Thank you for your answer. If you use the function FullSimplify for simplification, a is $\sqrt{6}$. $\endgroup$ Feb 25 at 0:00

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.