Ask Your Question
1

Square, cube, octahedron, equations

asked 2020-12-15 11:00:00 +0200

wisher gravatar image

updated 2020-12-15 14:46:07 +0200

slelievre gravatar image

We know that $|x| + |y| - 1 = 0$ is the equation of a square having its vertices on the axes.

I asked to represent the equation $|x| + |y| + |z| - 1 - 0$, believing to obtain a cube in space.

But I obtain an octahedron. Why? And how do you get a cube?

# with SageMath 7.3
var('x, y, z')
f = abs(x) + abs(y) + abs(z) - 1
implicit_plot3d(f, (x, -1, 1), (y, -1, 1), (z, -1, 1), color='aquamarine ')
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2020-12-15 11:09:06 +0200

tmonteil gravatar image

updated 2020-12-15 14:49:05 +0200

This is not really a Sage question, rather a mathematical question. What you are drawing is the unit ball of the L1 norm, which is an ocatahedron. If you want to obtain a cube, you should rather draw the unit ball of the L-infinity norm. This norm does not sum the absolute values of the coordinates, but it takes their maximum.

Note that the maximum for symbolic expression, is max_symbolic.

edit flag offensive delete link more

Comments

Thank you for your reply. She made me understand that I have math gaps. I'm going to check out math sites to try and figure out what L-infinity norm is. I have cut out!

wisher gravatar imagewisher ( 2020-12-15 23:42:31 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-12-15 11:00:00 +0200

Seen: 61 times

Last updated: Dec 15 '20