Simplify and Sign working only in small expressions
$begingroup$
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
$endgroup$
add a comment |
$begingroup$
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
$endgroup$
add a comment |
$begingroup$
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
$endgroup$
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
simplifying-expressions
edited Nov 18 '18 at 18:51
kglr
181k9200413
181k9200413
asked Nov 18 '18 at 18:40
NinjaCowAndForksNinjaCowAndForks
444
444
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
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}];
$endgroup$
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$begingroup$
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}];
$endgroup$
add a comment |
$begingroup$
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}];
$endgroup$
add a comment |
$begingroup$
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}];
$endgroup$
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}];
edited Nov 18 '18 at 19:00
answered Nov 18 '18 at 18:50
kglrkglr
181k9200413
181k9200413
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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