# Evaluate the Following Line Integral Part 1

## Homework Statement

$\int_{c}cos (x)dx+sin(y)dy$ where c consist of the top half of the circle x^2+y^2=1 from (1,0) to (-1,0)

## The Attempt at a Solution

Do I parameterise x=t and then y becomes $y= (1-t^2)^{1/2}$....? Replace the corresponding dx and dy and then integrate between the limits?

Related Calculus and Beyond Homework Help News on Phys.org
I like Serena
Homework Helper
Hi bugatti79!

Well, yes, you have to parametrize to calculate the result.
But you can integrate before you parametrize.

HallsofIvy
Homework Helper
That's one way to do it. Another is to think of this in polar coordinates with r= 1. In polar coordinates, $x= r cos(\theta)$ and $y= r sin(\theta)$ so on the unit circle, $x= cos(\theta)$ and $y= sin(\theta)$. These are the "standard" parameterizations of the unit circle.

Of course, going form (1, 0) to (-1, 0), $\theta$ goes from 0 to $\pi$. You will need to determine dx and dy in terms of $d\theta$.

Thanks guys,
I think the notes only show parameterisation etc. I will take note of the other option. I suspect integrating first before parameterising is easier. Will try it later...

That's one way to do it. Another is to think of this in polar coordinates with r= 1. In polar coordinates, $x= r cos(\theta)$ and $y= r sin(\theta)$ so on the unit circle, $x= cos(\theta)$ and $y= sin(\theta)$. These are the "standard" parameterizations of the unit circle.

Of course, going form (1, 0) to (-1, 0), $\theta$ goes from 0 to $\pi$. You will need to determine dx and dy in terms of $d\theta$.
Ok, I arrive at

$\displaystyle \int_{0}^{\pi }cos(-r sin(\theta) )d\theta+ sin(r cos(\theta))d\theta$

...this doesnt look right...?

I like Serena
Homework Helper
Ok, I arrive at

$\displaystyle \int_{0}^{\pi }cos(-r sin(\theta) )d\theta+ sin(r cos(\theta))d\theta$

...this doesnt look right...?
I'm afraid you didn't substitute properly.
It should be:

$\displaystyle \int_{0}^{\pi }cos(r \cos(\theta) ) \cdot -r \sin(\theta) d\theta+ \sin(r \sin(\theta)) \cdot r \cos(\theta) d\theta$

Furthermore, you should substitute r=1.

But rather than doing this, I recommend integrating first, then substituting the parameterisation (one or the other), and then calculate the result.

How would you integrate $\int \cos(x)dx$?

I'm afraid you didn't substitute properly.
It should be:

$\displaystyle \int_{0}^{\pi }cos(r \cos(\theta) ) \cdot -r \sin(\theta) d\theta+ \sin(r \sin(\theta)) \cdot r \cos(\theta) d\theta$

Furthermore, you should substitute r=1
That was an error I made but I continue on and use substitution for the integral

$\displaystyle \int_{0}^{\pi }-cos^2(\theta) sin(\theta) d\theta + cos (\theta) sin^2(\theta) d\theta$

I let $u=cos \theta$ for the first integral and $u=sin \theta$ for second integral. I get an answer of -2/3....?

But rather than doing this, I recommend integrating first, then substituting the parameterisation (one or the other), and then calculate the result.

How would you integrate $\int \cos(x)dx$?
If I integrate first then I get sin(x) -cos(y) to be evaluated to some limits...not sure how to proceed..

In addition to this, in my notes it states not to "calculate"

$\int f_1(x,y,z)dx+f_2(x,y,z)dy+f_3(x,y,z)dz$ etc with respect to its variable while keeping the other 2 constant.....I suspect it is ok to do in this example because each integral is only a function of one variable...?

I like Serena
Homework Helper
That was an error I made but I continue on and use substitution for the integral

$\displaystyle \int_{0}^{\pi }-cos^2(\theta) sin(\theta) d\theta + cos (\theta) sin^2(\theta) d\theta$

I let $u=cos \theta$ for the first integral and $u=sin \theta$ for second integral. I get an answer of -2/3....?
Uhhm... did you know that cos(cos(θ))≠cos2(θ)?

