Message Boards Message Boards

0
|
3391 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Calculate the following integral?

Posted 6 years ago

I found a difficult to calculate this integral with Wolfram Mathematica, any help?

enter image description here

POSTED BY: Hamza Hboub
2 Replies
Integrate[1/Sqrt[R^2 + (x1 - x2)^2], {x2, 0, l}, {x1, 0, l}, Assumptions -> {R > 0, l > 0, x1 >= 0, x2 >= 0}] // 
FullSimplify // AbsoluteTiming
(* {45.2976, 2 R - 2 Sqrt[l^2 + R^2] + l Log[R] - l Log[-l + Sqrt[l^2 + R^2]] + 1/2 l Log[1 + (2 l (l + Sqrt[l^2 + R^2]))/R^2]}*)

$$-2 \sqrt{l^2+R^2}-l \log \left(\sqrt{l^2+R^2}-l\right)+\frac{1}{2} l \log \left(\frac{2 l \left(\sqrt{l^2+R^2}+l\right)}{R^2}+1\right)+l \log (R)+2 R$$

Extended version for solving integral:

 sol = Integrate[1/Sqrt[R^2 + (x1 - x2)^2], {x2, 0, l}, Assumptions -> {R > 0, l > 0, x1 > 0}]
 (* 1/2 Log[-(((x1 + Sqrt[R^2 + x1^2]) (-l + x1 - Sqrt[
       l^2 + R^2 - 2 l x1 + x1^2]))/((-x1 + Sqrt[R^2 + x1^2]) (-l + 
       x1 + Sqrt[l^2 + R^2 - 2 l x1 + x1^2])))] *)

sol2 = FullSimplify[sol, Assumptions -> {R > 0, l > 0, x1 >= 0}]
(* 1/2 (Log[l + Sqrt[R^2 + (l - x1)^2] - x1] - 
   Log[(-l + Sqrt[R^2 + (l - x1)^2] + x1) (-x1 + Sqrt[R^2 + x1^2])] + 
   Log[x1 + Sqrt[R^2 + x1^2]])*)

 Integrate[sol2, {x1, 0, l}, Assumptions -> {R > 0, l > 0}]
 (*  2 (R - Sqrt[l^2 + R^2] + l ArcTanh[l/Sqrt[l^2 + R^2]])*)

and we have:

enter image description here

Both solutions are correct.

Regards,MI

POSTED BY: Mariusz Iwaniuk
Anonymous User
Anonymous User
Posted 6 years ago
POSTED BY: Anonymous User
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract