Find a potential function for the vector field

(a) We want to find a scalar function [tex]f(x,y,z)[/tex] such that [tex]\mathbf F = \nabla f[/tex]. This means
[tex]\dfrac{\partial f}{\partial x} = 2xy + 24[/tex]
[tex]\dfrac{\partial f}{\partial y} = x^2 + 16[/tex]
Looking at the first equation, integrating both sides with respect to [tex]x[/tex] gives
[tex]f(x,y) = x^2y + 24x + g(y)[/tex]
Differentiating both sides of this with respect to [tex]y[/tex] gives
[tex]\dfrac{\partial f}{\partial y} = x^2 + 16 = x^2 + \dfrac{dg}{dy} \implies \dfrac{dg}{dy} = 16 \implies g(y) = 16y + C[/tex]
Then the potential function is
[tex]f(x,y) = \boxed{x^2y + 24x + 16y + C}[/tex]
(b) By the FTCoLI, we have
[tex]\displaystyle \int_{(1,1)}^{(-1,2)} \mathbf F \cdot d\mathbf r = f(-1,2) - f(1,1) = 10-41 = \boxed{-31}[/tex]
[tex]\displaystyle \int_{(-1,2)}^{(0,4)} \mathbf F \cdot d\mathbf r = f(0,4) - f(-1,2) = 64 - 41 = \boxed{23}[/tex]
[tex]\displaystyle \int_{(0,4)}^{(2,3)} \mathbf F \cdot d\mathbf r = f(2,3) - f(0,4) = 108 - 64 = \boxed{44}[/tex]