<s>[INST] Evaluate line integral $\int_c x\,dx+ y\,dy + z\,dz$, where $C$ is the straight line from $(1,0,0)$ to $(0,1,\pi/2)$ 
$ \displaystyle \int_c x\,dx+ y\,dy + z\,dz$, where $C$ is the straight line from
  $(1,0,0)$ to $(0,1,\pi/2)$

Parametric form of line will be:
$$x=1 - t, \quad y= t, \quad z= \frac{\pi t} 2$$
The integral becomes
$$\int_0^1 2t -1 + \frac{\pi^2t} 4  \, dt$$
but the final answer given in my book is $\pi^2/8$
which I am not getting by this.
So where am I making the mistake ?
 [/INST] Given $x = 1-t, y = t, z = \frac{\pi}{2} t$ then,
\begin{align*} x\, \textrm{dx} + y\, \textrm{dy} + z\, \textrm{dz} &=(1-t)(-1)\,dt + t(1)\, \rm{dt} + \frac{\pi}{2} t \left( \frac{\pi}{2}\right) \, \rm{dt}  \\ \\ & = \left(-1+t+t+ \frac{\pi^2}{4}t\right) \, \rm{dt}  \\ \\ & = \left( t \left( 2+\frac{\pi^2}{4}  \right) - 1 \right) \, \rm{dt} \end{align*}
Okay so that's fine. Now integrate this on $[0,1]$.
\begin{align*} \int_0^1 t \left( 2+\frac{\pi^2}{4}  \right) - 1 \ \rm{dt} & = \left. \frac{1}{2}\left( 2+\frac{\pi^2}{4}  \right) t^2 \right|_{t = 0}^{t=1} - \left. t \vphantom{\frac11} \, \right|_{t = 0}^{t=1} \\ \\ & = \frac{1}{2}\left( 2+\frac{\pi^2}{4}  \right) - 1 \\ \\ & = \frac{\pi^2}{8}\end{align*}
</s>