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$
  • 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 Mar 6 '16 at 21:58
2
$\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$
  • $\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 Mar 6 '16 at 23:23
  • $\begingroup$ @sundance updated, but i did not see $y <= e (1 + a)$ in your original post. $\endgroup$ – Vitaliy Kaurov Mar 6 '16 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 Mar 7 '16 at 0:02

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.