Mathematica : Integrate and a Log problem?

  • #1
Hepth
Gold Member
449
39
Here is the code, I am using Mathematica 7 with no packages installed at the moment.

Code:
$Assumptions = 0 < u <= 19/80 && I10 \[Element] Reals;
FXN = Sqrt[(u - 15/16)^2 - 2/5 (u + 17/16) + 1/25] (I10 (u^2) - 1/u);
PA = Integrate[FXN /. {I10 ->  1/2 Log[1/2]}, u];
PB = Integrate[FXN, u] /. {I10 -> 1/2 Log[1/2]};
Plot[{Re[PA], Re[PB]}, {u, 0, 0.243}]

PA = Integrate[FXN /. {I10 -> 0.5  Log[1/2]}, u];
PB = Integrate[FXN, u] /. {I10 ->  0.5 Log[1/2]};
Plot[{Re[PA], Re[PB]}, {u, 0, 0.243}]

What I am doing is finding the upper limit of an integral. If I make a replacement of a variable to a constant before or after the integration I get different results. The constant is not complex, and is a real number, though contains a Log[1/2].

I know the Sqrt in FXN is only real for u<0.243 ish, and my limit of integration is right below that.
I have tried limits too, and its the same as just a replacement rule.

NOTICE, if you change the 1/2 to 0.5 in the replacement rule it works.

Is there a way I can get these to be the same no matter what?
 

Answers and Replies

  • #2
1,069
29
Can you be more specific about what expression you want to find?

If I do this

Code:
$Assumptions = 0 < u <= 19/80 && I10 \[Element] Reals;
FXN = Sqrt[(u - 15/16)^2 - 2/5 (u + 17/16) + 1/25] (I10 (u^2) - 1/u);
PA1 = Integrate[FXN /. {I10 -> 1/2 Log[1/2]}, u];
PB1 = Integrate[FXN, u] /. {I10 -> 1/2 Log[1/2]};
PA2 = Integrate[FXN /. {I10 -> 0.5 Log[1/2]}, u];
PB2 = Integrate[FXN, u] /. {I10 -> 0.5 Log[1/2]};
Plot[{Re[PA1], Re[PB1], Re[PA2], Re[PB2]}, {u, 0, 0.243}]

the four plots look like they lie on top of each other, at least with MMA 9.

Can you write

This expression <> and this expression <> differ at the 4th (or 20th) digit. Why?

Thanks
 
  • #3
Hepth
Gold Member
449
39
Ok. In MM7 I get this plot :

zjw9s7.jpg


Maybe it was a bug that was fixed in MM8 or 9. Its not off by precision, but by some actual REAL amount. The problem I noted on my MM7 Ubuntu machine at work, and just now im posting this from my windows 7 netbook at home, that uses a different kernel.

Time to upgrade I guess.
 
  • #4
1,069
29
Unfortunately I lost a machine and so I don't have versions 5.2, 6, 7 and 8 to try this on. Perhaps you could ask nicely in another place if someone else could compare the results with 7 and 9 and see if they can confirm your results. That might save an upgrade if there is some other reason for this.
 
  • #5
Hepth
Gold Member
449
39
I actually have the license for up to 9, I just didn't like the autocomplete feature when programming when I had 9 on another machine so I never changed it on my new ones. I guess Ill do this tomorrow, as my research depends on it. Thanks for your help. I'm always glad its not something that I am misunderstanding.
 
  • #6
1,069
29
How to permanently turn off the predictive interface

http://support.wolfram.com/kb/11466

I'm running with the predictive interface turned off until they fix some problems where this can make it use all available memory and swap space given some seemingly simple problems.

You should check details carefully to make certain you don't lose anything, but it has been possible to have multiple versions happily installed on the same machine. You can't run those at the same time, but I have had great use of being able to switch back to a previous version to check something.

If you can do that then you can use 7 for almost everything and then just check with 9 when there is a question.
 
  • #7
Hepth
Gold Member
449
39
Thanks. I'll install 9 and turn off predictive. The problem is that this little part is a representation of what Im actually integrating (pages long of algebraic form), and happened to be the piece with a problem. Its unfortunate as I have spent weeks running high precision integrations over a large phase space, only to see this when commenting my code. (The output just didn't look algebraically right, as it was putting that I10 into a logarithm after integration, and its solely multiplicative).
I can avoid this for now by just replacing everything at the start, and maybe check some of my data.

Thanks again for your help.
 

Related Threads on Mathematica : Integrate and a Log problem?

Replies
5
Views
2K
Replies
3
Views
3K
  • Last Post
Replies
2
Views
23K
Replies
1
Views
3K
Replies
5
Views
4K
Replies
9
Views
3K
Replies
6
Views
9K
Replies
6
Views
17K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
6
Views
6K
Top