0
$\begingroup$

Absolute value equations for straight lines where the symmetry axis is either horizontal ($y=y_s$) or vertical ($x=x_s$) can be written in a closed-form manner:

For instance, $|x - 2| + y = 1$ yields the following graph:

while $|2y| + x = 1$ yields:

Is it possible to do this reflection over an arbitrary axis and still be able to write down the equation in closed form? (Thinking out loud: perhaps a rotation transformation can be applied to an equation with a horizontal or vertical symmetry axis in order to obtain the correct angle?)

I ultimately want to write an inequality that shades in one "side" of the kinked line (see below), but I need this inequality to be defined in a single equation (cannot be specified in a piecewise manner, for instance).

$|x - 2| + y \leq 1$ yields:

Thank you very much!

1 Answers 1

3

Polar equations says yes!

$x=r\cos(\theta)$ and $y=r\sin(\theta)$. Let's just do some quick graphs centered at $(0,0)$.

$$y=|x|$$

Turn it into polar form:

$$r\sin(\theta)=|r\cos(\theta)|$$

We want to rotate it, say, $\alpha$ degrees, so

$$r\sin(\theta+\alpha)=|r\cos(\theta+\alpha)|$$

Expand with trig identities:

$$r\cos(\alpha)\sin(\theta)+r\sin(\alpha)\cos(\theta)=|r\cos(\alpha)\cos(\theta)-r\sin(\alpha)\sin(\theta)|$$

Return it back to rectangular form,

$$\cos(\alpha)y+\sin(\alpha)x=|\cos(\alpha)x-\sin(\alpha)y|$$

And if $c=\cos(\alpha)$ and $s=\sin(\alpha)$, then

$$cy+sx=|cx-sy|$$

  • 0
    Ah, what a simple and elegant solution -- should have thought of this myself! Also, I'm surprised that I didn't find anything like this in my online searching. Thank you!2017-01-06
  • 0
    @PhysicsCodingEnthusiast =D your welcome2017-01-06