Add Cube/Square in damage formulas?

Example:
(v[1] + v[2] + v[3])² * a.atk - b.def * 3

How to do it? Or is it even possible?
Since it's text, would I simply use "^2"?

Simply trying to figure out the limitations of the formulas and exactly how to use it to its fullest.

If you have an "ultimate guide to formulas" or something, I'll accept that as an answer, too 😅
Code:
(v[1] + v[2] + v[3]) ** 2 * a.atk - b.def * 3

The exponent operator in modern JavaScript is double asterisk, i.e. **

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators

Edit:
Simply trying to figure out the limitations of the formulas and exactly how to use it to its fullest.

The damage formula is evaluated as Javascript, so anything that is valid Javascript is valid in the formula. As far as I know, there's no limit to how long it can be, but if it's really long it can be a bit hard to read. So I usually write it elsewhere and then paste it in.

The best general guide that I've seen so far is:
https://steamcommunity.com/sharedfiles/filedetails/?id=681253029
Thank you, @Aloe Guvner
Greatly appreciated!

Original thread: https://forums.rpgmakerweb.com/threads/add-cube-square-in-damage-formulas.103821/