1
|
7125 Views
|
9 Replies
|
2 Total Likes
View groups...
Share
GROUPS:

# Trying to change the Integrate output

Posted 9 years ago
 Hi, I'm trying to run the following integral: Integrate[1/(x (x^2 - a^2)^(1/2)), x]  to get as result: 1/a ArcTan[1/a (x^2 - a^2)^(1/2)  Unfortunately, Mathematica is giving me something else that I am unable to convert to this expression (or close to it). I have tried ExpToTrig and ComplexExpand without success. Can someone give me a hint?
9 Replies
Sort By:
Posted 9 years ago
 I haven't looked it up, but it looks like a problem that may depend on whether a and x are real or complex, and on the sign of x^2-a^2. You can take a look at the Assumptions option of Integrate, but I couldn't get that to work either. I've had a somewhat similar problem in the past where Integrate returned the most general solution but couldn't refine it to a special solution when I tried to restrict values of parameters and variables via Assumptions.
Posted 9 years ago
 This is one way: FullSimplify[Re@Integrate[1/(x (x^2 - a^2)^(1/2)), x], x > a > 0] /. Arg[x_] :> ArcTan[Simplify[Im[x]/Re[x], x > a > 0]] 
Posted 9 years ago
 I would like to thank you both, Bianca and Gianluca, for helping me. About Bianca's idea, I also was not able to improve the result by using Assumptions. About Gianluca's, his suggestion is interesting, but it depends on the previous knowledge about the ArcTan function in the solution.The ideal way of solving that integral, which I was expecting to find, was to use the functions and options already provided by Mathematica, such as FullSimplify, Expand, Factor, PowerExpand, ExpToTrig, Assumptions, and many others.
Posted 9 years ago
 I don't think the answer you're trying to get is correct. In[2]:= f1[x_, a_] = Integrate[1/(x (x^2 - a^2)^(1/2)), x] Out[2]= -((I Log[-((2 I a)/x) + (2 Sqrt[-a^2 + x^2])/x])/a) In[3]:= f2[x_, a_] = 1/a ArcTan[1/a (x^2 - a^2)^(1/2)] Out[3]= ArcTan[Sqrt[-a^2 + x^2]/a]/a In[10]:= f1[1, 1] - f2[1, 1] Out[10]= -I (-((I \[Pi])/2) + Log[2]) 
Posted 9 years ago
 In[13]:= D[1/a ArcTan[1/a (x^2 - a^2)^(1/2)], x] // Simplify Out[13]= 1/(x Sqrt[-a^2 + x^2]) 
Posted 9 years ago
 In[15]:= D[f1[x, a], x] // FullSimplify Out[15]= 1/(x Sqrt[-a^2 + x^2]) 
Posted 9 years ago
 Perhaps the difference between f1 and f2 is a function of a but not of x.
Posted 9 years ago
 Plot3D[Abs[f1[x, a] - f2[x, a]], {x, -3, 3}, {a, -3, 3}] 
Posted 9 years ago
 D[f1[x, a] - f2[x, a], x] // Simplify gives 0. Also a 3D plot Plot3D[ReIm[f1[x, a] - f2[x, a]], {x, -1, 1}, {a, -1, 1}, AxesLabel -> Automatic] shows that the difference of the two functions only depends on a (a part from a jump discontinuity).
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.