Geometry Solver
Home › Calculus - several variables

How to compute a line integral along a straight segment

The recipe: parametrise, substitute, integrate

A line integral along a straight segment is turned into an ordinary definite integral in three moves. Write both coordinates through one parameter, , ; replace and by and ; integrate from the value of at the starting point to the value at the finishing point. Two details decide the sign and the value. The limits follow the direction of travel - swapping the endpoints flips the sign. And when the field is not conservative, so the answer genuinely depends on the path: the fact that the path is a straight segment is part of the problem, not a convenience.

Problem

Find , where and , along the straight segment.

Answer

Checked by hand: the substitution and the limits are correct. Note the direction: from A to B the answer would be +56/3.

Step-by-step solution

1. Parametrise the segment

Both points lie on the line , so the whole segment is described by one parameter:

The path runs from to , so runs from down to - the limits keep that order.

2. Substitute and simplify

Inside the brackets:

so the integral becomes

3. Integrate

The minus sign is not an accident: we walked from to , that is, in the direction of decreasing . Reversing the direction would give .

4. Why the path had to be given

Check the potential test for this field:

These are not equal, so the field is not conservative and the integral really does depend on the route. Along a different curve joining the same two points the answer would be different.

Add to Chrome - solve your own

Screenshot any problem on your screen and get the steps. Chrome on a computer; free.