From: Aleksas D. <ale...@gm...> - 2015-09-08 14:06:08
|
David Scherfgen <d.scherfgen@go...> - 2015-09-08 11:14:22 wrote: Dear Richard, > > thank you for your very detailed response and your patience with me! :-) > > integrate_use_rootsof is indeed interesting, thanks for pointing it out to > me. > > However, I think that it doesn't quite work in the way it is intended to. > For example, take the function 1/(x^(1/3)+x+1). When we integrate it with > integrate_use_rootsof enabled, we get an answer that contains > rootsof(x+x^(1/3)+1). Doesn't the use of rootsof in an integral only make > sense for polynomials, since only they can be factored into factors of (x - > root_n)? Note that Wolfram Alpha gives an answer that is very similar to > Maxima's, but it involves the roots of the polynomial x^3+x+1. > > Maxima's answer is wrong, there seems to be a bug in the part that uses > integrate_use_rootsof. I think this is what happens: integrate performs the > substitution u=x^(1/3), which results in 3*integrate(u^2/(u^3+u+1),u). Here > we have that polynomial u^3+u+1 (from Wolfram Alpha's answer) in the > denominator. But instead of outputting rootsof(u^3+u+1), Maxima substitutes > u=x^(1/3) back and outputs rootsof(x^(1/3)+x+1). It should not perform this > back-substitution. Unless you tell me that I'm wrong, I will file a bug > report about that ... > > Output is removed. (%i1) integrate(1/(x+x^(1/3)+1),x); (%i2) S:changevar(%, y^3=x, y, x); (%i3) solve(y^3+y+1)$ (%i4) sols:map(rhs,%); (%i5) tr:(sqrt(31)/(2*3^(3/2))-1/2)^(1/3)=omega; (%i6) float(%), numer; (%i7) assume(omega>0)$ (%i8) spr:subst(tr,sols); (%i9) y^3+y+1=expand((y-spr[1])*(y-spr[2]))*(y-spr[3]); (%i10) subst(%,S); (%i11) ev(%, nouns); (%i12) solution:subst([y=(x)^(1/3),reverse(tr)],%); Test of integration: (%i15) diff(solution,x),radcan; (%o15) 1/(x+x^(1/3)+1) If x>0 solution is real function (%i14) wxplot2d([solution], [x,0,5])$ best Aleksas Domarkas |