Operating systems: How can we calculate how many processes must be in memory at the same time to maximize CPU usage?

Leave $ U $ Indicates the CPU utilization in percentage. What you have calculated is:
$$ log (U) = log (1 – P ^ n) stackrel {!} = log (1) – log (P ^ n) = log (1) – n log (P) $ $

However, the equality marked with an exclamation mark is incorrect since $ log (a – b) $ is, in general, do not equal to $ log (a) – log (b) $.

The correct line of reasoning is rethinking the original equality as $ P ^ n = 1 – U $ and so:
$$ n log (P) = log (P ^ n) = log (1 – U) $$
A) Yes:
$$ n = frac { log (1 – U)} { log (P)} $$

(Of course, all this assuming $ P> 0 $ Y $ U <1 $; otherwise, there is no (only) solution.


Tip: when rephrasing mathematical expressions, always do it. one step at a time, and question every step! Otherwise, you are bound to make mistakes. (Source: personal experience)