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













2












$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).










share|improve this question









$endgroup$











  • $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















2












$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).










share|improve this question









$endgroup$











  • $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













2












2








2





$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).










share|improve this question









$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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









Esme_Esme_

24917




24917











  • $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$
    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$
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










1 Answer
1






active

oldest

votes


















4












$begingroup$

f = a^5 + b^3 + c^2
RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
AxesLabel -> "a", "b", "c"]


enter image description here






share|improve this answer











$endgroup$












    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
    );



    );













    draft saved

    draft discarded


















    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









    4












    $begingroup$

    f = a^5 + b^3 + c^2
    RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
    AxesLabel -> "a", "b", "c"]


    enter image description here






    share|improve this answer











    $endgroup$

















      4












      $begingroup$

      f = a^5 + b^3 + c^2
      RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
      AxesLabel -> "a", "b", "c"]


      enter image description here






      share|improve this answer











      $endgroup$















        4












        4








        4





        $begingroup$

        f = a^5 + b^3 + c^2
        RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
        AxesLabel -> "a", "b", "c"]


        enter image description here






        share|improve this answer











        $endgroup$



        f = a^5 + b^3 + c^2
        RegionPlot3D[f <= 20, a, 1, 3, b, 1, 3, c, -5, 5,
        AxesLabel -> "a", "b", "c"]


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited yesterday

























        answered yesterday









        Henrik SchumacherHenrik Schumacher

        58.1k580160




        58.1k580160



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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

            getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

            Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

            Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.