I have a problem figuring out what happens after cos$\theta$+sin$\theta$
where did the $\sqrt{2}$ come from?
where did cossin+cossin come from?
Thank you!


I have a problem figuring out what happens after cos$\theta$+sin$\theta$
where did the $\sqrt{2}$ come from?
where did cossin+cossin come from?
Thank you!


$\sqrt{2}$ comes from the equation: \begin{align} &\cos(\theta)+\sin(\theta)\\ =&\sqrt{2}[\frac{\sqrt{2}}{2}\cos(\theta)+\frac{\sqrt{2}}{2}\sin(\theta)]\\ =&\sqrt{2}[\cos(\theta)\sin(\frac{\pi}{4})+\sin(\theta)\cos(\frac{\pi}{4})] \end{align}
Well, first of all recall that given some differentiable function $f: \mathbb{R}^n \to \mathbb{R}$ the directional derivative of $f$ in the direction of some vector $v \in \mathbb{R}^n$ is simply $D_v f(p) = \left \langle \nabla f(p), v\right\rangle$. So our first part of the job is to find the gradient of this function. This is the easiest part, just take the partials and assemble on the gradient vector:
$$\nabla f(x,y)=(2x-y, 2y -x)$$
Our vector, on the other hand is just $v = (\cos \theta, \sin \theta)$ so that the directional derivative we are looking for is just:
$$D_vf(x,y)=(2x-y)\cos\theta+(2y-x)\sin\theta$$
However, we are interested on the point $(1,1)$ so what we are really interested will be obtained looking at the following:
$$D_vf(1,1)=\cos\theta+\sin\theta$$
Now here comes the magic. We've got the directional derivative along the vector $v$ at the point $(1,1)$ as a function $g : [0,2\pi) \to \mathbb{R}$ given by the easy realtion:
$$g(\theta)=\cos\theta + \sin\theta$$
Now these three questions can be answered using your knowledge of single variable calculus, so I'll let you continue from here. Another alternative is to use this thing you've posted to rewrite it as just a multiple of a $\sin$ function, so that you know how to find it's maximum and minimum and so on.
I hope this helps you out. Good luck!