Hello,
could Giac use Cardano (Ferrari) formula to obtain roots of cubic (resp. quartic) equations? Thus the solutions of e.g. x^3-x-1=0 would be both exact and readable. Also, a primitive function of e.g. 1/(x^3-x-1) could be computed. Rootofs are practical when dealing with complicated roots, but it would be nice to obtain an algebraic representation when possible.
cubic and quartic roots
Modérateur : xcasadmin
Re: cubic and quartic roots
Hi,
I don't want to do that, because it's very difficult to compute something with these formulas (for example a symmetric expression of the roots).
I don't want to do that, because it's very difficult to compute something with these formulas (for example a symmetric expression of the roots).
Re: cubic and quartic roots
Thanks for the clarification. It makes sense, those formulas are indeed quite awkward to use.
In the meantime, I've found a way to compute a primitive function of 1/(x^3-x-1):
This approach is a bit dirty, but it works. I tried subst, which does not allow to replace 'a' with some other symbol, and int won't integrate 1/factor(x^3-x-1,a), but the cat/expr transformation allows 'a' to be purged in between, making the subsequent integration possible.
In the meantime, I've found a way to compute a primitive function of 1/(x^3-x-1):
Code : Tout sélectionner
rootof([1,0],[1,0,-1,-1]):=a;
s:=cat(factor(x^3-x-1,a));
purge(a);
int(1/expr(s),x)
Re: cubic and quartic roots
I see, perhaps something for int and partfrac similar to factor should be added. By the way, you can enter rootof(x^3-x-1):=a at the beginning.