the-honk/challenges/euler/thoughts/9 - Special Pythagorean triplet.md

25 lines
1.1 KiB
Markdown
Raw Normal View History

2024-10-09 17:02:42 +00:00
<div align="center">
2024-10-09 17:02:42 +00:00
### Proof
2024-10-09 17:02:42 +00:00
> let x be the sum
2024-10-09 17:02:42 +00:00
<img src="https://latex.codecogs.com/svg.image?c&space;=&space;x&space;-&space;(a&space;&plus;&space;b)&space;\\a^2&space;&plus;&space;b^2&space;=&space;(x&space;-&space;(a&space;&plus;&space;b))^2&space;\\a^2&space;&plus;&space;b^2&space;=&space;a^2&space;&plus;&space;2ab&space;-&space;2ax&space;&plus;&space;b^2&space;-&space;2bx&space;&plus;&space;x^2&space;\\2ab&space;-&space;2ax&space;-&space;2bx&space;&plus;&space;x^2&space;=&space;0&space;\\\\2bx&space;-&space;2ab&space;=&space;x^2&space;-&space;2ax&space;\\(\frac{x^2}{x})&space;-&space;2a&space;=&space;2b&space;-&space;(\frac{2ab}{x})&space;\\-2a&space;=&space;2b&space;-&space;(\frac{2ab}{x})&space;-&space;(\frac{x^2}{x})&space;\\\\a&space;=&space;\frac{2bx&space;-&space;x^2}{2x&space;-&space;2b}" width="500">
### LaTeX
```
2024-10-09 17:02:42 +00:00
c = x - (a + b) \\
a^2 + b^2 = (x - (a + b))^2 \\
a^2 + b^2 = a^2 + 2ab - 2ax + b^2 - 2bx + x^2 \\
2ab - 2ax - 2bx + x^2 = 0 \\
\\
2bx - 2ab = x^2 - 2ax \\
(\frac{x^2}{x}) - 2a = 2b - (\frac{2ab}{x}) \\
-2a = 2b - (\frac{2ab}{x}) - (\frac{x^2}{x}) \\
\\
a = \frac{2bx - x^2}{2x - 2b}
```
2024-10-09 17:02:42 +00:00
</div>