# How do I simplify this expression further?

Okay so my adventure starts with this equation $$|x|+|y|=1$$ This makes a square so what I wanted two do is turn it around so it's sitting "right". My plan was to convert the equation to polar and then add $\pi/4$ to $\theta$.

Conversion to polar

It was a straight forward task and I got this $$|r\cos\theta| +|r\sin\theta|=1$$Now I needed to clean the equation up a little bit so I collected the $r$ terms as such: \begin{align}1&=|r\cos\theta| +|r\sin\theta|\\&=r|\cos\theta|+r|\sin\theta|\\&=r\left(|\cos\theta|+|\sin\theta|\right)\\1/r&=|\cos\theta|+|\sin\theta|\end{align} Two $\theta$s got messy so I rearranged the equation to have one $\theta$ \begin{align}1/r&=|\cos\theta|+|\sin\theta|\\1/r^2&=\cos^2\theta+\sin^2\theta+|2\sin\theta\cos\theta|\\1/r&=\sqrt{1+|\sin2\theta|}\end{align}Using the trig identies $\sin^2\theta+\cos^2\theta=1$ and $2\sin\theta\cos\theta=\sin2\theta.$

So now that I have my desired polar equation I went about turning the square. To achieve a $\pi/4$ turn I had to add this to each $\theta$. Which gets me a new "$\theta$". If you recall the sin function within the last equation had the $\theta$ so the new operand in that function becomes $$2\theta\implies2\theta+\pi/2$$ This is the equation that I desire for a square. It works and I am happy with it. However I need to turn this back into Cartesian coordinates.

Conversion into Cartesian

Now that I have $$1/r=\sqrt{1+|\sin(2\theta+\pi/2)|}$$ I imideately realise that there are two trig identities hidden in there. First a sin - cosine relation. $$\sin(2\theta+\pi/2)=\cos(2\theta)$$ then a double angle $$\cos(2\theta)=2\cos^2\theta-1$$ Now we have $$1/r=\sqrt{1+|2\cos^2\theta-1|}$$ It is ready to be converted. So I start with $r=\sqrt{x^2+y^2}$ and $\theta=\arctan\left(\frac yx\right)$. $$\frac1{\sqrt{x^2+y^2}}=\sqrt{1+\left|2\cos^2\left[\arctan\left(\frac yx\right)\right]-1\right|}$$ To see if it is still a square I checked and it is. So I am assuming that the mistake will come up after.Okay so I am using trig identities so evaluate $\cos^2\{\arctan(y/x)\}$ \begin{align} \cos^2\left[\arctan\left(\frac yx\right)\right] =\frac1{y^2/x^2+1}\end{align} Putting it all together \begin{align}\frac1{\sqrt{x^2+y^2}}&=\sqrt{1+\left|\frac2{y^2/x^2+1}-1\right|}\\\frac1{x^2+y^2}&=1+\left|\frac2{y^2/x^2+1}-1\right|\end{align} This is where I get stuck as I have no idea how to collect the $y$ from the RHS.

I should make it clear that I want a single $y$ term on the LHS and all the $x$ terms on the RHS.

-
You have $r=1/\sqrt{1+|\sin(2\theta)|}$. That is $r\ne\sqrt{1+|\sin(2\theta)|}$ – AD. Aug 20 '13 at 16:31
@AD. Ooops thats a typo, Thank you very much for pointing that out! – Ali Caglayan Aug 20 '13 at 16:35
Ok, I see. So your problem is actually two questions whereof the first one you have already solved? – AD. Aug 20 '13 at 16:36
@AD. You can think of it that way yes. It's more about simplifying the last expression but I also presented my work previously building up to that so that people can see where I am coming from. – Ali Caglayan Aug 20 '13 at 16:37
Note that you also have $$\cos^2\theta = \frac{x^2}{r^2}=\frac{x^2}{x^2+y^2}$$ – AD. Aug 20 '13 at 16:46

You have $$\frac{1}{x^2+y^2} = 1+\left|\frac{2}{y^2/x^2+1}-1\right| = 1+\frac{|x^2-y^2|}{x^2+y^2},$$ or put differently $$1 = x^2+y^2 + |x^2-y^2|.$$

At this point solving by cases helps. Where $|x|<|y|$ we have $1=2y^2$, and elsewhere $1=2x^2$. Hence we have $$\|(x,y)\|_\infty=\max\{|x|,|y|\} = \frac{1}{\sqrt{2}}$$

-
+1 The equation looks actually pretty nice. – AD. Aug 20 '13 at 16:53

I think polar coordinates led you down the wrong path. You want to rotate the plane by $\pi/4$, so you want to replace $x$ by $\dfrac1{\sqrt2}(x+y)$ and $y$ by $\dfrac1{\sqrt2}(-x+y)$. This gives you the equation $$|x+y|+|y-x| = \sqrt2\,.$$ You get the standard square with sidelengths $2$ by changing the right hand side to $2$.

-
This is entirely the wrong place for it, and perhaps points to bad manners, but what the heck: if you're the T. Shifrin, I really enjoyed your multivariable calculus. – Jonathan Y. Aug 20 '13 at 16:50
@Jonathan: Many thanks :) – Ted Shifrin Aug 20 '13 at 17:08

I should make it clear that I want a single $y$ term on the LHS and all the $x$ terms on the RHS.

If you mean that all the $x$ terms should be on one side, and all the $y$ terms should be on the other side, then that's impossible! Let the sides of the square be at a distance of $c$ from the origin, so the four corners are at $(c,c), (c,-c), (-c,-c),(-c,c)$. I suppose $c=1/\sqrt2$, but that detail isn't important.

You're asking for two functions $f$ and $g$ such that the square is the solution set of the equation $f(x)=g(y)$. Very well, suppose such functions exist. Since $(c,c)$ is a point on the square, we must have $f(c)=g(c)$. Since $(0,c)$ and $(c,0)$ are also points on the square, we also have $f(0)=g(c)$ and $f(c)=g(0)$. But now, look: $$f(0)=g(c)=f(c)=g(0).$$ Since $f(0)=g(0)$, the origin $(0,0)$ is also in the solution set! That's not what you want.

We've learned that no equation of the form $f(x)=g(y)$ can define an axis-aligned square, i.e. all points $(x,y)$ where $\max\{|x|,|y|\} = c$. At best it can define a filled-in square, i.e. all points where $\max\{|x|,|y|\} \leq c$.

-