Find all $x,y$ for which $\nabla f$ forms an angle of $45°$ with the vector $(1,1)$ Let $f=x^2+y^2 \implies \nabla f=(2x,2y)$.
Find all $x,y$ for which $\nabla f$ forms an angle of $45°$ with the vector $(1,1)$.
So I thought of taking the dot product $2x+2y=\nabla f \cdot v=||\nabla f|\cdot||v|| \cos(45°)=4\sqrt{x^2+y^2}$.
But the I couldn't solve $x+y=2\sqrt{x^2+y^2}$, I know, from inspection that $x=-y$ is a solution, and I think there are no other solutions, but I don't know how to prove it.
Could you guys help me out?
E: Oh god, I see where my mistake was... I miscalculated $\cos(45°)$ as $\sqrt 2$.
 A: Since you are using cartesian co-ordinates, $(1,1)$ forms an angle of $45°$ with $x$ and $y$ co-ordinates.
So $\nabla f$ will form a $45°$ angle with $(1,1)$ if it lies on the positive x or y axis exclusively.
So $\nabla f = c \vec i$
or $\nabla f = c\vec j$
$c > 0$ is any scalar.
so $(c, 0)$ and $(0, c)$.
A: I'll do the same thing as you, but I think that that your dot product is incorrect. If $v$ is the vector through $(1,1)$, then $v=(\frac{1}{2},\frac{1}{2})$, so
$$
x+y=\nabla f \cdot v = ||\nabla f|| \cdot ||v|| \cos{(45^{o})}= \sqrt{x^2+y^2}.
$$
Square that and obtain
$$
(x+y)^2=x^2+y^2 \implies 2xy=0 \implies xy=0,
$$
so $x=0$ or $y=0$, which means that $(x,y)=(a,0)$ or $(x,y)=(0,b)$, $a,b \in \mathbb{R}^{+}.$
A: Clearly we can see that the vector $\hat x+\hat y$ makes a $45$ degree angle with both coordinate axes.  We expect solutions $x=0$ and $y=0$. To show this, we have the condition
$$\frac{\nabla f(x,y)}{|\nabla f(x,y)|} \cdot \frac{\hat x+\hat y}{\sqrt{2}}=\frac{\sqrt{2}}{2}\implies x+y=\sqrt{x^2+y^2}$$
which has solutions $x=0$ or $y=0$ as expected!

Special Note:
Note that since $\nabla f=2\hat xx+2\hat yy$, then $|\nabla f|=2\sqrt{x^2+y^2}$, and therefore we have that 
$$\frac{\nabla f(x,y)}{|\nabla f(x,y)|} =\frac{\hat xx+\hat yy}{x^2+y^2} \tag{SN1}$$
Next, we note that the unit vector that points from $(0,0)$ to $(1,1)$ is give by 
$$\frac{\hat x+\hat y}{\sqrt{2}} \tag {SN2}$$
Taking the inner product of the right-hand sides of $(SN1)$ and $(SN2)$, we have
$$\frac{x+y}{\sqrt{2}(x^2+y^2)} \tag {SN3}$$
whereupon setting $(SN3)$ equal to $\cos \pi/4=\sqrt{2}/2$ gives 
$$x+y=\sqrt{x^2+y^2}\implies xy=0$$
and we have either $x=0$ or $y=0$.
