Find the curve integral ∫ L (x + y) ds, l is the straight line segment connecting (1.0) (0.1) two points. (PS: explain how DS is transformed into DX)

Find the curve integral ∫ L (x + y) ds, l is the straight line segment connecting (1.0) (0.1) two points. (PS: explain how DS is transformed into DX)

Method 1
The line equation from (1,0) to (0,1) is y = 1-x, 0 ≤ x ≤ 1
From the arc differential formula: DS = √ (1 + y '&# 178;) DX = √ (1 + 1) DX = √ 2DX
Therefore:
∫(L) (x+y) ds
=∫[0→1] (x+1-x) √2dx
=√2∫[0→1] 1 dx
=√2
Method 2: the integrand function is simplified by the equation of L. The equation of L is: x + y = 1
The original formula = ∫ (L) 1 DS = √ 2
(the integrand is 1, the integral result is the length of the curve, and the length of the line segment is: √ 2)