give us the mathematics solution for this.

what equation do you use?