How is it possible to solve a second degree polynomial combined with a modulo?
Clash 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.
algebra-precalculus polynomials modular-arithmetic fractional-part
add a comment |Â
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.
algebra-precalculus polynomials modular-arithmetic fractional-part
add a comment |Â
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.
algebra-precalculus polynomials modular-arithmetic fractional-part
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.
algebra-precalculus polynomials modular-arithmetic fractional-part
edited Jul 22 at 17:27
Bernard
110k635103
110k635103
asked Jul 22 at 17:25
Iter Ator
180318
180318
add a comment |Â
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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
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
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
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
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