The author could've made it somewhat easier, though. Keeping the unused variable (so still keeping the drop) it can be reduced by 1 operation, but the logic of what's on the stack and managing it is simplified:
drop dup dup * swap abs - swap dup * +
operation : stack
(init) : x y z
drop : x y
dup : x y y
dup : x y y y
* : x y (y^2)
swap : x (y^2) y
abs : x (y^2) |y|
- : x (y^2 - |y|)
swap : (y^2 - |y|) x
dup : " x x
* : " (x^2)
+ : y^2-|y|+x^2
The author's version requires rot_3 in order to deal with performing the computation in an awkward order. This version deals with each variable in order and in a more natural way. And replacing `dup * ` with `square` simplifies it a bit more (which is what you'd do in a language like Forth, you factor common operations into new words): : square dup *;
drop dup square swap abs - swap square +
operation : stack
(init) : x y z
drop : x y
dup : x y y
square : x y (y^2)
swap : x (y^2) y
abs : x (y^2) |y|
- : x (y^2 - |y|)
swap : (y^2 - |y|) x
square : " (x^2)
+ : y^2-|y|+x^2
Down to 9 ops, and reasonably clear at this point.