If I integrate first then I get sin(x) -cos(y) to be evaluated to some limits...not sure how to proceed..
With your original parametrization you would have:
$$\left.sin(x(t)) - cos(y(t))\right|_{t=1}^{t=-1}$$
or with HoI's parametrization
$$\left.sin(x(θ)) - cos(y(θ))\right|_{θ=0}^{θ=\pi}$$

In addition to this, in my notes it states not to "calculate"

$\int f_1(x,y,z)dx+f_2(x,y,z)dy+f_3(x,y,z)dz$ etc with respect to its variable while keeping the other 2 constant.....I suspect it is ok to do in this example because each integral is only a function of one variable...?
If you keep one variable constant, say x, then you'd have $y=\sqrt{1-x^2}$.
$$\int_{x=1}^{x=-1} \cos(x)dx + \sin(\sqrt{1-x^2}) \cdot d(\sqrt{1-x^2})$$
$$\int_{x=1}^{x=-1} \cos(x)dx + \sin(\sqrt{1-x^2}) \cdot {1 \over 2\sqrt{1-x^2}} \cdot -2x \cdot dx$$

I recommend solving the second part of the integral with the substitution $y=\sqrt{1-x^2}$.

Uhhm... did you know that cos(cos(θ))≠cos2(θ)?

With your original parametrization you would have:
$$\left.sin(x(t)) - cos(y(t))\right|_{t=1}^{t=-1}$$
Oh, I over looked that substitution mistake!! Thanks!

How is yours evaluated? The sine or cos of 1 is not correct...?

So based on my comment on the way NOT to calculate...is it okay to do here because we are only dealing with one variable per integral?

or with HoI's parametrization
$$\left.sin(x(θ)) - cos(y(θ))\right|_{θ=0}^{θ=\pi}$$
I get the answer 2 using HoI's method.
Attempt on difficult integral will follow.

I like Serena
Homework Helper
Oh, I over looked that substitution mistake!! Thanks!

How is yours evaluated? The sine or cos of 1 is not correct...?
You have:
$$\left.\sin(x(t)) - \cos(y(t))\right|_{t=1}^{t=-1}$$
with $x(t)=t$ and $y(t)=\sqrt{1-t^2}$

Substituting:
$$\left.\sin(t) - \cos(\sqrt{1-t^2})\right|_{t=1}^{t=-1}$$

So yes, you would get sin(1) in there.

You would get:
$$(\sin(-1) - \cos(\sqrt{1-(-1)^2})) - (\sin(1) - \cos(\sqrt{1-1^2})) = -2 \sin(1)$$

So based on my comment on the way NOT to calculate...is it okay to do here because we are only dealing with one variable per integral?
I'm not sure what it means NOT to calculate.
Does it mean you should not actually integrate or something?

I get the answer 2 using HoI's method.
Attempt on difficult integral will follow.

You have:
$$\left.\sin(x(t)) - \cos(y(t))\right|_{t=1}^{t=-1}$$
with $x(t)=t$ and $y(t)=\sqrt{1-t^2}$

Substituting:
$$\left.\sin(t) - \cos(\sqrt{1-t^2})\right|_{t=1}^{t=-1}$$

So yes, you would get sin(1) in there.

You would get:
$$(\sin(-1) - \cos(\sqrt{1-(-1)^2})) - (\sin(1) - \cos(\sqrt{1-1^2})) = -2 \sin(1)$$
How would -2sin(1) evaluate to 2?

I'm not sure what it means NOT to calculate.
Does it mean you should not actually integrate or something?
Yes, it says

"you should never calculate

$\int f_1(x,y,z)dx+f_2(x,y,z)dy+f_3(x,y,z)dz$ by integrating f_1(x,y,z) wrt x (treating y+z like constants), same for f_2(x,y,z) etc. THis will give wrong answer....."

I like Serena
Homework Helper
How would -2sin(1) evaluate to 2?
It doesn't. Why should it?

Yes, it says

"you should never calculate

$\int f_1(x,y,z)dx+f_2(x,y,z)dy+f_3(x,y,z)dz$ by integrating f_1(x,y,z) wrt x (treating y+z like constants), same for f_2(x,y,z) etc. THis will give wrong answer....."
Ah, now I get it.
Indeed you can not do the integration wrt to 1 variable and expect it to work out.

