Write a non piecewise function z(x,y) that conforms to: if (x<5 and y>7) or (x>2 and y<10), then z=1; else z=0.

- amistre64

- Stacey Warren - Expert brainly.com

Hey! We 've verified this expert answer for you, click below to unlock the details :)

- chestercat

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

- just_one_last_goodbye

first time I see Amistre needing help xD

- amistre64

needing help? nah, just posting something fun to do lol

- just_one_last_goodbye

oh so u know the answer? xD

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

- anonymous

hahaha

- amistre64

well, ive developed an answer, but i havent refined it. it goes to 0, 1/2, and 1

- just_one_last_goodbye

wait if i answer correctly o.o will i get owl bucks?

- amistre64

... doubt it. but if you come up with a function that satisfies the conditions ... you might get me to smile.

- amistre64

i might accept that it can be undefined at the boundaries tho ....

- just_one_last_goodbye

amistre.... do you know what that will get in street?

- just_one_last_goodbye

Go to a car dealer... find the most expensive car.... and then they ask you for the money... and you say "ou might get me to smile"

- Kainui

Are Heaviside step functions or Fourier Series allowed? :P

- amistre64

as long as its not a piecewise function then its fine. i just wanna see some creativity is all ;)

- anonymous

Would you call \(|x|\) a piecewise function? If yes, then we can forget about step functions.

- anonymous

Also, what do you mean by "or"? Should we take it to mean the union of those sets? Did you mean "and", ie. the intersection? Or something else like the exclusive "or"?|dw:1447212680257:dw||dw:1447212777437:dw|

- amistre64

\[Z=|dw:1447246207806:dw|(X_1\cap Y_1 )\cup (X_2\cap Y_2)\]

- amistre64

\[Z=(X_1\cap Y_1 )\cup (X_2\cap Y_2)\]

- amistre64

we can use |x| since it is not in the format of a piecewise function.
we should be able to write it all in one 'piece'.

- anonymous

Okay, so you want to find a "closed" form for \(z(x,y)\) that is itself not piecewise, but you'll allow that it can be written in terms of other functions with "closed" forms that may be piecewise by definition. Is that right?
By "closed", I mean, for example, that \(f(x)\) is not in a "closed" form, while \(g(x)\) is, despite the fact that \(f(x)=g(x)\).
\[f(x)=\begin{cases}x&x\ge0\\[1ex]-x&x<0\end{cases}\quad\quad\quad\quad g(x)=|x|\]
Consider the 2-dimensional analogue of the step function:
\[\mathcal{U}(x,y)=\begin{cases}1&(x>0)\land(y>0)\\[1ex]0&\text{otherwise}\end{cases}\]then
\[\begin{align*}z(x,y)&=\mathcal{U}(2-x,y-7)-\mathcal{U}(x-5,7-y)+\mathcal{U}(x-5,10-y)\\[1ex]&\quad\quad-\mathcal{U}(x-5,y-7)+\mathcal{U}(x-2,7-y)+\mathcal{U}(x-2,y-7)\end{align*}\]Here's a plot in Mathematica.

##### 1 Attachment

- Kainui

Ok I thought about this longer than I care to admit, but I found a way to construct the graph based off layering two of these on top of each other at the right points:
\[f(x,y)=-\frac{xy}{|xy|}\]
So my solution is then:
\[z(x,y) = \tfrac{1}{2}+\tfrac{1}{2} |f(x-2,y-10) + f(x-5,y-7)|\]

- ganeshie8

that's brilliant !
it seems a slight tweaking is required...
apart from domain restrictions, your function takes the value \(3/2\) for \(x\in (2, 5) \land y \in (7, 10)\) right ?

- ganeshie8

that is for @Kainui :)

- Kainui

Hahaha yes there is a slight mistake I just realized I should have divided by the absolute value, like this:
\[z(x,y) = \tfrac{1}{2}+\tfrac{1}{2}\frac{ f(x-2,y-10) + f(x-5,y-7)}{ |f(x-2,y-10) + f(x-5,y-7)|}\]
Really I'm just abusing the \(sgn(x)=\frac{x}{|x|}\) function, I could have written this whole thing in terms of it as:
\[z(x,y) = \tfrac{1}{2}+\tfrac{1}{2} sgn( sgn(x-2)sgn(y-10) + sgn(x-5)sgn(y-7))\]

- Kainui

Wait I don't know if I fixed it or not #_# I'm not too far away from fixing it though if it turns out it's wrong though haha

- Kainui

Ok, this looks like what I really want and I'm using \(sgn(x)=\frac{x}{|x|}\)
\[z(x,y) = sgn( sgn(x-2)sgn(y-10) +1 + sgn(x-5)sgn(y-7) + 1)\]
if we look at this before taking the final sgn() of the expression, we have something that has these heights: |dw:1447389735623:dw|

- amistre64

is the wolf reading your results correctly?
my approach was based on the sign function as well - after I developed a function that would act like a switch, i found out that someone else had already developed it :)
I was curious if i could create the logical AND, OR effects and was hampered when i devised an overlapping region - afterall, 1+1=2 is the bane of my existence.
I ended up splitting the domain of x into 3 parts, (-inf,2) or (2,5) or (5,inf), then switched it on or off.
\[\large \begin{matrix} z=&&\frac{1}{4}\left(\frac{(2-x)}{|(x-2)|}+1\right)\left(\frac{(y-7)}{|(y-7)|}+1\right)\\
&+&\frac{1}{2}(\frac{(x-2)(5-x)}{|(x-2)(x-5)|}+1)\\
&+&\frac{1}{4}(\frac{(x-5)}{|(x-5)|}+1)(\frac{(10-y)}{|(y-10)|}+1)
\end{matrix}\]

##### 1 Attachment

- amistre64

i forgot to change to left( right) in the code .. thought it was looking odd lol

- Kainui

I don't really have any good 3D graphing stuff, but I think the idea makes sense even if what I've written is wrong somehow haha. Interesting approach I'll admit when I first saw this problem I didn't think it was possible.

- amistre64

im going to device a 'smiley face' somehow. ive already figured out its quite simple to make a circle 'platform'
\[\frac12\left(\frac{r^2-(x^2+y^2)}{|r^2-(x^2+y^2)|}+1\right)\]
but i need to learn how to define the xy domains in order for the wolf to render it infull view.

- Kainui

This switching trick is pretty interesting I'm kinda enjoying playing with it, it reminds me of the discrete fourier transform

- amistre64

i had fun with it as well :) never learned much about the fourier stuff.

- amistre64

now that we have a way to control z, instead of z=0,or z=1, we can define it for whatever surface you like.
lets say: z is our switch, then z*(surface) is either 0 when z=0, or it is the surface when z=1

Looking for something else?

Not the answer you are looking for? Search for more explanations.