2.8. Check that the differential expression is a complete differential of some function $u(x, y)$ and determine it:

a) $\left(3 x^{2} y+1\right) d x+\left(x^{3}-1\right) d y$

b) $y^{2} e^{x y} d x+e^{x y}(1+x y) d y$.
Solution.

a) In this case, $P=3 x^{2} y+1, Q=x^{3}-1$. As is known ( $\S 2.5$ ), the differential expression $P d x+Q d y$ is a complete differential of some function $u(x, y)$ if $Q_{x}=P_{y}$. Let's check this condition:

$$
\begin{aligned}
& Q_{x}=\frac{\partial}{\partial x}\left(x^{3}-1\right)=3 x^{2} \\
& P_{y}=\frac{\partial}{\partial y}\left(3 x^{2} y+1\right)=3 x^{2}
\end{aligned}
$$

The condition is satisfied. The desired function $u(x, y)$ will be determined using a line integral of the second kind, and as the line $L$ we choose a broken line connecting the points $O(0,0) ; A(x, 0) ; B(x, y)$ :

$$
\begin{gathered}
u(x, y)=\int_{O A B}\left(3 x^{2} y+1\right) d x+\left(x^{3}-1\right) d y+C= \\
=\int_{O A}\left(3 x^{2} y+1\right) d x+\int_{A B}\left(x^{3}-1\right) d y+C
\end{gathered}
$$

![](https://cdn.mathpix.com/cropped/2024_05_22_05b7516b505cf6654012g-128.jpg?height=280&width=358&top_left_y=703&top_left_x=469)

Figure 2.9

On the segment $O A$, $y=0$ and $d y=0$, on the segment $A B$, $d x=0$ (Figure 2.9). Finally, we get:

$$
u(x, y)=\int_{0}^{x} d t+\int_{0}^{y}\left(x^{3}-1\right) d t+C=x+\left(x^{3}-1\right) y+C
$$

b) Let's check the condition for the potential of the field

$$
\begin{aligned}
& \overrightarrow{\mathcal{A}}=(P, Q)=\left(y^{2} e^{x y}, e^{x y}(1+x y)\right): \\
& Q_{x}=\frac{\partial}{\partial x}\left(e^{x y}(1+x y)\right)=y e^{x y}(1+x y)+y e^{x y}=y e^{x y}(2+y x), \\
& P_{y}=\frac{\partial}{\partial y}\left(y^{2} e^{x y}\right)=2 y e^{x y}+y^{2} x e^{x y}=y e^{x y}(2+x y) .
\end{aligned}
$$

As in case a), to determine the desired potential $u(x, y)$, we will compute the work of the field along the broken line connecting the points $O(0,0) ; A(x, 0) ; B(x, y)$ :

$$
\begin{gathered}
u(x, y)=\int_{O A} y^{2} e^{x y} d x+\int_{A B} e^{x y}(1+x y) d y+C= \\
=\int_{0}^{y} e^{x t}(1+x t) d t+C=\frac{1}{x} \int_{0}^{x y} e^{\tau}(1+\tau) d \tau+C=\left.\frac{1}{x}\left(e^{\tau}(1+\tau)-e^{\tau}\right)\right|_{0} ^{x y}+ \\
+C=\frac{1}{x}\left(e^{x y}(1+x y)-e^{x y}\right)+C=y e^{x y}+C
\end{gathered}
$$