And yes, in this case it was possible, because the integral could be separated into separate integrals with only 1 variable.

It doesn't. Why should it?
But arent the 3 different methods suppose to yield the saem answer...ie your method as in post #2 should yield the same as HoI..right? :-)

I like Serena
Homework Helper
But arent the 3 different methods suppose to yield the saem answer...ie your method as in post #2 should yield the same as HoI..right? :-)
Of course.
Any reason to think that it doesn't?

LCKurtz
Homework Helper
Gold Member
There is a much easier way to do this problem. Call C1 the given curve, C2 the straight line segment from [-1,0] to [1,0], and let C be $C_1\cup C_2$. Since you have the hypotheses for Green's Theorem you have:

$$0 = \int_C \cos x\, dx + \sin y\, dy = \left(\int_{C_1}+\int_{C_2}\right)( \cos x\, dx + \sin x\, dy)$$

$$\int_{C_1} \cos x\, dx + \sin y\, dy = - \int_{C_2} \cos x\, dx + \sin y\, dy = -\int_{-1}^1\cos x\, dx$$

I like Serena
Homework Helper
@LCKurtz:

Uhh... :uhh: Aren't you glossing over the fact the the curl of the function over the surface enclosed by C is zero in this case?

Of course.
Any reason to think that it doesn't?
Im afraid I dont know. In your method, we have integrated wrt x and used the x coordinates...so it seems right is it not?

For the difficult integral I end up with

$sin(x)|_1^{-1} + (-cos(1-x^2)^{1/2})|_1^{-1}$

I like Serena
Homework Helper
Im afraid I dont know. In your method, we have integrated wrt x and used the x coordinates...so it seems right is it not?

For the difficult integral I end up with

$sin(x)|_1^{-1} + (-cos(1-x^2)^{1/2})|_1^{-1}$

Yes.....

For the difficult integral I end up with

$sin(x)|_1^{-1} + (-cos(1-x^2)^{1/2})|_1^{-1}$
This doesnt give HoI answer of 2 either. I give up. I least I get nearly full marks :-) Thanks.

BTW..when I say I nearly get full marks...'if' it was an exam. It is just exercises :-)

I like Serena
Homework Helper
This doesnt give HoI answer of 2 either. I give up. I least I get nearly full marks :-) Thanks.

BTW..when I say I nearly get full marks...'if' it was an exam. It is just exercises :-)
Ah well, with HoI's parametrization you get:
$$\left.\sin(x(θ)) - \cos(y(θ))\right|_{θ=0}^{θ=\pi}$$
$$\left.\sin(\cos(θ)) - \cos(\sin(θ))\right|_{θ=0}^{θ=\pi}$$
$$(\sin(\cos(\pi)) - \cos(\sin(\pi))) - (\sin(\cos(0)) - \cos(\sin(0))) = -2\sin(1)$$

Ah well, with HoI's parametrization you get:
$$\left.\sin(x(θ)) - \cos(y(θ))\right|_{θ=0}^{θ=\pi}$$
$$\left.\sin(\cos(θ)) - \cos(\sin(θ))\right|_{θ=0}^{θ=\pi}$$
$$(\sin(\cos(\pi)) - \cos(\sin(\pi))) - (\sin(\cos(0)) - \cos(\sin(0))) = -2\sin(1)$$
uh oh.....ok. I see my mistake!! I need to wake up! Thanks I.L.S!

I like Serena
Homework Helper
You're welcome!

LCKurtz
Homework Helper
Gold Member
@LCKurtz:

Uhh... :uhh: Aren't you glossing over the fact the the curl of the function over the surface enclosed by C is zero in this case?
No. That is why the circuit integral is 0. Perhaps I should have included more detail about Green's theorem:

$$\oint_C Pdx + Qdy = \iint_R Q_x-P_y dA$$

which is 0 in this problem since (sin y)x = (cos x)y = 0.

I like Serena
Homework Helper
No. That is why the circuit integral is 0. Perhaps I should have included more detail about Green's theorem:

$$\oint_C Pdx + Qdy = \iint_R Q_x-P_y dA$$

which is 0 in this problem since (sin y)x = (cos x)y = 0.
Yes, this is what I meant.
This needs to be mentioned.
(And I am not going to explain it to the OP at this time! )