Simpler way to display mathematical model?

85 Views Asked by At

I am developing a mathematical model for the power usage (watts) of a computer device against its percentage of CPU load.

So far I have:

P(x) when x <= 25% = 8.5 + x*0.46
P(x) when 25% > x <= 50% = 20 + x*0.08
P(x) when 50% > x < 75% = 24 + x*0.01
P(x) when x >= 75% = 25 + x*0.03

Where P is power usage and X is processor load

However I am not sure if there is perhaps a better way to write this out? I am pretty new to this so am really not sure and looking for some help!

2

There are 2 best solutions below

0
On BEST ANSWER

I would write $$P(x) = \begin{cases} 8.5 + 0.46x & \text{if $x \leq 0.25$} \\ 20 + 0.08x & \text{if $0.25 < x \leq 0.5$} \\ 24 + 0.01x & \text{if $0.5 < x \leq 0.75$} \\ 25 + 0.03x & \text{if $x < 0.75$.} \end{cases}$$ (I.e., display like this; fix the inequalities; and avoid percentages; I'm not sure if I should have multiplied or divided something by 100).

As an aside, I can't help noticing that your function is discontinuous; that seems weird.

0
On

I personally think that a pseudo-code (in whichever language you prefer) will be the most appropriate. What I mean here is some IF THEN / ELSE IF / ELSE IF / ENDIF. In my personal opinion, it is much more legible.