# Line Integrals

• Nov 25th 2009, 12:20 AM
MathTooHard
Line Integrals
Evaluate the line integral $\int_C sin \ x \ dx + cos \ y \ dy$ where C consists of the top half of the circle $x^2+y^2=1$ from (1,0) to (-1,0) and the line segment from (-1,0) to (-2,3)

I got 0 for the line integral over the circle, and $Cos \ 1- Cos \ 2 +Sin \ 3$ over the line segment. However, the answer provided is $Cos \ 1- Cos \ 2 +Cos \ 3$. Can someone check?

Also, anyone know a way to evaluate line integrals on Mathematica?
• Nov 25th 2009, 01:02 AM
Andrew007
Your line integral is right, I just checked. Maybe the arc needs to be expressed solely in terms of x or y, rather than $x^2 + y^2 = 1$? For example replace y with $sqrt(1 - x^2)$. However the integral becomes very complicated after that..
• Nov 25th 2009, 01:18 AM
MathTooHard
• Nov 25th 2009, 01:43 AM
MathTooHard
Quote:

Originally Posted by Andrew007
Your line integral is right, I just checked. Maybe the arc needs to be expressed solely in terms of x or y, rather than $x^2 + y^2 = 1$? For example replace y with $sqrt(1 - x^2)$. However the integral becomes very complicated after that..

Quick question though: would such a substitution change anything? It's still the same expression.
• Nov 25th 2009, 02:55 AM
shawsend
Quote:

Originally Posted by MathTooHard

Also, anyone know a way to evaluate line integrals on Mathematica?

Mathematica can do line integrals if you supply the parameterization:

Here's yours:

Code:

In[24]:= x[t_] := Cos[t]; y[t_] := Sin[t]; Integrate[Sin[x[t]]*Derivative[1][x][t],   {t, 0, Pi}] + Integrate[   Cos[y[t]]*Derivative[1][y][t],   {t, 0, Pi}] x[t_] := t; y[t_] := -3*t - 3; Integrate[Sin[x[t]]*Derivative[1][x][t],   {t, -1, -2}] + Integrate[   Cos[y[t]]*Derivative[1][y][t],   {t, -1, -2}] Out[26]= 0 Out[29]= Cos[1] - Cos[2] + Sin[3]