Integer Square Root Quadratics

In this note, I will discuss how to find the maximum possible integer solutions for x and y in the slight variant of the quadratic Diophantine equation y2=a2x2+bx+cy^2=a^2x^2+bx+c. We will focus on the case where b2acb\neq 2a\sqrt{c} since we can factor the RHS into (ax+c)2(ax+c)^2 and every integer is a solution for xx.


Begin with the generic quadratic y=a2x2+bx+cy=\sqrt{a^2x^2+bx+c}.

Since a2x2a^2x^2 is guaranteed a perfect square, bx+cbx+c must be a difference of squares. A short proof for this is y2=a2x2+bx+cy2a2x2=bx+cy^2=a^2x^2+bx+c\Rightarrow y^2-a^2x^2=bx+c

This means that the left side can be rearranged to

ax+n=a2x2+bx+ca2x2+2axn+n2=a2x2+bx+cbx2axn=n2cx(b2an)=n2cx=n2cb2an\begin{aligned} ax+n &=& \sqrt{a^2x^2+bx+c}\\ a^2x^2+2axn+n^2 &=& a^2x^2+bx+c\\ bx-2axn&=&n^2-c\\ x(b-2an)&=&n^2-c\\ x&=&\boxed{\dfrac{n^2-c}{b-2an}}\\ \end{aligned}

NOTE: nn is a variable that is an integer.

This is maximized when the denominator is minimized or as the numerator tends infinity. Thus to minimize the denominator, nb2an\approx \dfrac{b}{2a} (look familiar? It's the same as the negation of the vertex of a parabola. Why this is, I have no idea). The \approx sign (it means approximately) is important for two reasons. 1) because nn has to be integral for y to be integral and b2a\dfrac{b}{2a} isn't always integral. 2) nn can't exactly equal b2a\dfrac{b}{2a} because if it does, then we are dividing by 0 and the world will implode.

NOTE: this is a plug and chug because we need to find an integral value of n that will make the numerator divisible by the denominator.


Now that we have found the maximum value of x, we can plug this in to find y.

y=a2x2+bx+cy=\sqrt{a^2x^2+bx+c}

y=a2(n2cb2an)+b(n2cb2an)+cy=\sqrt{a^2\left(\dfrac{n^2-c}{b-2an}\right)+b\left(\dfrac{n^2-c}{b-2an}\right)+c}

rearranging...rearranging...

y=bna(n2+c)b2an\boxed{y=\left|\dfrac{bn-a(n^2+c)}{b-2an}\right|}

(the long bars denote absolute value.. sorry it looks so bad)

This also further proves that y is maximized when nn is as close as possible to b2a\dfrac{b}{2a}.


Practice section

Maximum possible integer square root polynomial 1 (easier)

Maximum possible integer square root polynomial 2 (harder)

#Algebra #NumberTheory #Integers #Radicals #Easymoney

Note by Trevor Arashiro
6 years, 5 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

I have a few questions:

Why did you let y=ax+ny=ax+n?

Why is f(n)=n2cb2anf(n)=\dfrac{n^2-c}{b-2an} maximized at nb2an\approx \dfrac{b}{2a}?

Daniel Liu - 6 years, 1 month ago

Log in to reply

The first is easy to answer. If we look at the second half of the a2x2+bx+ca^2x^2+bx+c, then since the first half is already a perfect square, n basically represents the difference between squares. Thus it can be positive or negative. If b and c are positive, it will be positive, if both are negative, n is negative. If one is negative and one is positive, then it gets complicated.

For The second half, it is not maximized there. But that is the largest possible integral value that is achievable by that function. I don't have a "full" proof as I'm very bad at explaining this kind of thing. If you'd like me to I could try to type up a full explicit proof for this.

Which also reminds me. I have a proof of why n must be integral for x to be integral. I could add that if you'd like me to.

Trevor Arashiro - 6 years, 1 month ago

How did you wrote y=ax+ny =ax+n?

And there is x2x^{2} missing in the same expression.

Kushal Patankar - 6 years, 5 months ago

Log in to reply

I don't know what you mean by missing a x2x^2

But y=ax+ny=ax+n because a2x2a^2x^2 is guaranteed a perfect square, so bx+cbx+c must be a difference between two squares. Assuming that bx+c0bx+c\neq 0, n is just an arbitrary value that is the difference between a2x2a^2x^2 and y2y^2. You could guess many numbers for the Max value of x to find a perfect square value for a2x2+bx+ca^2x^2+bx+c, but you would never know when to stop. This method allows you to check for values of n and know when you find the max value for x (since the denominator should be minimized).

Trevor Arashiro - 6 years, 5 months ago

Log in to reply

there it is there it is

Kushal Patankar - 6 years, 5 months ago

Log in to reply

@Kushal Patankar ah, thanks, missed that

Trevor Arashiro - 6 years, 5 months ago
×

Problem Loading...

Note Loading...

Set Loading...