Riccardo GUIDA wrote:
> 
> I was unable to get zero out of (3) , so I tried a trick in (4) (Waldek once 
> wrote that integrate simplifies its input), but (4) is now positive for all 
> positive  a,b,x ...
>
> I'm confused...
> Riccardo
>
>
>
> (1) -> integrand:=1/(x^3*(a+b*x/sqrt(3))^(1/3))
> 
>                3+-+
>                \|3
>   (1)  -------------------
>            +-------------+
>         3 3|    +-+
>        x  \|b x\|3  + 3 a
>                                                    Type: Expression(Integer)

This is theoreticaly valid, but a loser: we get additional extention by
cube root of 3.  Hopefuly, in the future we will be able to disable
this transformation (IIRC ATM some parts of FriCAS depend on this
transformation, so disabling it we would move problem to other
place).

> (2) -> primitive:=integrate(integrand,x)
> 
>                    6+-+2
>                    \|3
>   (2)  - ------------------------
>                +---------------+2
>             2 3|    6+-+3
>          2 x  \|b x \|3   + 3 a
>                                         Type: Union(Expression(Integer),...)

Here instead of '(3^(1/6)^3' we should have 'sqrt(3)'.  Again,
theoreticaly valid, but a loser.  Also, the integral is
simply wrong.

> (3) -> shouldBeZero := D(primitive,x) - integrand

You can not expect zero here because you have different kernels.
In particular, you get zero only if '(3^(1/6)^3' equals 'sqrt(3)'.
But FriCAS can not assume that this is zero: 'squart(3)' appears
as solution to equation 's^2 = 3'.  This equation has two
solutions which from algebraic point of view are indistinguishable.
There is widely adapted convention which in numerical context
takes positive root.  But in symbolic context such convention
may lead to wrong results (is incompatible with some other
transformation done by FriCAS).  ATM in some situations
FriCAS can not handle resulting ambiguity and chooses one
possibility.  But in most situations FriCAS tries to
preserve ambiguity and in particular default simplifications
will not simplify this to zero.

If you do:

setSimplifyDenomsFlag(true)
integrand:=1/(x^3*(a+b*x/sqrt(3))^(1/3))
integrate(integrand,x)
res := %::List(Expression(Integer));
D(res(1), x) - integrand
rootProduct(%)

in the final step you will get zero, confiming that this time
integral is correct.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to