Simplify and Sign working only in small expressions

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I'm trying to find the sign of some very long expressions, but I don't seem to make it work using Simplify[Sign[...], Assumptions ...]. Here is an example of my problem. I can easily find the sign of these two expressions:



exp1 = θA1^2 θAU (16 θB1^3 (1 - λ)^4 + 
64 θB1^2 θBU (1 - λ)^3 (1 + λ) +
5 θBU^3 (1 - λ) (1 + λ)^3 +
54 θB1 θBU^2 (1 - λ^2)^2);
Simplify[Sign[8 (exp1)] ,
Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


This expression correctly calculates as 1. A second expression:



exp2 = θA1 θAU^2 (16 θB1^3 (1 - λ)^3 (1 + λ) + 44 θB1 θBU^2 (1 - λ) (1 + λ)^3 + 
5 θBU^3 (1 + λ)^4 + 54 θB1^2 θBU (1 - λ^2)^2);
Simplify[Sign[8 (exp2)] ,
Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


Correctly calculates as 1 too. BUT when I try:



Simplify[Sign[8 (exp1 + exp2)] , 
Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


Then Mathematica cannot compute... Any ideas on what may be going on here?










share|improve this question



























    up vote
    3
    down vote

    favorite












    I'm trying to find the sign of some very long expressions, but I don't seem to make it work using Simplify[Sign[...], Assumptions ...]. Here is an example of my problem. I can easily find the sign of these two expressions:



    exp1 = θA1^2 θAU (16 θB1^3 (1 - λ)^4 + 
    64 θB1^2 θBU (1 - λ)^3 (1 + λ) +
    5 θBU^3 (1 - λ) (1 + λ)^3 +
    54 θB1 θBU^2 (1 - λ^2)^2);
    Simplify[Sign[8 (exp1)] ,
    Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


    This expression correctly calculates as 1. A second expression:



    exp2 = θA1 θAU^2 (16 θB1^3 (1 - λ)^3 (1 + λ) + 44 θB1 θBU^2 (1 - λ) (1 + λ)^3 + 
    5 θBU^3 (1 + λ)^4 + 54 θB1^2 θBU (1 - λ^2)^2);
    Simplify[Sign[8 (exp2)] ,
    Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


    Correctly calculates as 1 too. BUT when I try:



    Simplify[Sign[8 (exp1 + exp2)] , 
    Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


    Then Mathematica cannot compute... Any ideas on what may be going on here?










    share|improve this question

























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I'm trying to find the sign of some very long expressions, but I don't seem to make it work using Simplify[Sign[...], Assumptions ...]. Here is an example of my problem. I can easily find the sign of these two expressions:



      exp1 = θA1^2 θAU (16 θB1^3 (1 - λ)^4 + 
      64 θB1^2 θBU (1 - λ)^3 (1 + λ) +
      5 θBU^3 (1 - λ) (1 + λ)^3 +
      54 θB1 θBU^2 (1 - λ^2)^2);
      Simplify[Sign[8 (exp1)] ,
      Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


      This expression correctly calculates as 1. A second expression:



      exp2 = θA1 θAU^2 (16 θB1^3 (1 - λ)^3 (1 + λ) + 44 θB1 θBU^2 (1 - λ) (1 + λ)^3 + 
      5 θBU^3 (1 + λ)^4 + 54 θB1^2 θBU (1 - λ^2)^2);
      Simplify[Sign[8 (exp2)] ,
      Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


      Correctly calculates as 1 too. BUT when I try:



      Simplify[Sign[8 (exp1 + exp2)] , 
      Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


      Then Mathematica cannot compute... Any ideas on what may be going on here?










      share|improve this question















      I'm trying to find the sign of some very long expressions, but I don't seem to make it work using Simplify[Sign[...], Assumptions ...]. Here is an example of my problem. I can easily find the sign of these two expressions:



      exp1 = θA1^2 θAU (16 θB1^3 (1 - λ)^4 + 
      64 θB1^2 θBU (1 - λ)^3 (1 + λ) +
      5 θBU^3 (1 - λ) (1 + λ)^3 +
      54 θB1 θBU^2 (1 - λ^2)^2);
      Simplify[Sign[8 (exp1)] ,
      Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


      This expression correctly calculates as 1. A second expression:



      exp2 = θA1 θAU^2 (16 θB1^3 (1 - λ)^3 (1 + λ) + 44 θB1 θBU^2 (1 - λ) (1 + λ)^3 + 
      5 θBU^3 (1 + λ)^4 + 54 θB1^2 θBU (1 - λ^2)^2);
      Simplify[Sign[8 (exp2)] ,
      Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


      Correctly calculates as 1 too. BUT when I try:



      Simplify[Sign[8 (exp1 + exp2)] , 
      Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]


      Then Mathematica cannot compute... Any ideas on what may be going on here?







      simplifying-expressions






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 18 at 18:51









      kglr

      172k8194399




      172k8194399










      asked Nov 18 at 18:40









      NinjaCowAndForks

      444




      444




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          You need to increase the value of the suboption "AssumptionsMaxNonlinearVariables" to a value higher than its default value (4):



          SystemOptions["SimplificationOptions"]



          "SimplificationOptions" -> "AssumptionsMaxExponent" -> 25,
          "AssumptionsMaxNonlinearVariables" -> 4,
          "AssumptionsMaxVariables" -> 21, "AutosimplifyTrigs" -> True,
          "AutosimplifyTwoArgumentLog" -> True,
          "ConvertTrigsToRadicals" -> False, "FiniteSumMaxTerms" -> 30,
          "FunctionExpandMaxSteps" -> 15, "ListableFirst" -> True,
          "RestartELProver" -> False, "SimplifyMaxExponents" -> 100,
          "SimplifyToPiecewise" -> True




          Set the value of the suboption "AssumptionsMaxNonlinearVariables" to a higher value (say, 10):



          SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 10];
          Simplify[Sign[8 (exp1 + exp2)],
          Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]



          1




          Reset the suboption value to its default:



          SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 4];





          share|improve this answer






















            Your Answer





            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "387"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f186256%2fsimplify-and-sign-working-only-in-small-expressions%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote



            accepted










            You need to increase the value of the suboption "AssumptionsMaxNonlinearVariables" to a value higher than its default value (4):



            SystemOptions["SimplificationOptions"]



            "SimplificationOptions" -> "AssumptionsMaxExponent" -> 25,
            "AssumptionsMaxNonlinearVariables" -> 4,
            "AssumptionsMaxVariables" -> 21, "AutosimplifyTrigs" -> True,
            "AutosimplifyTwoArgumentLog" -> True,
            "ConvertTrigsToRadicals" -> False, "FiniteSumMaxTerms" -> 30,
            "FunctionExpandMaxSteps" -> 15, "ListableFirst" -> True,
            "RestartELProver" -> False, "SimplifyMaxExponents" -> 100,
            "SimplifyToPiecewise" -> True




            Set the value of the suboption "AssumptionsMaxNonlinearVariables" to a higher value (say, 10):



            SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 10];
            Simplify[Sign[8 (exp1 + exp2)],
            Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]



            1




            Reset the suboption value to its default:



            SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 4];





            share|improve this answer


























              up vote
              5
              down vote



              accepted










              You need to increase the value of the suboption "AssumptionsMaxNonlinearVariables" to a value higher than its default value (4):



              SystemOptions["SimplificationOptions"]



              "SimplificationOptions" -> "AssumptionsMaxExponent" -> 25,
              "AssumptionsMaxNonlinearVariables" -> 4,
              "AssumptionsMaxVariables" -> 21, "AutosimplifyTrigs" -> True,
              "AutosimplifyTwoArgumentLog" -> True,
              "ConvertTrigsToRadicals" -> False, "FiniteSumMaxTerms" -> 30,
              "FunctionExpandMaxSteps" -> 15, "ListableFirst" -> True,
              "RestartELProver" -> False, "SimplifyMaxExponents" -> 100,
              "SimplifyToPiecewise" -> True




              Set the value of the suboption "AssumptionsMaxNonlinearVariables" to a higher value (say, 10):



              SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 10];
              Simplify[Sign[8 (exp1 + exp2)],
              Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]



              1




              Reset the suboption value to its default:



              SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 4];





              share|improve this answer
























                up vote
                5
                down vote



                accepted







                up vote
                5
                down vote



                accepted






                You need to increase the value of the suboption "AssumptionsMaxNonlinearVariables" to a value higher than its default value (4):



                SystemOptions["SimplificationOptions"]



                "SimplificationOptions" -> "AssumptionsMaxExponent" -> 25,
                "AssumptionsMaxNonlinearVariables" -> 4,
                "AssumptionsMaxVariables" -> 21, "AutosimplifyTrigs" -> True,
                "AutosimplifyTwoArgumentLog" -> True,
                "ConvertTrigsToRadicals" -> False, "FiniteSumMaxTerms" -> 30,
                "FunctionExpandMaxSteps" -> 15, "ListableFirst" -> True,
                "RestartELProver" -> False, "SimplifyMaxExponents" -> 100,
                "SimplifyToPiecewise" -> True




                Set the value of the suboption "AssumptionsMaxNonlinearVariables" to a higher value (say, 10):



                SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 10];
                Simplify[Sign[8 (exp1 + exp2)],
                Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]



                1




                Reset the suboption value to its default:



                SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 4];





                share|improve this answer














                You need to increase the value of the suboption "AssumptionsMaxNonlinearVariables" to a value higher than its default value (4):



                SystemOptions["SimplificationOptions"]



                "SimplificationOptions" -> "AssumptionsMaxExponent" -> 25,
                "AssumptionsMaxNonlinearVariables" -> 4,
                "AssumptionsMaxVariables" -> 21, "AutosimplifyTrigs" -> True,
                "AutosimplifyTwoArgumentLog" -> True,
                "ConvertTrigsToRadicals" -> False, "FiniteSumMaxTerms" -> 30,
                "FunctionExpandMaxSteps" -> 15, "ListableFirst" -> True,
                "RestartELProver" -> False, "SimplifyMaxExponents" -> 100,
                "SimplifyToPiecewise" -> True




                Set the value of the suboption "AssumptionsMaxNonlinearVariables" to a higher value (say, 10):



                SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 10];
                Simplify[Sign[8 (exp1 + exp2)],
                Assumptions -> (1 - λ) > 0, θA1 > 0, θAU > 0, θB1 > 0, θBU > 0, λ > 0]



                1




                Reset the suboption value to its default:



                SetSystemOptions["SimplificationOptions" -> "AssumptionsMaxNonlinearVariables" -> 4];






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 18 at 19:00

























                answered Nov 18 at 18:50









                kglr

                172k8194399




                172k8194399



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f186256%2fsimplify-and-sign-working-only-in-small-expressions%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    Peggy Mitchell

                    The Forum (Inglewood, California)

                    Palaiologos