A Physics forum. Physics Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Physics Banter forum » Physics Newsgroups » The Theory of Relativity
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , ,

Help needed with integral



 
 
Thread Tools Display Modes
  #21  
Old April 30th 08 posted to sci.physics.relativity,sci.math
Dirk Van de moortel
external usenet poster
 
Posts: 15,355
Default Help needed with integral


"David W. Cantrell" wrote in message ...
Dono wrote:
[snip]
OK, there is some hope: the integral is really a definite integral ,
from 0 to 2pi.
I transformed the domain into -pi/2 to +3pi/2
Then I separate it into two integrals, one from -pi/2 to +pi/2 and the
second one from pi/2 to 3pi/2.
In the second one, I made the variable change y=x-pi, thus shifting
the integration interval from -p/2 to pi/2. All terms in cos^2(x)
become cos^2(y+pi), so they do not change sign or value. The lone term
in sin(x) becomes sin(y+pi), so it changes sign. The two integrals
cancel each other, so , the result for the definite integral is ....0.
Unless I made a mistake, I am done.


I suspect you made a mistake. Consider the following numerical integration.

In[7]:= a = 1/2; NIntegrate[Sin[x]*
Sqrt[1-a*(Cos[x])^2((1+Sin[x])^2/(1+a*(Sin[x])^2)+(1- a)*(Cos[x])^2)],
{x, 0, 2 Pi}]

Out[7]= -0.444846

David


Yep, same with Maple.
When I plot the function, it is clearly not symmetric.

Dirk Vdm
Ads
  #22  
Old April 30th 08 posted to sci.physics.relativity,sci.math
Dono
external usenet poster
 
Posts: 3,990
Default Help needed with integral

On Apr 30, 7:55 am, David W. Cantrell wrote:
Dono wrote:

[snip]

OK, there is some hope: the integral is really a definite integral ,
from 0 to 2pi.
I transformed the domain into -pi/2 to +3pi/2
Then I separate it into two integrals, one from -pi/2 to +pi/2 and the
second one from pi/2 to 3pi/2.
In the second one, I made the variable change y=x-pi, thus shifting
the integration interval from -p/2 to pi/2. All terms in cos^2(x)
become cos^2(y+pi), so they do not change sign or value. The lone term
in sin(x) becomes sin(y+pi), so it changes sign. The two integrals
cancel each other, so , the result for the definite integral is ....0.
Unless I made a mistake, I am done.


I suspect you made a mistake. Consider the following numerical integration.

In[7]:= a = 1/2; NIntegrate[Sin[x]*
Sqrt[1-a*(Cos[x])^2((1+Sin[x])^2/(1+a*(Sin[x])^2)+(1- a)*(Cos[x])^2)],
{x, 0, 2 Pi}]

Out[7]= -0.444846

David




Arrrg, there is a term in (1+sinx)/(1+a*sinx) that changes to (1-siny)/
(1-a*siny) :-)
I missed it, dang. Thank you.
  #23  
Old April 30th 08 posted to sci.physics.relativity,sci.math
Dirk Van de moortel
external usenet poster
 
Posts: 15,355
Default Help needed with integral


"Dono" wrote in message ...
On Apr 30, 7:55 am, David W. Cantrell wrote:
Dono wrote:

[snip]

OK, there is some hope: the integral is really a definite integral ,
from 0 to 2pi.
I transformed the domain into -pi/2 to +3pi/2
Then I separate it into two integrals, one from -pi/2 to +pi/2 and the
second one from pi/2 to 3pi/2.
In the second one, I made the variable change y=x-pi, thus shifting
the integration interval from -p/2 to pi/2. All terms in cos^2(x)
become cos^2(y+pi), so they do not change sign or value. The lone term
in sin(x) becomes sin(y+pi), so it changes sign. The two integrals
cancel each other, so , the result for the definite integral is ....0.
Unless I made a mistake, I am done.


I suspect you made a mistake. Consider the following numerical integration.

