Plot surface of constraints: Possibly via Apply or Map Reduce over a list of equationsHow do I treat elements in a list as variables inside a module?variable sized lists and using lists as variablesAppend in For loop does not workPlot the result of Solve for multivalued solutionLast@Accumulate not giving same result as TotalTable and ListPlot3DFinding the slowest decay to a value for a 2D functionUsing Append without creating variableMerging the listsUsing Solve outputs for further calculations
Is `x >> pure y` equivalent to `liftM (const y) x`
Is a stroke of luck acceptable after a series of unfavorable events?
What is the difference between "behavior" and "behaviour"?
How can I get through very long and very dry, but also very useful technical documents when learning a new tool?
Is exact Kanji stroke length important?
Do sorcerers' Subtle Spells require a skill check to be unseen?
Different result between scanning in Epson's "color negative film" mode and scanning in positive -> invert curve in post?
India just shot down a satellite from the ground. At what altitude range is the resulting debris field?
Large drywall patch supports
How can we prove that any integral in the set of non-elementary integrals cannot be expressed in the form of elementary functions?
Escape a backup date in a file name
How to be diplomatic in refusing to write code that breaches the privacy of our users
How do we know the LHC results are robust?
Proof of work - lottery approach
How do I go from 300 unfinished/half written blog posts, to published posts?
Why Were Madagascar and New Zealand Discovered So Late?
How long to clear the 'suck zone' of a turbofan after start is initiated?
System.debug(JSON.Serialize(o)) Not longer shows full string
Term for the "extreme-extension" version of a straw man fallacy?
Is there a good way to store credentials outside of a password manager?
Avoiding estate tax by giving multiple gifts
A particular customize with green line and letters for subfloat
Opposite of a diet
How do I find the solutions of the following equation?
Plot surface of constraints: Possibly via Apply or Map Reduce over a list of equations
How do I treat elements in a list as variables inside a module?variable sized lists and using lists as variablesAppend in For loop does not workPlot the result of Solve for multivalued solutionLast@Accumulate not giving same result as TotalTable and ListPlot3DFinding the slowest decay to a value for a 2D functionUsing Append without creating variableMerging the listsUsing Solve outputs for further calculations
$begingroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
$endgroup$
add a comment |
$begingroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
$endgroup$
$begingroup$
AreA
andB
constrained to be integers?
$endgroup$
– Chris K
yesterday
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
yesterday
add a comment |
$begingroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
$endgroup$
I have a function f(A,B,C)
where for specific A
and B
values I can use Reduce to determine the constraint on C
for my problem using a constraint on f
. I want to plot the resulting surface.
To illustrate, consider
f = A^5 + B^3 + C^2
If A
and B
vary between 1 and 3 then I get the list of constraints (with f<20)
constraints = 1, 1, C < 18, 2, 1, C < -13, 3, 1, C < -224, 1, 2, C < 11, 2, 2, C < -20, 3, 2, C < -231, 1, 3, C < -8, 2, 3, C < -39, 3, 3, C < -250
I then want to plot the surface given by
surf = 1, 1, 18, 2, 1, -13, 3, 1, -224, 1, 2,
11, 2, 2, -20, 3, 2, -231, 1, 3, -8, 2, 3,
-39, 3, 3, -250
ListPlot3D[surf,Mesh->All]
I can form the list of constraints using For loops
constraints = ;
For[B = 1, B <= 3, B++,
For[A = 1, A <= 3, A++,
f = (A)^5 + B^3 + p;
sol = Reduce[f < 20, p];
constraints = Append[constraints, A, B, sol]
]
]
constraints
However I am not sure how to get from the list of constraints to the max permitted value for C
and therefore get to the surf expression.
I also expect that For loops are not an ideal approach, and that I should be able to form lists of the A
and B
values and use another approach (Map, or Thread, or Apply maybe) with Reduce. I find these methods confusing though, and don't really understand anything but the most basic examples (so possibly similar questions have not helped me figure this out).
list-manipulation equation-solving
list-manipulation equation-solving
asked yesterday
Esme_Esme_
24917
24917
$begingroup$
AreA
andB
constrained to be integers?
$endgroup$
– Chris K
yesterday
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
yesterday
add a comment |
$begingroup$
AreA
andB
constrained to be integers?
$endgroup$
– Chris K
yesterday
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
yesterday
$begingroup$
Are
A
and B
constrained to be integers?$endgroup$
– Chris K
yesterday
$begingroup$
Are
A
and B
constrained to be integers?$endgroup$
– Chris K
yesterday
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
yesterday
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
yesterday
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$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%2f193964%2fplot-surface-of-constraints-possibly-via-apply-or-map-reduce-over-a-list-of-equ%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$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$endgroup$
add a comment |
$begingroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$endgroup$
add a comment |
$begingroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
$endgroup$
f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]
edited yesterday
answered yesterday
Henrik SchumacherHenrik Schumacher
58.1k580160
58.1k580160
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%2f193964%2fplot-surface-of-constraints-possibly-via-apply-or-map-reduce-over-a-list-of-equ%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
$begingroup$
Are
A
andB
constrained to be integers?$endgroup$
– Chris K
yesterday
$begingroup$
No they aren't - my actual function is quite complex so this is just a simple example. @Henrik Schumacher's solution works wonderfully, but I'd still like to know how to map across the list if anyone has a solution that works that way (just for general development of skills)
$endgroup$
– Esme_
yesterday