Find the work done by the force: $\vec{F}(x,y) = (x+y) \vec{i} + y^{2} \vec{j},$ along the straight line from $(1,0)$ to $(2,3)$.
Solution:
Firstly let's find the parametrization of this stright line which joins the points $A = (1,0)$ and $B=(2,3)$.
\begin{align*}
\vec{r}(t) = \vec{OA} + t\cdot \vec{AB}=\langle 1,0 \rangle + t \left(\langle 2,3\rangle - \langle 1,0\rangle\right) =\langle 1,0 \rangle + t \langle 1,3\rangle = \langle 1+t,3t\rangle \quad 0 \leq t \leq 1.
\end{align*}
Therefore work will be
\begin{align*}
\text{Work} = \int_{0}^{1}F(\vec{r}(t)) \cdot \vec{r}'(t)dt = \int_{0}^{1}\langle 1+t+3t, (3t)^{2}\rangle \cdot \langle 1,3\rangle dt=
\int_{0}^{1}1+4t+27t^{2} dt = t+2t+9t^{3}|_{0}^{1}=12
\end{align*}
Show that $\vec{F} = \left\langle\frac{1}{y},\frac{-x}{y^{2}}+1\right\rangle$ is conservative. Then, find the potential function for $\vec{F}$.
Solution:
Our vector field will be conservative if:
\begin{align*}
\frac{\partial}{\partial y}\left( \frac{1}{y} \right) = \frac{\partial }{\partial x}\left( \frac{-x}{y^{2}}+1 \right)
\end{align*}
and we see that this is true. Now we are going to find the potential function, say $f$. This means that $f$ must be such that
\begin{align*}
\nabla f = \langle f'_{x},f'_{y}\rangle = \left\langle\frac{1}{y},\frac{-x}{y^{2}}+1\right\rangle.
\end{align*}
This equality means that
\begin{align}
&f'_{x}(x,y) = \frac{1}{y} \quad (1)\\
&f'_{y}(x,y) = \frac{-x}{y^{2}}+1 \quad (2)
\end{align}
From $(1)$ we have
\begin{align*}
f'_{x}(x,y) = \frac{1}{y} \quad \text{hence} \quad f(x,y) = \frac{x}{y}+C(y) \quad \text{just by integration with respect to x variable}.
\end{align*}
Lets plug this expression of $f(x,y) = \frac{x}{y}+C(y)$ into $(2)$. So we will have
\begin{align*}
-\frac{x}{y^{2}}+C'(y) =\frac{-x}{y^{2}}+1 \quad \text{hence} \quad C'(y)=1 \quad \text{or} \quad C(y) = y+const. \quad \text{just by integration with respect to y variable}
\end{align*}
Thus our potential function is: $f(x,y) = \frac{x}{y}+y+const$.
Let's make sure that our potential function $f$ is indeed potential function. We just need to check that for the function $f(x,y) = \frac{x}{y}+y+const$ the following equality holds
\begin{align*}
\langle f'_{x},f'_{y}\rangle = \left\langle\frac{1}{y},\frac{-x}{y^{2}}+1\right\rangle.
\end{align*}
We see that this equality holds.