How is it possible to solve a second degree polynomial combined with a modulo?

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











up vote
0
down vote

favorite












I have two equations: a second degree polynomial and one with a modulo. There are two variables: $ x, y in mathbbR$; $ x, y geq 0 $, and four constants, which have a known value: $a, b, c, d in mathbbR$. The two equations:



$$ y = ax^2 + bx + c $$
$$ d equiv y ( bmod 1 ) $$



I am looking for the lowest $y$, which solves these equations.



Note: The modulo operator used here is defined on real numbers. So $y ( bmod 1 )$ means the fractional part of $y$.




What I tried so far:



I introduced a new variable $ z in mathbbN $, and changed the second equation to this:



$$ d + z = y $$



After that I tried to solve the second degree polynomial like this:



$$ 0 = ax^2 + bx + c-(d+z) $$
$$ x_1,2 = frac-b pm sqrtb^2 - 4a(c-d-z) 2a $$



I don't know, how to progress further, and get out the $z$ from the square root. My method does not seem to lead to anything.







share|cite|improve this question

























    up vote
    0
    down vote

    favorite












    I have two equations: a second degree polynomial and one with a modulo. There are two variables: $ x, y in mathbbR$; $ x, y geq 0 $, and four constants, which have a known value: $a, b, c, d in mathbbR$. The two equations:



    $$ y = ax^2 + bx + c $$
    $$ d equiv y ( bmod 1 ) $$



    I am looking for the lowest $y$, which solves these equations.



    Note: The modulo operator used here is defined on real numbers. So $y ( bmod 1 )$ means the fractional part of $y$.




    What I tried so far:



    I introduced a new variable $ z in mathbbN $, and changed the second equation to this:



    $$ d + z = y $$



    After that I tried to solve the second degree polynomial like this:



    $$ 0 = ax^2 + bx + c-(d+z) $$
    $$ x_1,2 = frac-b pm sqrtb^2 - 4a(c-d-z) 2a $$



    I don't know, how to progress further, and get out the $z$ from the square root. My method does not seem to lead to anything.







    share|cite|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have two equations: a second degree polynomial and one with a modulo. There are two variables: $ x, y in mathbbR$; $ x, y geq 0 $, and four constants, which have a known value: $a, b, c, d in mathbbR$. The two equations:



      $$ y = ax^2 + bx + c $$
      $$ d equiv y ( bmod 1 ) $$



      I am looking for the lowest $y$, which solves these equations.



      Note: The modulo operator used here is defined on real numbers. So $y ( bmod 1 )$ means the fractional part of $y$.




      What I tried so far:



      I introduced a new variable $ z in mathbbN $, and changed the second equation to this:



      $$ d + z = y $$



      After that I tried to solve the second degree polynomial like this:



      $$ 0 = ax^2 + bx + c-(d+z) $$
      $$ x_1,2 = frac-b pm sqrtb^2 - 4a(c-d-z) 2a $$



      I don't know, how to progress further, and get out the $z$ from the square root. My method does not seem to lead to anything.







      share|cite|improve this question













      I have two equations: a second degree polynomial and one with a modulo. There are two variables: $ x, y in mathbbR$; $ x, y geq 0 $, and four constants, which have a known value: $a, b, c, d in mathbbR$. The two equations:



      $$ y = ax^2 + bx + c $$
      $$ d equiv y ( bmod 1 ) $$



      I am looking for the lowest $y$, which solves these equations.



      Note: The modulo operator used here is defined on real numbers. So $y ( bmod 1 )$ means the fractional part of $y$.




      What I tried so far:



      I introduced a new variable $ z in mathbbN $, and changed the second equation to this:



      $$ d + z = y $$



      After that I tried to solve the second degree polynomial like this:



      $$ 0 = ax^2 + bx + c-(d+z) $$
      $$ x_1,2 = frac-b pm sqrtb^2 - 4a(c-d-z) 2a $$



      I don't know, how to progress further, and get out the $z$ from the square root. My method does not seem to lead to anything.









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 22 at 17:27









      Bernard

      110k635103




      110k635103









      asked Jul 22 at 17:25









      Iter Ator

      180318




      180318




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You need $a gt 0$ to make the parabola open upward. We can start by ignoring the constraint from $d$ and find the vertex of the parabola, which gives the minimum $y$ on it. Now round up to the next $y$ above the minimum that satisfies the $d$ constraint. Unless the vertex satisfies the $d$ constraint, there will be two values of $x$ that give the minimum $y$. Use the quadratic formula with the $y$ you found and you are done.



          As an example, let $y=x^2+3, d=0.1$. The vertex of the parabola is at $y=3$. Rounding up gives $y=3.1$ and the two $x$ values are $pm sqrt 0.1$



          The above works if you don't have the requirement $x,y ge 0$. If the vertex is to the right of the $y$ axis you will have at least one $x ge 0$. If the vertex is additionally below the $x$ axis the minimum $y$ is $d$, so solve the quadratic formula to get $x$. If the vertex is to the left of the $y$ axis the parabola is monotonically increasing for $x ge 0$. You have the point $(0,c)$ on the parabola. If $c le 0$ the minimum $y$ allowed is $d$. If $c ge 0$ round up from $c$ to the next value that satisfies the $d$ constraint.






          share|cite|improve this answer























          • I tried it with $a=2$, $b=30$, $c=100$ and $d=0.5$, but I get negative values for $x$
            – Iter Ator
            Jul 22 at 22:10










          • I missed the requirement that $x,y ge 0$. You can follow the above to start. I'll update.
            – Ross Millikan
            Jul 22 at 23:34










          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: "69"
          ;
          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: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2859599%2fhow-is-it-possible-to-solve-a-second-degree-polynomial-combined-with-a-modulo%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          You need $a gt 0$ to make the parabola open upward. We can start by ignoring the constraint from $d$ and find the vertex of the parabola, which gives the minimum $y$ on it. Now round up to the next $y$ above the minimum that satisfies the $d$ constraint. Unless the vertex satisfies the $d$ constraint, there will be two values of $x$ that give the minimum $y$. Use the quadratic formula with the $y$ you found and you are done.



          As an example, let $y=x^2+3, d=0.1$. The vertex of the parabola is at $y=3$. Rounding up gives $y=3.1$ and the two $x$ values are $pm sqrt 0.1$



          The above works if you don't have the requirement $x,y ge 0$. If the vertex is to the right of the $y$ axis you will have at least one $x ge 0$. If the vertex is additionally below the $x$ axis the minimum $y$ is $d$, so solve the quadratic formula to get $x$. If the vertex is to the left of the $y$ axis the parabola is monotonically increasing for $x ge 0$. You have the point $(0,c)$ on the parabola. If $c le 0$ the minimum $y$ allowed is $d$. If $c ge 0$ round up from $c$ to the next value that satisfies the $d$ constraint.






          share|cite|improve this answer























          • I tried it with $a=2$, $b=30$, $c=100$ and $d=0.5$, but I get negative values for $x$
            – Iter Ator
            Jul 22 at 22:10










          • I missed the requirement that $x,y ge 0$. You can follow the above to start. I'll update.
            – Ross Millikan
            Jul 22 at 23:34














          up vote
          0
          down vote













          You need $a gt 0$ to make the parabola open upward. We can start by ignoring the constraint from $d$ and find the vertex of the parabola, which gives the minimum $y$ on it. Now round up to the next $y$ above the minimum that satisfies the $d$ constraint. Unless the vertex satisfies the $d$ constraint, there will be two values of $x$ that give the minimum $y$. Use the quadratic formula with the $y$ you found and you are done.



          As an example, let $y=x^2+3, d=0.1$. The vertex of the parabola is at $y=3$. Rounding up gives $y=3.1$ and the two $x$ values are $pm sqrt 0.1$



          The above works if you don't have the requirement $x,y ge 0$. If the vertex is to the right of the $y$ axis you will have at least one $x ge 0$. If the vertex is additionally below the $x$ axis the minimum $y$ is $d$, so solve the quadratic formula to get $x$. If the vertex is to the left of the $y$ axis the parabola is monotonically increasing for $x ge 0$. You have the point $(0,c)$ on the parabola. If $c le 0$ the minimum $y$ allowed is $d$. If $c ge 0$ round up from $c$ to the next value that satisfies the $d$ constraint.






          share|cite|improve this answer























          • I tried it with $a=2$, $b=30$, $c=100$ and $d=0.5$, but I get negative values for $x$
            – Iter Ator
            Jul 22 at 22:10










          • I missed the requirement that $x,y ge 0$. You can follow the above to start. I'll update.
            – Ross Millikan
            Jul 22 at 23:34












          up vote
          0
          down vote










          up vote
          0
          down vote









          You need $a gt 0$ to make the parabola open upward. We can start by ignoring the constraint from $d$ and find the vertex of the parabola, which gives the minimum $y$ on it. Now round up to the next $y$ above the minimum that satisfies the $d$ constraint. Unless the vertex satisfies the $d$ constraint, there will be two values of $x$ that give the minimum $y$. Use the quadratic formula with the $y$ you found and you are done.



          As an example, let $y=x^2+3, d=0.1$. The vertex of the parabola is at $y=3$. Rounding up gives $y=3.1$ and the two $x$ values are $pm sqrt 0.1$



          The above works if you don't have the requirement $x,y ge 0$. If the vertex is to the right of the $y$ axis you will have at least one $x ge 0$. If the vertex is additionally below the $x$ axis the minimum $y$ is $d$, so solve the quadratic formula to get $x$. If the vertex is to the left of the $y$ axis the parabola is monotonically increasing for $x ge 0$. You have the point $(0,c)$ on the parabola. If $c le 0$ the minimum $y$ allowed is $d$. If $c ge 0$ round up from $c$ to the next value that satisfies the $d$ constraint.






          share|cite|improve this answer















          You need $a gt 0$ to make the parabola open upward. We can start by ignoring the constraint from $d$ and find the vertex of the parabola, which gives the minimum $y$ on it. Now round up to the next $y$ above the minimum that satisfies the $d$ constraint. Unless the vertex satisfies the $d$ constraint, there will be two values of $x$ that give the minimum $y$. Use the quadratic formula with the $y$ you found and you are done.



          As an example, let $y=x^2+3, d=0.1$. The vertex of the parabola is at $y=3$. Rounding up gives $y=3.1$ and the two $x$ values are $pm sqrt 0.1$



          The above works if you don't have the requirement $x,y ge 0$. If the vertex is to the right of the $y$ axis you will have at least one $x ge 0$. If the vertex is additionally below the $x$ axis the minimum $y$ is $d$, so solve the quadratic formula to get $x$. If the vertex is to the left of the $y$ axis the parabola is monotonically increasing for $x ge 0$. You have the point $(0,c)$ on the parabola. If $c le 0$ the minimum $y$ allowed is $d$. If $c ge 0$ round up from $c$ to the next value that satisfies the $d$ constraint.







          share|cite|improve this answer















          share|cite|improve this answer



          share|cite|improve this answer








          edited Jul 22 at 23:39


























          answered Jul 22 at 17:35









          Ross Millikan

          276k21186351




          276k21186351











          • I tried it with $a=2$, $b=30$, $c=100$ and $d=0.5$, but I get negative values for $x$
            – Iter Ator
            Jul 22 at 22:10










          • I missed the requirement that $x,y ge 0$. You can follow the above to start. I'll update.
            – Ross Millikan
            Jul 22 at 23:34
















          • I tried it with $a=2$, $b=30$, $c=100$ and $d=0.5$, but I get negative values for $x$
            – Iter Ator
            Jul 22 at 22:10










          • I missed the requirement that $x,y ge 0$. You can follow the above to start. I'll update.
            – Ross Millikan
            Jul 22 at 23:34















          I tried it with $a=2$, $b=30$, $c=100$ and $d=0.5$, but I get negative values for $x$
          – Iter Ator
          Jul 22 at 22:10




          I tried it with $a=2$, $b=30$, $c=100$ and $d=0.5$, but I get negative values for $x$
          – Iter Ator
          Jul 22 at 22:10












          I missed the requirement that $x,y ge 0$. You can follow the above to start. I'll update.
          – Ross Millikan
          Jul 22 at 23:34




          I missed the requirement that $x,y ge 0$. You can follow the above to start. I'll update.
          – Ross Millikan
          Jul 22 at 23:34












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2859599%2fhow-is-it-possible-to-solve-a-second-degree-polynomial-combined-with-a-modulo%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Color the edges and diagonals of a regular polygon

          Relationship between determinant of matrix and determinant of adjoint?

          What is the equation of a 3D cone with generalised tilt?