Using a line integral to find work