I need to find a reasonable length sides for 3D printing an isosceles right triangle. So basically if the formula goes something like this:

Right triangle Pythagorus theorem gives us:

x^2 + y^2 = z^2 (z being the hypotenuse)

Since this is an isosceles triangle:

2 * x^2 = z^2

and z = x * sqrt(2)

My question is how do I find z and x for my needs? And by reasonable I mean:

  1. Not very large (in the order of 10s or 100s and maybe even 1000s)
  2. Whole numbers or two decimal point precision)

Or is that not a thing? Thanks in advance!

  • 2
    $\begingroup$ There are no solutions with rational $x,z$ to $2x^2=z^2.$ So even using some specific (limited) number of decimals what you look for doesn't exist. $\endgroup$ – coffeemath Apr 29 '17 at 23:22
  • $\begingroup$ Thank you @coffeemath for the input; I was wondering if I was missing something simple but seems I was not. $\endgroup$ – Anand Apr 29 '17 at 23:34

Nice approximations come from solutions to Pell's equation $x^2-2y^2=1$ and the closely related $x^2-2y^2=-1$. We can note that $x=1, y=1$ is a solution to the second. Because of this solution and Brahmagupta's identity if you have a solution $(a,b)$ to one of them, $(a+2b,a+b)$ will be a solution to the other. Each successive solution will have the ratio of the two numbers a closer approximation to $\sqrt 2$ because the $1$ in the equation is smaller and smaller compared to $x^2,y^2$. The solutions will also alternate between being above $\sqrt 2$ (when the left side is $1$) and below $\sqrt 2$. The approximations are $\frac 11=1, \frac 32=1.5, \frac 75=1.4, \frac {17}{12}\approx 1.4167, \frac {41}{29} \approx 1.4138$ and so on. The last is rather close.

  • $\begingroup$ Ross, wow that works for me! I have a very limited depth of math but I'm fairly ok with fundamentals and logic but I would never have come up with the connections. Thanks much! $\endgroup$ – Anand Apr 29 '17 at 23:37
  • 1
    $\begingroup$ The basic idea is if you can't solve $x^2-2y^2=0$ in the integers, take the next smallest thing available for the right side and see if it works. You can replace the $2$ by any non-square and the equation is solvable with $1$ on the right. It may or may not be with $-1$ on the right. The smallest solution can be rather large. This is also related to the continued fraction for $\sqrt 2$. This is an area I have never studied formally, so my knowledge is spotty. $\endgroup$ – Ross Millikan Apr 29 '17 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.