0

How do you perform operations involving absolute values? I want to avoid squaring them, is there any way to work around that?

Suppose I want to solve $\frac{|x-120|\cdot|y-39|}{2}$, what should be the expressions equivalent?

EDIT: apologies, suppose I want to simplify the expression above?

Additionally, suppose $z(x,y)=\frac{|x-120|\cdot|y-39|}{2} +\frac{|x-23|\cdot|y-11|}{2}$ and I want to find the optimal values for $(x,y)$. How do I go about it?

John Glenn
  • 2,323
  • 11
  • 25
  • $|a| \cdot |b|=|a \cdot b|$. I don't know what you are solving though. – randomgirl Mar 08 '18 at 01:50
  • What do you mean, you want to "solve" this? Is there an equation somewhere? Also, why do you want to avoid squaring absolute values? – saulspatz Mar 08 '18 at 01:51
  • @randomgirl edited the question – John Glenn Mar 08 '18 at 01:55
  • @saulspatz to avoid the problem from being too computationally intensive – John Glenn Mar 08 '18 at 01:57
  • you can always get rid of the absolute value bars by specifying constraints on $x$ and $y$. For example, $|x-120|=x-120$ if $x\ge 120$ – Vasili Mar 08 '18 at 02:05
  • You mean you want to minimize $z(x,y)$, correct? – saulspatz Mar 08 '18 at 02:10
  • Yes, but how do you take the derivative if we are to eliminate abs value bars with constraints? How would you even take the derivative? – John Glenn Mar 08 '18 at 02:13
  • You break $R^2$ into areas and find local max/min in those areas then find the global max/min. Let's say you have $f(x,y)=|x+1|+|y-2|$. You'll have four areas: a) $x<-1$, $y<2$; b) $x<-1$, $y \ge2$; c) $x\ge -1$, $y<2$; d) $x\ge -1$, $y \ge 2$. – Vasili Mar 08 '18 at 02:17

1 Answers1

0

$z(120,11) = 0+0 = 0,$ which is clearly a minimum.

saulspatz
  • 53,131