Prev: A really stupid question (calculus)
Next: Mathematica 7 does not know that Sin[2z] = 2 Sin[z] Cos[z]
From: Vladimir Bondarenko on 16 Jul 2010 13:44 Any comments? f = Tan[z]/Sqrt[1+Tan[z]^4]; Timing[ByteCount[Integrate[f, z]]] {30.078, 1071488} Timing[ByteCount[Int[f, z]]] {0.125, 1952} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Int[Tan[z]/Sqrt[1 + Tan[z]^4], z] -> -(ArcSinh[(-2 + 4*Sin[z]^2)/2]*Sqrt[1 - 2*Sin[z]^2 + 2*Sin[z]^4])/ (2*Sqrt[2]*(-1 + Sin[z]^2)*Sqrt[(1 - 2*Sin[z]^2 + 2*Sin[z]^4)/(-1 + Sin[z]^2)^2])
From: clicliclic on 16 Jul 2010 16:55 Vladimir Bondarenko schrieb: > > Any comments? > > f = Tan[z]/Sqrt[1+Tan[z]^4]; > > Timing[ByteCount[Integrate[f, z]]] {30.078, 1071488} > > Timing[ByteCount[Int[f, z]]] {0.125, 1952} > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Int[Tan[z]/Sqrt[1 + Tan[z]^4], z] > > -> > > -(ArcSinh[(-2 + 4*Sin[z]^2)/2]*Sqrt[1 - 2*Sin[z]^2 + 2*Sin[z]^4])/ > (2*Sqrt[2]*(-1 + Sin[z]^2)*Sqrt[(1 - 2*Sin[z]^2 + 2*Sin[z]^4)/(-1 + > Sin[z]^2)^2]) > The result produced by Derive 6.10 is still significantly shorter: INT(TAN(z)/SQRT(1+TAN(z)^4),z) " TAN(z) -> SIN(z)/COS(z) " INT(SIN(z)/(COS(z)*SQRT(TAN(z)^4+1)),z) " TAN(z) -> SIN(z)/COS(z) " INT(SIN(z)/(COS(z)*SQRT((SIN(z)/COS(z))^4+1)),z) " If NOT 1<MOD(n,4)<=3, SQRT(x^n) -> x^(n/2) " INT(SIN(z)*COS(z)^2/(COS(z)*SQRT(-2*SIN(z)^2*COS(z)^2+1)),z) " If F(SIN(x),COS(x))=-F(SIN(-x),COS(-x)), INT(F(SIN(a*x+b),COS(~ a*x+b)),x) -> -1/a*SUBST(INT(F(SQRT(1-x^2),x)/SQRT(1-x^2),x),x,C~ OS(a*x+b)) " -SUBST(INT(z*SQRT(-z^2+1)/(SQRT(2*z^4-2*z^2+1)*SQRT(-z^2+1)),z),~ z,COS(z)) " INT(x^(n-1)*F(x^n),x) -> SUBST(INT(F(x),x),x,x^n)/n " -SUBST(SUBST(INT(1/SQRT(2*z^2-2*z+1),z),z,z^2)/2,z,COS(z)) " INT(1/SQRT(a+b*x+c*x^2),x) -> 1/SQRT(c)*LN(2*SQRT(c)*SQRT(a+b*~ x+c*x^2)+2*c*x+b) " -SUBST(SUBST(SQRT(2)*LN(2*SQRT(2)*SQRT(2*z^2-2*z+1)+4*z-2)/2,z,z~ ^2)/2,z,COS(z)) " If x>0, LN(x*z) -> LN(x)+LN(z) " -SUBST(SUBST(SQRT(2)*(LN(SQRT(2)*SQRT(2*z^2-2*z+1)+2*z-1)+LN(2))~ /2,z,z^2)/2,z,COS(z)) " SUBST(F(x),x,a) -> F(a) " -SUBST((SQRT(2)*LN(SQRT(2)*SQRT(2*z^4-2*z^2+1)+2*z^2-1)/2+SQRT(2~ )*LN(2)/2)/2,z,COS(z)) " SUBST(F(x),x,a) -> F(a) " -SQRT(2)*LN(SQRT(2)*SQRT(-2*SIN(z)^2*COS(z)^2+1)+2*COS(z)^2-1)/4~ -SQRT(2)*LN(2)/4 " one final step " -SQRT(2)*LN(2*SQRT(2)*SQRT(1-2*SIN(z)^2*COS(z)^2)+4*COS(z)^2-2)/4 What does MMA's byte count of 1952 mean? A 1952 byte result? Martin.
From: clicliclic on 16 Jul 2010 18:37 clicliclic(a)freenet.de schrieb: > > Vladimir Bondarenko schrieb: > > > > Any comments? > > > > f = Tan[z]/Sqrt[1+Tan[z]^4]; > > > > Timing[ByteCount[Integrate[f, z]]] {30.078, 1071488} > > > > Timing[ByteCount[Int[f, z]]] {0.125, 1952} > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > Int[Tan[z]/Sqrt[1 + Tan[z]^4], z] > > > > -> > > > > -(ArcSinh[(-2 + 4*Sin[z]^2)/2]*Sqrt[1 - 2*Sin[z]^2 + 2*Sin[z]^4])/ > > (2*Sqrt[2]*(-1 + Sin[z]^2)*Sqrt[(1 - 2*Sin[z]^2 + 2*Sin[z]^4)/(-1 + > > Sin[z]^2)^2]) > > > > The result produced by Derive 6.10 is still significantly shorter: > > INT(TAN(z)/SQRT(1+TAN(z)^4),z) > > [...] > > INT(SIN(z)/(COS(z)*SQRT(TAN(z)^4+1)),z) > > -SQRT(2)*LN(2*SQRT(2)*SQRT(1-2*SIN(z)^2*COS(z)^2)+4*COS(z)^2-2)/4 > .... but this result for the real axis (Derive's default domain) does not hold for the entire complex plane. And when the domain of z is widened to the complex numbers, Derive 6.10 can integrate TAN(z)/SQRT(1+TAN(z)^4) no longer. My oversight. Martin.
From: Vladimir Bondarenko on 17 Jul 2010 00:45 On Jul 17, 1:37 am, cliclic...(a)freenet.de wrote: > cliclic...(a)freenet.de schrieb: > > > > > > > > > Vladimir Bondarenko schrieb: > > > > Any comments? > > > > f = Tan[z]/Sqrt[1+Tan[z]^4]; > > > > Timing[ByteCount[Integrate[f, z]]] {30.078, 1071488} > > > > Timing[ByteCount[Int[f, z]]] {0.125, 1952} > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > Int[Tan[z]/Sqrt[1 + Tan[z]^4], z] > > > > -> > > > > -(ArcSinh[(-2 + 4*Sin[z]^2)/2]*Sqrt[1 - 2*Sin[z]^2 + 2*Sin[z]^4])/ > > > (2*Sqrt[2]*(-1 + Sin[z]^2)*Sqrt[(1 - 2*Sin[z]^2 + 2*Sin[z]^4)/(-1 + > > > Sin[z]^2)^2]) > > > The result produced by Derive 6.10 is still significantly shorter: > > > INT(TAN(z)/SQRT(1+TAN(z)^4),z) > > > [...] > > > INT(SIN(z)/(COS(z)*SQRT(TAN(z)^4+1)),z) > > > -SQRT(2)*LN(2*SQRT(2)*SQRT(1-2*SIN(z)^2*COS(z)^2)+4*COS(z)^2-2)/4 > > ... but this result for the real axis (Derive's default domain) does not > hold for the entire complex plane. And when the domain of z is widened > to the complex numbers, Derive 6.10 can integrate > TAN(z)/SQRT(1+TAN(z)^4) no longer. My oversight. > > Martin. Hi Martin, Thanks for your quick results! Here are some further facts. 1) http://reference.wolfram.com/mathematica/ref/ByteCount.html ByteCount[expr] gives the number of bytes used internally by Mathematica to store expr. 2) f = Tan[z]/Sqrt[1 + Tan[z]^4]; FullSimplify[f - D[Int[f, z], z]] 0 The same stuff with Integrate keeps running after 8 hours. 3) Mathematica's monstrous answer includes EllipticF and EllipticPi. And here are two most interesting questions, If Mathematica 7 and Rubi answers are identical mathematically? If not what about their math correctness? If, against any intuitive feelings, they are equivalent, how it comes that Mathematica 7 generates such a behemoth output? It would be great if Mathematica expert(s) whether they are from Wolfram Research or not would enlighten us. Best wishes, Vladimir
From: Vladimir Bondarenko on 17 Jul 2010 03:45 On Jul 17, 7:45 am, Vladimir Bondarenko <v...(a)cybertester.com> wrote: > On Jul 17, 1:37 am, cliclic...(a)freenet.de wrote: > > > > > > > cliclic...(a)freenet.de schrieb: > > > > Vladimir Bondarenko schrieb: > > > > > Any comments? > > > > > f = Tan[z]/Sqrt[1+Tan[z]^4]; > > > > > Timing[ByteCount[Integrate[f, z]]] {30.078, 1071488} > > > > > Timing[ByteCount[Int[f, z]]] {0.125, 1952} > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > Int[Tan[z]/Sqrt[1 + Tan[z]^4], z] > > > > > -> > > > > > -(ArcSinh[(-2 + 4*Sin[z]^2)/2]*Sqrt[1 - 2*Sin[z]^2 + 2*Sin[z]^4])/ > > > > (2*Sqrt[2]*(-1 + Sin[z]^2)*Sqrt[(1 - 2*Sin[z]^2 + 2*Sin[z]^4)/(-1 + > > > > Sin[z]^2)^2]) > > > > The result produced by Derive 6.10 is still significantly shorter: > > > > INT(TAN(z)/SQRT(1+TAN(z)^4),z) > > > > [...] > > > > INT(SIN(z)/(COS(z)*SQRT(TAN(z)^4+1)),z) > > > > -SQRT(2)*LN(2*SQRT(2)*SQRT(1-2*SIN(z)^2*COS(z)^2)+4*COS(z)^2-2)/4 > > > ... but this result for the real axis (Derive's default domain) does not > > hold for the entire complex plane. And when the domain of z is widened > > to the complex numbers, Derive 6.10 can integrate > > TAN(z)/SQRT(1+TAN(z)^4) no longer. My oversight. > > > Martin. > > Hi Martin, > > Thanks for your quick results! Here are some further facts. > > 1) > > http://reference.wolfram.com/mathematica/ref/ByteCount.html > > ByteCount[expr] gives the number of bytes used internally > by Mathematica to store expr. > > 2) > > f = Tan[z]/Sqrt[1 + Tan[z]^4]; > FullSimplify[f - D[Int[f, z], z]] > > 0 > > The same stuff with Integrate keeps running after 8 hours. > > 3) > > Mathematica's monstrous answer includes EllipticF and > EllipticPi. And here are two most interesting questions, > > If Mathematica 7 and Rubi answers are identical > mathematically? > > If not what about their math correctness? > > If, against any intuitive feelings, they are equivalent, > how it comes that Mathematica 7 generates such a > behemoth output? > > It would be great if Mathematica expert(s) whether they > are from Wolfram Research or not would enlighten us. > > Best wishes, > > Vladimir Maple 14 returns a short answer > int(tan(z)/sqrt(1+tan(z)^4), z); -1/4*2^(1/2)*arctanh(1/4*(2-2*tan(z)^2)*2^(1/2)/ ((1+tan(z)^2)^2-2*tan(z)^2)^(1/2)) > f := tan(z)/sqrt(1+tan(z)^4): > simplify(f - diff(int(f, z), z)); 0 What is the origin of the Mathematica 7 human unreadable library-size answer?
|
Next
|
Last
Pages: 1 2 3 Prev: A really stupid question (calculus) Next: Mathematica 7 does not know that Sin[2z] = 2 Sin[z] Cos[z] |