I am trying to minimise $N$ in the following equation with respect to $b$.
$$N = p^b + (1-p^b)(b+1)$$
Notes: $ 0 \le p \le 1 $, because $p$ is a probability.
Background: This is my interpretation of a problem concerning how a hospital can minimise the number of HIV blood tests $N$ it has to run by pooling blood samples into bundles $b$. The HIV test has a probability $p$ of returning negative (no HIV); by extrapolation, the bundle of $b$ samples has a probability of $p^b$ of returning negative. If the bundle returns a positive, each sample in the bundle will be tested individually, yielding $b+1$ tests, the bundle plus each individual sample in the bundle.
$N$ denotes the expected number of tests, and is the probability of a bundle negative multiplied by one test, plus the probability of a bundle negative multiplied by $b+1$ tests.
I wish to find an expression for the value of $b$ that minimises $N$ for a given $p$.
I attempted to use a Langrarian (I am new to the method) but had trouble isolating the $b$ term.
$$N(b) = p^b+(1-p^b)(b+1)$$ if $p>0$, $$N(0) = 1$$
From you description, $b$ is a physical quantity, $b \ge 0$.
If $b>0$, then $N(b)$ is a convex combination between $1$ and $b+1$, which is certainly bigger than $1$. Hence the minimal value is attained at $b=0$.
If we want to impose conditions such as $b \ge b_0 >0$, then $b_0$ is the quantity that you are looking for by the convex combination argument.