To all who love math: find x to make <quadratic>=a^2; a=int
So this problem is keeping me up many nights: say, we have a quadratic, q(x)=a*x^2 + b*x + c, and we need to find such integer x, so that q(x)=t^2, for some integer t.
Does anyone here know how to do that?
I first assumed that we can find x just by factoring q(x) into perfect squares, but then some q(x) (that can yield t^2), can not be factored this way...
Does anyone here know how to do that?
I first assumed that we can find x just by factoring q(x) into perfect squares, but then some q(x) (that can yield t^2), can not be factored this way...
Is there any reason why we can't just subtract t^2 from both sides of q(x)=t^2, to get:
a*x^2 + b*x + c - t^2 = 0
and then apply the quadratic formula to get the following two roots?
x = (-b + SQRT(b^2 - 4*a*(c - t^2))) / (2*a)
and
x = (-b - SQRT(b^2 - 4*a*(c - t^2))) / (2*a)
Or am I misunderstanding the problem?
(Note: Above, "SQRT(whatever)" means the square root of whatever.)
_________________
- Autistic in NYC - Resources and new ideas for the autistic adult community in the New York City metro area.
- Autistic peer-led groups (via text-based chat, currently) led or facilitated by members of the Autistic Peer Leadership Group.
- My Twitter / "X" (new as of 2021)
Yeah I'm not quite sure what kind of answer is desired. Some general relationship between a,b,c and t? There are certainly solutions, if you can factorise a quadratic into the form (zx + y)^2 then all integer values of x satisfy OP's requirements, because if z,x and y are all integers then zx+y (=t) is an integer too.
Btw Mona and everyone else this site is useful for creating readable maths images somewhat quickly: https://latexeditor.lagrida.com/
Here are Mona's roots from the quadratic equation:
in latex that's:
use "\ " to create spaces and "\newline" or "\\" for new lines.
Can scour google for other latex cheatsheets but above will probably teach you everything you need for this particular problem.
Going along again with the perfect square idea. You could assume q(x) can only be a perfect square to satisfy q(x) = (int t)^2 and factorise q(x) as:
From which you could also find relations, but again I don't really know what we are trying to do here.
(\sqrt{a}x - \sqrt{c})^2 = t^2
_________________
Behold! we are not bound for ever to the circles of the world, and beyond them is more than memory, Farewell!
I'm trying to find a general relationship between x and a, b, c, such that x is an integer, and q(x) is t^2 for some integer(s) t.
So t and x are NOT known ahead of time.
But a, b, c ARE known.
Take, for example, the quadratic 36*x^2 + 64*x + 27. What would x have to be so that it equals t^2 for some integer t? Can we generalise this for any given quadratic?
Oh, integers - which means we're entering the realm of Number Theory.
There's the case Mikah mentioned - a factorization:
If you can represent a*x^2+b*x+c as (p*x+r)^2, then simply t=+-(p*x+r). If p and r are integers, every t is an integer for every integer x.
For such a and b, t is an integer for every integer x.
But the funny cases would be the non-trivial ones where p and r aren't integers and possibly not even real numbers. Would there still be some solutions?
I'm after my sleeping pill, so maybe tomorrow.
_________________
Let's not confuse being normal with being mentally healthy.
<not moderating PPR stuff concerning East Europe>
Without meds aimed at making the brain sleep:
If you have Δ=0, you have the case Mikah described and simple divisibility will work.
I assume that case has been already investigated by OP.
If you have Δ≠0, you can't find t(x)=p*x+q (you'd get contradicting equations).
For t^2=c (if sqrt(c) is integer), I see x=0 or x=-b/a.
It will be generally a hunt for special cases of b^2-4*a*(c-t^2) being a quadratic integer to get at least rational solutions and then finding the integer options within it. I don't see this possible for arbitrary a, b and c.
If b^2-4*a*c=0, you have the perfect square option and any t will give rational results if a is quadratic.
_________________
Let's not confuse being normal with being mentally healthy.
<not moderating PPR stuff concerning East Europe>
Don’t have time to look at this in detail but
I often use newtons method when integers and square roots and mental math is involved. Useful for finding square roots, cube roots and local minima and maxima for well behaved (not fractal) functions.
When using a computer brute force often turns up answers with less time and work. Unless “don’t use a computer” is part of the problem - or the search space is orders of magnitude greater that a typical brute force search can address (like cryptographic math)
_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie
If x and t are both unknown, this is a multi-variable quadratic equation.
I've been trying to find a good online tutorial about this but I'm having difficulty finding one.
EDIT: The most relevant-looking tutorial I've been able to find is: Conic Sections and Standard Forms of Equations, which contains the following:
Ax^2+Bxy+Cy^2+Dx+Ey+F=0
where A,B,C,D,E and F are constants.
Your problem does fit that form.
_________________
- Autistic in NYC - Resources and new ideas for the autistic adult community in the New York City metro area.
- Autistic peer-led groups (via text-based chat, currently) led or facilitated by members of the Autistic Peer Leadership Group.
- My Twitter / "X" (new as of 2021)
Interesting answers, everyone!
As a side note: does anyone know of any program, which can calculate roots of any polynomial, even without concrete coefficients (e.g. a*x^6+(a-b)*x^5+x+61==0)? I've so far tried wolfram alpha, but it said I've exceeded its maximum number of characters...
Happy upcoming New Year!! !
Wolfram Mathematica - but over degree 4, there may be no general theoretical solution existing and over some level of complication, the program won't find even the existing ones.
_________________
Let's not confuse being normal with being mentally healthy.
<not moderating PPR stuff concerning East Europe>
As a side note: does anyone know of any program, which can calculate roots of any polynomial, even without concrete coefficients (e.g. a*x^6+(a-b)*x^5+x+61==0)? I've so far tried wolfram alpha, but it said I've exceeded its maximum number of characters...
Happy upcoming New Year!! !
This one can't do unknown coefficients, but is nonetheless an impressive root finder: https://www.mathportal.org/calculators/ ... ulator.php
_________________
Behold! we are not bound for ever to the circles of the world, and beyond them is more than memory, Farewell!
Yeah I'm not quite sure what kind of answer is desired. Some general relationship between a,b,c and t? There are certainly solutions, if you can factorise a quadratic into the form (zx + y)^2 then all integer values of x satisfy OP's requirements, because if z,x and y are all integers then zx+y (=t) is an integer too.
Btw Mona and everyone else this site is useful for creating readable maths images somewhat quickly: https://latexeditor.lagrida.com/
Here are Mona's roots from the quadratic equation:
in latex that's:
use "\ " to create spaces and "\newline" or "\\" for new lines.
Can scour google for other latex cheatsheets but above will probably teach you everything you need for this particular problem.
Going along again with the perfect square idea. You could assume q(x) can only be a perfect square to satisfy q(x) = (int t)^2 and factorise q(x) as:
From which you could also find relations, but again I don't really know what we are trying to do here.
(\sqrt{a}x - \sqrt{c})^2 = t^2
If I could up-vote this post I would. Didn’t know about the latex-to-gif on-line services. Great stuff.
_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie
I took a class in college called “Discrete Mathematics” that dealt specifically with Integer math. The rules for Integers are almost the same but not quite for reals. For example we proved things like all primes greater than 3 are either a multiple of 6 plus one or a multiple of 6 minus one, and how any multiple of nine will produce a number whose digits add up to 9 or a smaller multiple of 9.
Not all integers have an integer square root. Because of this using square root in algebra related to integer math is not always “legal” and may even produce false results if you are not careful. I am a computer scientist. Computers mostly use integers to represent numbers, some times fixed point (all numbers have a fixed number of decimal digits to the right of the decimal) or floating point (all numbers are represented by a fixed point number coupled with a power of 10 [or 2] to multiply the fixed point number by, and a sign-bit 0 meaning positive and 1 meaning negative). I was able to adapt to the “Discrete Mathematics” way of thinking better than many of the Math majors because of my experience with computer math.
Google “Discrete Mathematics” to learn more.
_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie
Similar Topics | |
---|---|
What do NTs find polite that you think is not? |
06 Mar 2024, 1:59 am |
Hascanybody ever gotten surprised at you when they find out |
04 Apr 2024, 8:06 pm |
Will I find it harder to fall asleep? |
13 Feb 2024, 9:33 am |
Personality matters if they find you physically attractive |
04 Mar 2024, 1:22 pm |