We want to find the optimal strategy for renewing a book at the Leibniz Library. First, let’s look at the maximum number of days you can keep a book before renewing it. 8 at first, then 7, 7, 6, and then 4. And that’s it, you cannot renew the book again. The fine equation will start above 0 when you renew the book a fifth time. But the hold equation will max out at 100% after only 10 days. The best is clearly 16 days. But it’s very likely it will be put on hold and you’ll be stuck with 14, or worse, 8. After 2 days, the hold equation ≈22%, and the loss would be 1 day if you don’t know. But if you don’t renew, you will probably gain a day. So don’t renew then. But on day 3, you can lose 2 days, and the hold equation now ≈24%. It’s less than 33%, so the day gained would still be worth it. On day 4, the hold equation is now at ≈29%, more than 25%, so you renew. We start again on day 5, with ≈40%, it’s less than 50%, so we don’t renew. But on day 6, we have ≈51%, far more than 33%. Although we lose the possibility of an extra day, it’s quite unlikely, and not nearly enough to make it worth not renewing. So we ought to renew. Not until day 8 can we gain another day. By then the hold equation is already ≈79%. It doesn’t matter if it has been renewed yet, if it hasn’t yet we do. By the time we can gain another day, the hold equation will have reached 100%. So our answer is to renew on days 4, 6, and 8.
f(x)=d^2+5d-7cos(r)+r^3-100\\[10pt] h(x)=\frac{t^2+3sin(t)+15}{100}