Evaluate the line integral $\int_C \ x^2 dx+(x+y)dy \ $ 
Evaluate the line integral $$\int_C \ x^2 dx+(x+y)dy \ $$
  where $C$ is the path of the right triangle with vertices $(0,0), (4,0)$ and $(0,10)$  starts from the origin and goes to $(4,0)$ then to $(0,10)$ then back to the origin.

I did this problem but the answer is incorrect. First I looked at it from $(0,0)$ to $(4,0)$
THe magnitude of $r'(t)$ was $4$. 
$r(t) = \langle 4t,0 \rangle$ for $0 \le t \le 1$. 
Using this information I got $40/3$ as my answer after evaluating the integral. 
Then I looked at the point from $(4,0)$ to $(0,10)$
$r(t)=\langle 4-4t,10t \rangle$ for $0 \le t \le 1$
The magnitude of $r'(t)$ is $2 \sqrt{29}$
Using this information I got $\frac{74}{3}\sqrt{29}$ as my answer after evaluating the integral.
Then I looked at the point from $(0,10)$ to $(0,0)$
$r(t) = \langle 0,-10t \rangle$ for $-1 \le t \le 0$
The magnitude of $r'(t)$ is $10$
Evaluating the integral I got the answer of $50$
Adding all three my final answer was $196.1673986$ but lon capa says this is incorrect. Can someone tell me where I am making a mistake? 
 A: You can simplify this considerably. The field is $$(x^2,x+y)=(x^2,y)+(0,x)$$ Note that the first component is conservative, so its line integral over a closed path is $0$. Therefore we are left with evaluating $$\int_C{xdy}$$ where $C$ is the right triangle. Now if you know Green's Theorem, then: By Green's Theorem, this will just be the area of the triangle. So the answer is $${1\over 2}\cdot4\cdot10=20$$
Otherwise, you should not have too much trouble computing that line integral along the triangle. Note that you can do one more simplification: it will be zero along the first edge, because the field $(0,x)$ is orthogonal to the line $y=0$.
A: Hints for you to explain/justify:
From $\;(0,0)\;$ to $\;(4,0)\;$ :
$$\begin{cases}0\le x\le 4\\{}\\y=0\end{cases}\;\;\implies dy=0\;,\;\;\text{so:}$$
$$\int\limits_0^4 x^2dx=\left.\frac13x^3\right|_0^4=\frac{64}3$$
From $\;(4,0)\;$ to $\;(0,10)\;$ :
$$\begin{cases}0\le x\le 4\\{}\\y=-\frac52x+10\end{cases}\;\;\implies dy=-\frac52\;,\;\;\text{so}$$
$$-\int\limits_0^4\left[x^2+\left(-\frac32x+10\right)\left(-\frac52\right)\right]dx=-\frac{64}3-30+100=\frac{146}3$$
From $\;(0,10)\;$ to $\;(0,0)\;$ ...you do this integral: its value is $\;-50\;$
Thus, the whole line integral's value is $\;20\;$ ...
A: The line integrations along each leg look like
$$ (0,0) \ \rightarrow \ (4,0) \ : \ \ dy \ = \ 0 \ \ \Rightarrow \ \ \int_0^4 \ x^2 \ dx \ \ ;  $$
$$ (4,0) \ \rightarrow \ (0,10) \ : \ \ y \ = \ 10 - \frac{10}{4}x \ \ \Rightarrow \ \ \int_4^0 \ x^2 \ dx \ + \ (x \ + \ [10 - \frac{10}{4}x]) \ (- \frac{10}{4} \ dx) $$
[note that the first term reverses the integration along the leg on the $ \ x-$ axis (which gives $ \ \frac{64}{3} \ $ ) , so we'll drop it]
$$  \int_4^0 \   \frac{15}{4}x \ - \ 25 \ \ dx  \  \ = \ (\frac{15}{8}x^2 \ - \ 25x) \ \vert^0_4 \ = \ -\frac{15}{8} \cdot 4^2 \ + \ 100 \ = \ 70 \ \ ;  $$
$$ (0,10) \ \rightarrow \ (0,0) \ : \ \ dx \ = \ 0 \ , \ x \ = \ 0 \ \ \Rightarrow \ \ \int_{10}^0 \ (x+y) \ dy \ = \ 0 \ + \ \frac{1}{2} y^2 \ \vert_{10}^0 $$
$$ = \ -\frac{100}{2} \ = \ -50 \ \ .  $$
So the sum around the triangle is 
$$ [ \frac{64}{3} ] \ + \ \left( \ [-\frac{64}{3} ] \ - \ 30 \ + \ 100 \ \right) \ - \ 50 \ = \ 20 \ \ , $$
confirming the Green's Theorem result found by NotNotLogical.
