# Simple Line Integral — Just making sure I'm right

Compute the line integral $\int_C xe^{z^2} ds$ where C is the piecewise linear path from $(0,0,1)$ to $(0,2,0)$ to $(1,1,1)$.

I started out by parametrizing the curve and got:

$C_1: x = 0,\space y = 2t,\space z = 1-t$

$C_2: x = t, \space y = 2 -t,\space z = t$

$0 \leq t \leq 1$

I then set up two integrals:

$\int_{C_1} xe^{z^2} ds \space + \int_{C_2} xe^{z^2} ds$

Found that the first integral is $0$ because $x=0$ in the parametrization.

I then evaluate the second integral and got $\frac12(e-1)$. Did I do this right?

$C_1: \ \ \ x=0+0t, \ \ \ \ y = 0+2t, \ \ \ \ z=1+0t$
$C_1:x=0, y=2t, z=1$
I think the second integral should be $\frac{1}{2}(1-e)$ instead?, wait no you're right but your parameterization for $z$ on $C_2$ should be $z=t$ not $z=1-t$.
As to the parametrization, I got the same answer as yours, and I can confidently say that your parametrization is correct. Obviously the first line integral is 0. For the second line integral, the magnitude of the tangent vector is always $\sqrt 3$, and then plug in expressions for x, y, z in terms of t: $$\sqrt 3\int^1_{t=0}t*e^{t^2}dt$$ Mathematica yields the result $\frac {\sqrt 3}2(e-1)$, so the value for your second line integral that you gave is wrong.