4
$\begingroup$

I have a simple inequality, $$x+\cos(\theta)\, y > 0$$ and I'd like to plot the region in $x,y$ space which satisfies this inequality for all values of the angle $\theta$. I'm trying to do this with RegionPlot,

RegionPlot[AllTrue[x + Cos[\[Theta]] y > 0, Positive], {x, 0, 10}, {y, 0, 10}]

But this returns an empty plot. The final result should be a plot of $x>|y|$. Could anyone help me with implementing this in Mathematica?

Many thanks!

$\endgroup$

2 Answers 2

6
$\begingroup$

We set t=Cos[θ].

FunctionRange[Cos[θ], θ, t]

-1 <= t <= 1.

cond = ForAll[t, -1 <= t <= 1, x + t*y > 0];
result = Resolve[cond, Reals];
(* reg=ImplicitRegion[result,{x,y}]; *)
RegionPlot[result, {x, -5, 5}, {y, -5, 5}]

enter image description here

$\endgroup$
3
$\begingroup$
sol = Select[Reduce[x + y Cos[θ] > 0, θ, Reals], 
  FreeQ[#, θ] &]

x > 0 && -x < y < x

Region[
 ImplicitRegion[sol, {x, y}]
 , Frame -> True
 , PlotRange -> {{-5, 5}, {-5, 5}}
 ]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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