# How to Simplify Sympy Symbolic Integration

**URL:** <https://discourse.julialang.org/t/how-to-simplify-sympy-symbolic-integration/103970>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 18, 2023, 9:06am UTC](https://discourse.julialang.org/t/how-to-simplify-sympy-symbolic-integration/103970 "2023-09-18T09:06:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [September 18, 2023, 9:06am UTC](https://discourse.julialang.org/t/how-to-simplify-sympy-symbolic-integration/103970/1 "2023-09-18T09:06:51Z")

</div>

Hi all,

I have two circles of radius b, their centers 2a apart (0 \le a \le b). The question is, why is the SymPy computation resulting in a very complex formula?  
While in the solution manual it can be explained easily resulting in one line of answer.

The code:

```julia
using SymPy
@syms x, a, b

v1(x) = sqrt(b^2 - (x+a)^2)

V1 = integrate((v1(x)), (x,0,b-a))

println("Computing symbolic integral")
println(" ", 4*simplify(V1))

```

The answer:  
 ![Screenshot from 2023-09-18 08-05-01](https://global.discourse-cdn.com/julialang/original/3X/8/2/82d10a6cc6daab0a017f0d2290f7e820a3fde6fc.png)

The computation with SymPy:  
 ![Screenshot from 2023-09-18 08-04-28](https://global.discourse-cdn.com/julialang/original/3X/7/7/779829c24cdec1e6e415af835ed7253143f7db5c.png)
