0
$\begingroup$

I'd like to graph the following inequality on the x-y plane:

$$ P(y): (\forall x\in [0,y))\left(\frac{x - \epsilon(1+a)}{a} \leq y \leq \frac{x + \epsilon(1+a)}{a}\right) $$

This is the set of points $(x,y)$ where $\frac{x - \epsilon(1+a)}{a} \leq y \leq \frac{x + \epsilon(1+a)}{a}$ for all $0 \leq x < y$. That is, for a point to be in the set, it must satisfy the inequality, and all points to its "left" with the same y-value must also satisfy the inequality.

$\epsilon \in (0,1]$ and $a \in (0,1]$ are both pre-defined constants.

Ideally, the plot would use multiples or combinations of $a$ or $\epsilon$ rather than numerical axis labels, but if I have to plug in values for $a$ and $\epsilon$ to plot this in Mathematica that would be okay (as an aside, if anyone knows an application that can plot this purely symbolically, please let me know!).

$\endgroup$
1
  • 3
    $\begingroup$ Please include in your question the code that you already have tried for this purpose. Doing so will increase your chances of obtaining a useful response. $\endgroup$
    – bbgodfrey
    Commented Mar 6, 2016 at 21:58

1 Answer 1

3
$\begingroup$
Manipulate[RegionPlot[
  (x - e (1 + a))/a <= y <= (x + e (1 + a))/a && 0 <= x <= y && 
   y <= e (1 + a),
  {x, 0, 1}, {y, 0, 1}, PlotPoints -> 60],
 {{e, .5}, 0.01, 1, Appearance -> "Labeled"},
 {{a, .5}, 0.01, 1, Appearance -> "Labeled"}]

enter image description here

$\endgroup$
3
  • $\begingroup$ Thanks! This is close except I think the constraints are not quite right. For example, as you can see at the top of the plot you posted, there is a shaded region where, for the same $y$, points to its left are not shaded. Those points should be excluded. Also $0 < a \leq 1$ and $0 < e \leq 1$. I think this works: Manipulate[ RegionPlot[(x - e (1 + a))/a <= y <= (x + e (1 + a))/a && 0 <= x <= y && y <= e (1 + a), {x, 0, 1}, {y, 0, 1}, PlotPoints -> 60], {e, 0.01, 1, Appearance -> "Labeled"}, {a, 0.01, 1, Appearance -> "Labeled"}] $\endgroup$
    – sundance
    Commented Mar 6, 2016 at 23:23
  • $\begingroup$ @sundance updated, but i did not see $y <= e (1 + a)$ in your original post. $\endgroup$ Commented Mar 6, 2016 at 23:48
  • $\begingroup$ Right, it wasn't there, it's just a necessary condition to make sure the inequality is satisfied for a given $y$ for all $x$. $\endgroup$
    – sundance
    Commented Mar 7, 2016 at 0:02

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.