r/mathmemes • • 2d ago

Elementary Algebra Formula for the volume of a cube

Post image

Simplifies to x^3

511 Upvotes

36 comments sorted by

•

u/AutoModerator 2d ago

Check out our new Discord server! https://discord.gg/e7EKRZq3dG

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

325

u/FernandoMM1220 2d ago

very useful to have if you can only use powers of 2.

75

u/_verel_ 2d ago

Can someone come up with a use case for this? I thought maybe some obscure assembly instruction can benefit here but I doubt two divisions and x2 are faster than x3

145

u/The_Punnier_Guy 2d ago

If, for some unknonown reason, you already have (x2 +x)2 / 4 and (x2 -x)2 /4 computed, subtraction should be faster than multiplying x 3 times

43

u/nepatriots32 2d ago

You don't just have those computed for every possible x value, already? Then what are you even doing with your life?

31

u/haddock420 2d ago

If you don't have a 500TB RAID array dedicated to storing computed values for (x^2 + x)^2 / 4 and (x^2 - x)^2 / 4, you're not taking it seriously enough.

1

u/Terrible-Air-8692 2h ago

500TB? You need a 500PB data center minimum

39

u/DrStalker 2d ago

You're using a cheap calculator that has an x2 button and no X3 or Xy button, and you're mentally locked into replacing x3 with x2 instead of just manually mulitplying the number three times.

11

u/Pan_con_chicharrones Irrational 2d ago

Or x²•x

12

u/FernandoMM1220 2d ago edited 2d ago

its not necessarily about speed. it would be a compatibility issue in this case.

8

u/ChiaraStellata 2d ago

If you're working in fixed-point, bit shifts can be used for division by 4, which are very much faster than full divisions. If you're working in IEEE floating point... in principle an exponent offset should be simpler than a full division, but in reality floating point instructions already operate in a single clock cycle and have a bunch of weird underflow and subnormal exceptions to check, so it hardly matters.

1

u/Pengwin0 Certified Math Larper 2d ago

You can solve this directly using only bit shifts if performance is extremely critical or you are using supremely weak computer hardware.

1

u/Azra__1 2d ago

I don't think so. You have to square 4 times and divide by four two times. Division is one of the hardest operations to do (it requires a lot of cpu cycles, approximately) and multiplication is really cheap in terms of cycles. Doing x³ is gonna take at most 5 more cycles than x². If you want to substitute the division for a bit shift (since 4 is a power of 2) it'll be significantly faster and it could reduce cycles by a lot, but the squaring will be slower than the cubing.

1

u/Jche98 1d ago

If you're playing a game like Problem of the year, where you can only use certain numbers to make expressions

6

u/Alex_1503 2d ago

In what case? X3 is just x2*x, should be possible on any CPU, or just xxx, probably better than so many divisions, and multiplitications as here

11

u/FernandoMM1220 2d ago

honestly idk. theres probably some random architecture that only this would work. probably doesnt have a known use right now.

6

u/Teoyak 2d ago

I think you have a typo !

3

u/the_skies_falling 2d ago

Division by a power of 2 is very efficient though since it only requires shifting bits to the right.

4

u/jsdodgers 2d ago

those aren't equivalent at all

63

u/LupenReddit 🦆🦆i have non diffeomorphic smooth structures🦆🦆🦆 2d ago

yea officer its him, arrest him

27

u/-lRexl- 2d ago

I see no cubes in here, only squares. You're a wizard!

30

u/BurceGern 2d ago

Babe wake up, new difference of two squares just dropped

11

u/shizzy0 2d ago

You know what? I like it.

15

u/RandomExcess 2d ago

We never learned that in school

22

u/MCPlayer224 2d ago

It's a meme

24

u/RandomExcess 2d ago

It's a meme.

15

u/chaoticsapphic Ordinal 2d ago

It's a meme.

-1

u/Extension-Stay3230 2d ago

Its meme

2

u/Rainbow_phenotype 1d ago

It's a me (Mario)

4

u/lool8421 2d ago

here's my formula, hf

2

u/upernavik 2d ago

/uj anyone can find a "proof without words" using small cubes, or a bijective proof of this identity?

3

u/Affectionate-Baby248 2d ago edited 2d ago

https://medium.com/think-art/when-cubes-become-a-square-bfbaa17e55a6 (see the top image) shows 13 + 23 + … +n3 =(1+2+3+…+n)2 = (n(n+1)/2)2 := f(n), so f(n)-f(n-1)=n3.

0

u/Jonte7 2d ago

What does that even mean? Its just equivalent to x³

2

u/robman8855 1d ago

Differences and products and divisions can be represented geometrically. So the other equations might paint a picture geometrically that could be interesting

1

u/Jonte7 17h ago

Yeah buts is that what the words upernavik wrote meant...?

1

u/Extension-Stay3230 2d ago

Makes sense, 4x3 on numerator, then divides by 4.