In[7]:= a = 1/2; NIntegrate[Sin[x]*
Sqrt[1-a*(Cos[x])^2((1+Sin[x])^2/(1+a*(Sin[x])^2)+(1- a)*(Cos[x])^2)],
{x, 0, 2 Pi}]

Out[7]= -0.444846

David




Arrrg, there is a term in (1+sinx)/(1+a*sinx) that changes to (1-siny)/
(1-a*siny) :-)
I missed it, dang. Thank you.


for a from -0.5 by 0.05 to 0.5 do
print( a, evalf( Int( sin(x)*sqrt(1-a*(cos(x))^2*((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2)), x=0.0..2*Pi ) ) );
end do;

-.50, 0.4313135266
-.45, 0.3807384152
-.40, 0.3328483124
-.35, 0.2871377155
-.30, 0.2431931891
-.25, 0.2006682901
-.20, 0.1592657918
-.15, 0.1187245853
-.10, 0.07880959525
-.05, 0.03930358362
0., -1.702775486 10^(-16)
0.05, -0.03930385591
0.10, -0.07881414095
0.15, -.1187492837
0.20, -.1593519644
0.25, -.2009072950
0.30, -.2437734550
0.35, -.2884393677
0.40, -.3356491928
0.45, -.3867305258
0.50, -.4448463419

  #24  
Old April 30th 08 posted to sci.physics.relativity,sci.math
Ray Vickson
external usenet poster
 
Posts: 32
Default Help needed with integral

On Apr 30, 5:55 am, David W. Cantrell wrote:
"Dirk Van de moortel" wrote:



"David W. Cantrell" wrote in message
...
Eric Gisse wrote:
On Apr 29, 8:42=A0pm, David W. Cantrell
wrote:
Dono wrote:
On Apr 29, 6:21 pm, Eric Gisse wrote:
On Apr 29, 4:02 pm, Dono wrote:


Sorry, wrong integrand, here is the correct one:


sin[x]*sqrt(1-a*(cos[x])^2((1+sin[x])^2/(1+a*(sin[x])^2)+(1-
a)*(cos[x])^2))


http://img291.imageshack.us/img291/8664/integralvi2.jpg


Excellent! Thank you , Eric!


Your jubilation is, I think, premature. If you differentiate the
supposed antiderivative shown there, you get just


sin(x) sqrt(1 - a cos(x)^2)


which is not equal to the given integrand.


Yes, it is. If you have Maple, Mathematica, or MATLAB, have one of
them [preferably Maple] apply the relevant simplify command to the
expression.


You seem to be saying that the given integrand simplifies to


sin(x) sqrt(1 - a cos(x)^2)


but that is easily shown to be false. For example, if we take a = 1 and
x = pi/4, the expression sin(x) sqrt(1 - a cos(x)^2) has the value
1/2, while the original integrand has a value which is approximately
0.119573 instead.


Concerning Dono's question "So, what is the correct answer?":
Perhaps it is not possible to express an antiderivative in closed form
using standard functions.


David W. Cantrell


Indeed, it is wrong.
Maple makes an error interpreting
sin(x)*sqrt(1-a*(cos(x))^2((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))


There is a multiplication operator missing after the first "^2"


It should be
sin(x)*sqrt(1-a*(cos(x))^2*((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))


Try entering the bare expression without the "*" and you see
that Maple drops everything beyond "^2".


Dirk Vdm


Wow! I'm startled. I have never encountered a CAS which requires that
multiplication be _explicitly_ indicated in such a case. I would have
supposed that multiplication could be implied by juxtaposition.

Surely Maple's dropping everything after the first "^2" is a bug,
not a "feature".


Maple 11 (in the full, Java-interface version) interprets the
expression without the '*', at least if one leaves a space between the
"^2" and what follows. Maple 9.5 does not; I don't know about Maple
10.x because I lack access to it.

R.G. Vickson



David


  #25  
Old April 30th 08 posted to sci.physics.relativity,sci.math
Dirk Van de moortel
external usenet poster
 
Posts: 15,355
Default Help needed with integral


"Ray Vickson" wrote in message ...
On Apr 30, 5:55 am, David W. Cantrell wrote:
"Dirk Van de moortel" wrote:



"David W. Cantrell" wrote in message
...
Eric Gisse wrote:
On Apr 29, 8:42=A0pm, David W. Cantrell
wrote:
Dono wrote:
On Apr 29, 6:21 pm, Eric Gisse wrote:
On Apr 29, 4:02 pm, Dono wrote:


Sorry, wrong integrand, here is the correct one:


sin[x]*sqrt(1-a*(cos[x])^2((1+sin[x])^2/(1+a*(sin[x])^2)+(1-
a)*(cos[x])^2))


http://img291.imageshack.us/img291/8664/integralvi2.jpg


Excellent! Thank you , Eric!


Your jubilation is, I think, premature. If you differentiate the
supposed antiderivative shown there, you get just


sin(x) sqrt(1 - a cos(x)^2)


which is not equal to the given integrand.


Yes, it is. If you have Maple, Mathematica, or MATLAB, have one of
them [preferably Maple] apply the relevant simplify command to the
expression.


You seem to be saying that the given integrand simplifies to


sin(x) sqrt(1 - a cos(x)^2)


but that is easily shown to be false. For example, if we take a = 1 and
x = pi/4, the expression sin(x) sqrt(1 - a cos(x)^2) has the value
1/2, while the original integrand has a value which is approximately
0.119573 instead.


Concerning Dono's question "So, what is the correct answer?":
Perhaps it is not possible to express an antiderivative in closed form
using standard functions.


David W. Cantrell


Indeed, it is wrong.
Maple makes an error interpreting
sin(x)*sqrt(1-a*(cos(x))^2((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))


There is a multiplication operator missing after the first "^2"


It should be
sin(x)*sqrt(1-a*(cos(x))^2*((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))


Try entering the bare expression without the "*" and you see
that Maple drops everything beyond "^2".


Dirk Vdm


Wow! I'm startled. I have never encountered a CAS which requires that
multiplication be _explicitly_ indicated in such a case. I would have
supposed that multiplication could be implied by juxtaposition.

Surely Maple's dropping everything after the first "^2" is a bug,
not a "feature".


Maple 11 (in the full, Java-interface version) interprets the
expression without the '*', at least if one leaves a space between the
"^2" and what follows. Maple 9.5 does not; I don't know about Maple
10.x because I lack access to it.

R.G. Vickson


Ah, I should have mentioned I made them check on 9.03.
It looks like they have to buy an upgrade :-)

Dirk Vdm

  #26  
Old April 30th 08 posted to sci.physics.relativity,sci.math
Eric Gisse
external usenet poster
 
Posts: 17,511
Default Help needed with integral

On Apr 30, 6:26*am, Dono wrote:
On Apr 30, 7:05 am, "Dirk Van de moortel" dirkvandemoor...@ThankS-NO-



SperM.hotmail.com wrote:
"Dono" wrote in ...
On Apr 30, 6:12 am, "Dirk Van de moortel" dirkvandemoor...@ThankS-NO-
SperM.hotmail.com wrote:
"David W. Cantrell" wrote in .. .


"Dirk Van de moortel" wrote:
"David W. Cantrell" wrote in message
...
Eric Gisse wrote:
On Apr 29, 8:42=A0pm, David W. Cantrell
wrote:
Dono wrote:
On Apr 29, 6:21 pm, Eric Gisse wrote:
On Apr 29, 4:02 pm, Dono wrote:


Sorry, wrong integrand, here is the correct one:


sin[x]*sqrt(1-a*(cos[x])^2((1+sin[x])^2/(1+a*(sin[x])^2)+(1-
a)*(cos[x])^2))


http://img291.imageshack.us/img291/8664/integralvi2.jpg


Excellent! Thank you , Eric!


Your jubilation is, I think, premature. If you differentiate the
supposed antiderivative shown there, you get just


sin(x) sqrt(1 - a cos(x)^2)


which is not equal to the given integrand.


Yes, it is. If you have Maple, Mathematica, or MATLAB, have one of
them [preferably Maple] apply the relevant simplify command to the
expression.


You seem to be saying that the given integrand simplifies to


sin(x) sqrt(1 - a cos(x)^2)


but that is easily shown to be false. For example, if we take a = 1 and
x = pi/4, the expression *sin(x) sqrt(1 - a cos(x)^2) *has the value
1/2, while the original integrand has a value which is approximately
0.119573 instead.


Concerning Dono's question "So, what is the correct answer?":
Perhaps it is not possible to express an antiderivative in closed form
using standard functions.


David W. Cantrell


Indeed, it is wrong.
Maple makes an error interpreting
* sin(x)*sqrt(1-a*(cos(x))^2((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))


There is a multiplication operator missing after the first "^2"


It should be
*sin(x)*sqrt(1-a*(cos(x))^2*((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))


Try entering the bare expression without the "*" and you see
that Maple drops everything beyond "^2".


Dirk Vdm


Wow! I'm startled. I have never encountered a CAS which requires that
multiplication be _explicitly_ indicated in such a case. I would have
supposed that multiplication could be implied by juxtaposition.


Surely Maple's dropping everything after the first "^2" is a bug,
not a "feature".


Vladimir will be thrilled :-)


Dirk Vdm


Great,


You found a bug in Maple. Question is, if you put in the "*" by hand ,
what is the answer? Does Maple return the same (incorrect) result?


Nope... no result.


Dirk Vdm



Drat, I simply assumed that Maple made a simplification that I didn't
see. It does that quite a lot.

Taking the new expression, Maple 10 times out as well.

This is why Mahematica timed out on me.
OK, there is some hope: the integral is really a definite integral ,
from 0 to 2pi.


Oooh. There might be a way to analytically do this. Have you tried
contour integration?


I transformed the domain into -pi/2 to +3pi/2
Then I separate it into two integrals, one from -pi/2 to +pi/2 and the
second one from pi/2 to 3pi/2.
In the second one, I made the variable change y=x-pi, thus shifting
the integration interval from -p/2 to pi/2. All terms in cos^2(x)
become cos^2(y+pi), so they do not change sign or value. The lone term
in sin(x) becomes sin(y+pi), so it changes sign. The two integrals
cancel each other, so , the result for the definite integral is ....0.
Unless I made a mistake, I am done.


  #27  
Old April 30th 08 posted to sci.physics.relativity,sci.math
Michael Press
external usenet poster
 
Posts: 242
Default Help needed with integral

In article ,
"Dirk Van de moortel"
wrote:

"David W. Cantrell" wrote in message ...
"Dirk Van de moortel" wrote:


[...]

Indeed, it is wrong.
Maple makes an error interpreting
sin(x)*sqrt(1-a*(cos(x))^2((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))

There is a multiplication operator missing after the first "^2"

It should be
sin(x)*sqrt(1-a*(cos(x))^2*((1+sin(x))^2/(1+a*sin(x)^2)+(1-a)*cos(x)^2))

Try entering the bare expression without the "*" and you see
that Maple drops everything beyond "^2".

Dirk Vdm


Wow! I'm startled. I have never encountered a CAS which requires that
multiplication be _explicitly_ indicated in such a case. I would have
supposed that multiplication could be implied by juxtaposition.

Surely Maple's dropping everything after the first "^2" is a bug,
not a "feature".


Vladimir will be thrilled :-)


Vlad will be cheesed he did not find it.

--
Michael Press
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the integral of x^^x? Hannu Poropudas Physics - General Discussion 10 August 8th 07 11:18 PM
Is the integral of zero always zero? Jack Sarfatti The Theory of Relativity 0 May 4th 05 09:16 PM
Integral on SO(3) Vincent G. Mathematical Research (Moderated) 5 June 11th 04 03:39 PM
Integral of [sin(x)/x]^2 Mark Physics - General Discussion 2 November 17th 03 11:59 AM
Formulation of the Feynman Path Integral as a Function Space Integral. Max Lipyanskiy Current Physics Research (Moderated) 0 July 13th 03 07:30 AM


All times are GMT +1. The time now is 02:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Physics Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Remortgages - Remortgages - Personal Finance - Loans - Free Credit Report