# integral not simplifying

hello, can anyone please explain why the first integral works but the second doesnt? even thought that they are both the same (only minus in different places):

```
sage: x = var('x')
sage: f = -(x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 + 1)^2)/sqrt((x - 1)^2 + 1)
sage: integrate(f, x)
-integrate((x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 + 1)^2)/sqrt((x - 1)^2 + 1), x)
sage: f = (x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 + 1)^2)/sqrt((x - 1)^2 + 1)
sage: -integrate(f, x)
1/sqrt((x - 1)^2 + 1)
```

only full simplify somehow helps:

```
sage: f = -(x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 + 1)^2)/sqrt((x - 1)^2 + 1)
sage: f.simplify()
-(x - 1)*((x - 1)^2/((x - 1)^2 + 1)^2 + 1/((x - 1)^2 + 1)^2)/sqrt((x - 1)^2 + 1)
sage: f.full_simplify()
-(x - 1)/(x^2 - 2*x + 2)^(3/2)
sage: integrate(f.full_simplify(), x)
1/sqrt(x^2 - 2*x + 2)
```

so basically the answer is to do full simplify, but i cant do full simplify on a vector (my original problem is to do this integral on vector):

```
sage: v = vector([x , 1 , 2])
sage: v.full_simplify()
... 'FreeModule_ambient_field_with_category.element_class' object has no attribute 'full_simplify'
```

so how can i avoid sagemath from returning me the "integrate(...)" thing and just do the integral?

Both works fine for me in sage 9.5.beta4. Which version of sage do you use ?

SageMath version 9.2, Release Date: 2020-10-24 Using Python 3.7.7

You should use a more recent version of sage. For the second point :

thank you for the simplifying method! i upgraded to sage 9.4 (latest that i found for linux), and now i dont have that problem anymore! my first issue is solved and everything works, but now i have a new problem which is very familiar:

(more)In sage 9.5.beta4, this works fine. But you would need to compile from source. Or wait for the release of sage 9.5.