Skip to content

Limit calculated incorrect #33

Description

@osmanfb

This one is related to taking the definite integral of Sqrt[(1+x)/(1-x)] from -1 to 1. Mathilda does not evaluate this integral. But the indefinite integral is calculated correctly:
In[1]:= Integrate[Sqrt[(1+x)/(1-x)],x]
Out[1]= -2 Sqrt[(1 + x)/(1 - x)]/(1 + (1 + x)/(1 - x)) + 2 ArcTan[Sqrt[(1 + x)/(1 - x)]]
The first term at x=-1 and x=1 is calculated by Limit[]. But the second term has problems at +1
In[10]:= Limit[2 ArcTan[Sqrt[(1 + x)/(1 - x)]], x -> 1]
Out[10]= -Pi
Which should be Pi. Wolframscript, Maxima, Reduce. Axiom/Fricas all calculate the definite integral correctly.

In[12]:= Limit[2 ArcTan[Sqrt[(1 + x)/(1 - x)]],x -> 0.999]
Out[12]= 3.09687

In[13]:= Limit[2 ArcTan[Sqrt[(1 + x)/(1 - x)]],x -> 0.9999]
Out[13]= -3.14159
I don't know why but somehow switches sign as it gets closer to +1.
But without the Limit , ArcTan seems to be working ok:
In[14]:= 2 ArcTan[Sqrt[(1 + 0.999)/(1 - 0.999)]]
Out[14]= 3.09687

In[15]:= 2 ArcTan[Sqrt[(1 + 0.9999)/(1 - 0.9999)]]
Out[15]= 3.12745

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions