mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

The Animal and the Machine

Sorry for the delay @AndriusKulikauskas on the Peace in Ukraine podcast. I’ve been temporarily obsessed with ’s last theorem while teaching myself Python but I feel like I’ve solved that now. So on with the show!

FYI
c^n = sin(θ)a^n + sin(θ)b^n

# Python
# @taatm
, and TAATM
# Things we know
# Relationship of sides in a right angle triangle
# c**2 = a**2 + b**2
# This triangle is true but only one value of n prduces a right angle
# c**n = a**n + b**n
# The area of a triangle
# 1/2bc sin(A)
# where sides b & c are the same you can write bb or b**2
# so the area of triangle is 1/2b**2 sin(A)
# as the two sides of the triangle are the same, we can make square by adding anthoer one on top AKA doubling it
# the area of a square is therefore
# b**2sin(A)
# applying this to both sides of Pythagorus we therefore get the relationship
# n n n
# c = sin(θ)a + sin(θ)b
# And so I think Fermat, if knowing this, would conclude that Pythagous to the n can't work as thats not the relationship. Its a trick where the right angle provides a multiplier of 1.

import math

# Variables
n=4
a=3
b=4

# Pythagorus gives us c and allows a ratio
c=math.sqrt(a**2+b**2)

# the ratio can be used to find theta
known_ratio = c**n/(a**n+b**n)

theta = math.asin(known_ratio-1)
# The -1 is just to make the maths easier with arc sine and will be put back later, the true angle is function of pi

# Handy Derivatives
a2b2 = a**2+b**2
anbn = a**n+b**n
cn = c**n

print (a, b, c)
print (anbn, cn)
print (known_ratio, known_ratio * (a**n + b**n))
print (math.sin(theta) + 1, (math.sin(theta) + 1) * (anbn))
# The 1 that was taken out is added back in.
# The fun part will be finding theta from pi.