# Re: [sympy] Re: Results for integrate(Rational(1,4)*(1/(4-t)))

```Thank you very much!

On Monday, September 19, 2016 at 12:44:24 PM UTC-3, Aaron Meurer wrote:
>
> With that being said, either answer is wrong if you want a real function.
> For that, you need log(abs(4 - t)). But unfortunately, the abs() answer
> isn't valid in the general complex case, which is why SymPy doesn't return
> it.
>
> Aaron Meurer
>
> On Mon, Sep 19, 2016 at 11:42 AM, Aaron Meurer <asme...@gmail.com
> <javascript:>> wrote:
>
>> See https://github.com/sympy/sympy/issues/11017. It would be nice if we
>> could fix ratint to not flip signs in the logarithm.
>>
>> Aaron Meurer
>>
>> On Mon, Sep 19, 2016 at 2:43 AM, Kalevi Suominen <jks...@gmail.com
>> <javascript:>> wrote:
>>
>>>
>>> There are several integrators in SymPy. The latter form is produced by
>>> ratint.
>>>
>>> >>> from sympy.integrals.rationaltools import ratint
>>> >>> from sympy.abc import t
>>> >>> ratint(1/(4*(-t + 4)), t)
>>> -log(t - 4)/4
>>>
>>> Kalevi Suominen
>>>
>>>
>>> On Monday, September 19, 2016 at 5:06:22 AM UTC+3, Raphael Timbó wrote:
>>>>
>>>> Since the images with the results are distorted:
>>>>
>>>> First result:
>>>>
>>>> -(1/4)*log(4*t - 16)
>>>>
>>>> Results given by the step-by=step solution on sympy gamma:
>>>>
>>>> -(1/4)*log(-t + 4)
>>>>
>>>>
>>>>
>>>> On Sunday, September 18, 2016 at 3:18:31 PM UTC-3, Raphael Timbó wrote:
>>>>>
>>>>> Hi,
>>>>> I was trying to use:
>>>>> integrate(Rational(1,4)*(1/(4-t)))
>>>>>
>>>>> This was returning:
>>>>> −14log(4t−16)
>>>>>
>>>>> I was not expecting this result... I went to sympy gamma to see the
>>>>> steps and I saw that:
>>>>>
>>>>> Antiderivative forms:
>>>>> <http://gamma.sympy.org/input/?i=integrate%28Rational%281%2C4%29*%281%2F%284-t%29%29%29#integral_alternate_fake>
>>>>>
>>>>>    - integrate(1/(4*(-t + 4)), t)
>>>>>    −14log(4t−16)
>>>>>
>>>>>
>>>>> But when you check the steps you have:
>>>>>
>>>>> The answer is:
>>>>>
>>>>> −14log(−t+4)+constant
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I could not understand why the results are different...
>>>>> Any explanation?
>>>>>
>>>>> Thank you!
>>>>>
>>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "sympy" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to sympy+un...@googlegroups.com <javascript:>.
>>> To post to this group, send email to sy...@googlegroups.com
>>> <javascript:>.
>>> Visit this group at https://groups.google.com/group/sympy.
>>> To view this discussion on the web visit
>>>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>```
```
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email