Maximizing the line integral over a line segment 
Let $f(x,y) = 8x + 6y$. Take $C$ to be the line segment with length $10$ starting at the point $(2,2)$. At what point should the line segment end for $$\int_C \nabla f\cdot d{\bf r}$$ to be maximized?

I think I have an idea of how to approach the problem, but I wanted to know if there are any special properties that are immediate from the given problem that make this problem "nice".
Here's my attempt: We want ${\bf r}(t) = \langle 2, 2\rangle + t\langle a-2, b-2\rangle$ such that $\|{\bf r}\| = 10$, for some point $(a,b)$ and $t\in[0,1]$. We know that $${\bf r}(1) = (a,b),$$ so we have that $a^2 + b^2 = 100$ implies that $b = \pm\sqrt{100 - a^2}$. Well, using the fundamental theorem of line integrals, we have that $$\begin{align}\int_C\nabla f\cdot{\bf r} & = f(a,b) - f(2,2)\\& = 8a + 6b - 28 \\ &= 8a + 6\pm\sqrt{100-a^2} - 28\end{align},$$ which considering the positive root, we have a maximum of $10\sqrt{65} - 22 \approx 58.6$ at $a = 16\sqrt{5\over13}$, and the negative root has a maximum of $58$ at $a = 10$. Obviously $58.6 > 58$, so we only worry about the positive root. Therefore, when $a = 16\sqrt{5\over13}$, $b = 2\sqrt{5\over13}$.
This seems to be correct (I haven't checked the answer and can't unfortunately), but I don't know if this is even the way you're expected to do this problem. Would anyone happen to know of a better way?
 A: You say that $\textbf{r}(1)=(a,b)$, so $a^2+b^2=100$. But $(a,b)$ is not distance $10$ from the origin, rather distance $10$ from $(2,2)$. So what you know is that $\|\langle a-2,b-2\rangle\|=10$, i.e., $(a-2)^2+(b-2)^2=100$. I think you can continue with the optimization the way you have.
There is an easier way though. Note that $\nabla f=\langle 8,6\rangle$ is a constant vector field. The line integral $\int_C \nabla f \cdot d\textbf{r}$ is by definition $\int_C \nabla f \cdot \textbf{n} \ ds$, where $\textbf{n}$ is a unit tangent vector to the curve $C$ at every point. Since $C$ is a straight line, $\textbf{n}$ is constant along the curve. So $\nabla f \cdot \textbf{n}$ is constant as well, with $\nabla f \cdot \textbf{n}=\|\langle 8,6\rangle\|\|\textbf{n}\| \cos \theta = 10\cos \theta$, where $\theta$ is the angle between $\nabla f=\langle 8,6\rangle$ and $\textbf{n}$. Thus $$\int_C\nabla f \cdot d\textbf{r}=\int_C \nabla f \cdot \textbf{n} \ ds=10\cos \theta \int_C 1 \ ds = 10 \cos \theta ~\text{length}(C)=100\cos \theta.$$
This is maximized when $\cos\theta=1$, i.e., $\theta=0$. In this case, $\textbf{n}$ is a positive scalar multiple of $\nabla f= \langle 8,6\rangle$, so $C$ goes in the same direction as $\langle 8,6\rangle$. As it happens, $\langle 8,6\rangle$ is already a vector of length $10$, so you know the endpoint of $C$ must be $\langle 2,2\rangle + \langle 8,6 \rangle = \langle 10,8\rangle$. 
A: Note that $\nabla f \equiv (8,6)$ is constant. Writing $\alpha(t) = (2,2) + t\mathbf{v}$ with $||\mathbf{v}|| = 1$ for our line segment, we have
$$ \int_{\alpha} (\nabla f) \cdot d\mathbf{r} = \int_0^{10} (\nabla f)(\alpha(t)) \cdot \dot{\gamma}(t) \, dt = \int_0^{10} (8,6) \cdot \mathbf{v} \, dt = 10 ((8,6) \cdot \mathbf{v}). $$
To maximize this expression, you want the vector $\mathbf{v}$ to point in the same direction as $(8,6)$ and so the expression is maximized for $\mathbf{v} = \frac{(8,6)}{||(8,6)||}$ (formally, this is the equality case of the Cauchy-Schwartz inequality) and the end point will be
$$ \alpha(10) = (2,2) + 10 \frac{(8,6)}{||(8,6)||} = (2,2) + (8,6) = (10,8). $$
