# Real line integral

1. May 29, 2010

### irycio

1. The problem statement, all variables and given/known data
Calculate the line integral $$\int\limits_{AB} x^2 dx+ \sqrt{xy}dy$$, where AB is a part of a circle in the first quarter of carthesian coordinates system ranging from A(0,R) to b(R,0).

2. Relevant equations

3. The attempt at a solution
Parametrisation of a circle:
x=Rcos(t), y=Rsin(t)
dx=-Rsin(t)dt, dy=Rcos(t)dt
t ranges from $$\frac{\pi}{2}$$ to 0.

And so the integral with the parametrisation applied is:
$$\int\limits_{\frac{\pi}{2}}^0( -R^3 cos^2(t) sin(t)+R^2 \sqrt{sin(t)cos(t)}cos(t))dt$$

Now, the first part of the sum is simple. The latter one, the one with the root, is, according to Mathematica, analytically uncalculable (returns hypergeometric function). Now, when I tried evaluating the definite integral (using Mathematica), it returned $$\frac{1}{24} \left(8 R^2-3 \sqrt{2} \pi R \sqrt{R}\right)$$, whereas the answer says it's $$\frac{1}{15} R^2 (6 \sqrt{R}-5R)$$. Who's right and is it possible to calculate it on paper. Maybe I shuldn't have used the polar coordinates? But I would then end up with a double root!
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. May 29, 2010

### vela

Staff Emeritus
Are you sure the original integral is correct? I don't see how you can get a $$\sqrt{R}$$ in the answer from the integral you started with.

EDIT: I think the integral is supposed to be

$$\int_{AB} (x^2\,dx + \sqrt{x}y\,dy)$$

That'll give the answer you're trying to get, I think.

3. May 29, 2010

### irycio

That's what I was calculating, I just forgot to write the brackets ;). I wrote it correctly in 3-attempt at a solution. And this is what I evaluated in Mathematica. And integrating this root is the only problem :).

4. May 29, 2010

### Dick

Did you notice vela's version of the integral is sqrt(x)*y*dy, not sqrt(xy)*dy?

5. May 29, 2010

### irycio

My bad, I didn't, sorry. But what it says in the exercise book is sqrt(xy). And the answer came from mathematica, it seems quite wierd to me as well, but i checked it a couple of times

E: you're right, there is not root of r in the answer, my apologies. But the integral should be the way i wrote it.

6. May 29, 2010

### jackmell

Mathematica returns:

$$\int\limits_{AB} x^2 dx+ \sqrt{xy}dy = \frac{1}{24} \left(8 R^3-3 \sqrt{2} \pi R \sqrt{R}\right)$$

and is consistent with the numerical results.

7. May 29, 2010

### irycio

Whatever the result is, given that this exercise was taken from exercise book i would expect it to be calculable on a paper. And it is a book for undergraduates. WTF??

8. May 29, 2010

### vela

Staff Emeritus
Could you show us what you entered into Mathematica to get that result? In the second term, $$\sqrt{xy}$$ is proportional to R as is dy, so that term should be proportional to R2.

9. May 29, 2010

### irycio

Integrate[
Sqrt[r^2*Sin[t]*Cos[t]]*Cos[t] - r^2*Sin[t]*(Cos[t])^2, {t, \[Pi]/2,
0}]

You are right, I was wrong. I messed up with those 'r's'. But nevertheless, question remains actual-how the hell am i supposed to calculate it on a paper with the knowledge i've got after first term??

10. May 29, 2010

### vela

Staff Emeritus
I was actually curious to see what jackmell did since you two got the same result in Mathematica, even though you had changed your answer a few hours earlier.

I think it's just a typo in your book. To get their answer, you need to integrate $$\sqrt{x}y$$ instead of $$\sqrt{xy}$$, and you can do that easily with a substitution.

11. May 29, 2010

### jackmell

Code (Text):
Clear[r]
myval = Integrate[(-r^3)*Cos[t]^2*
Sin[t] + r^2*Sqrt[Cos[t]*Sin[t]]*
Cos[t], {t, Pi/2, 0}]

$$\int\limits_{AB} x^2 dx+ \sqrt{xy}dy = \frac{1}{24} \left(8 R^3-3 \sqrt{2} \pi R^2 \right)$$

and that is consistent with the numerical results:

Code (Text):
In[28]:=
N[(1/24)*r^2*(-3*Sqrt[2]*Pi + 8*r) /.
r -> 5]
r = 5;
NIntegrate[(-r^3)*Cos[t]^2*Sin[t] +
r^2*Sqrt[Cos[t]*Sin[t]]*Cos[t],
{t, Pi/2, 0}]

Out[28]=
27.78265748492177

Out[30]=
27.78265752218859

Last edited: May 29, 2010
12. May 30, 2010

### irycio

Well, you mey be right, but on the other hand, a couple pages earlier, in a chapter about double integrals (volume, area etc.) they expect you to integrate
$$z=sin(\pi x y)$$. After first integrating, let's say over y, you get $$\frac{cos(\pi x y)}{\pi x}$$, which again is imposiible to integrate in the meaning of finding an antiderivative. However, mathematica returns the same answer that thay gave in the book.