In one of my classes, our teacher introduced us to a software. Using this software, we had to model a lake with fish in it. The growth of the fish population would be governed according to two things: the natural logistic growth rate and fishing. The task was then to maximize the amount fished after a set period of time. This was to learn how to use the software, but just for fun, I wanted to find the absolute maximum.
Let $r$ be the logistic growth rate, $k$ be the carrying capacity, $T$ be the total time, and $P_0$ be the starting fish population with $P_0 < k$. All four of these values are fixed. Let $P(t)$ be the fish population at time $t$ and $f(t)$ be the fishing rate. Then I got that the differential equation for $P$ would be $$\frac{dP}{dt} = \underbrace{rP\left(1 - \frac{P}{k}\right)}_{\text{logistic growth}} - f \tag 1$$
while the amount fished (which is the value to be maximized) is $$\int_0^T f(t)dt \tag 2$$
The main condition is that if $P$ drops to $0$, then $f$ would also have to drop to $0$. You can't get fish if there's no fish left! Otherwise, you could make $f$ arbitrarily large. Also, $f$ must be nonnegative: no adding fish to the lake.
Trying to solve $(1)$ for an explicit equation for $P$ seems impossible, but I'll show what I tried. Setting it up as $Mdt + NdP = 0$ makes it $$\left( rP \left( 1-\frac{P}{k} \right) - f \right) dt + (-1) dP = 0$$
Multiplying by an integrating factor $u$, I get that $$r \left( 1- \frac{2P}{k} \right)u = -\frac{\partial u}{\partial t} - \left( rP\left(1-\frac{P}{k}\right)-f \right) \frac{\partial u}{\partial P}$$
I'm pretty new to differential equations, and I don't know how to solve this (or if it even is solvable).
Rearranging $(1)$, I get that $f = rP\left(1-\frac{P}{k}\right) - \frac{dP}{dt}$, which means that $(2)$ is $$\int_0^T \left( rP\left(1-\frac{P}{k}\right) - \frac{dP}{dt} \right) dt = r\int_0^T P\left(1-\frac{P}{k}\right)dt - P(T)+P_0$$
Intuitively, it is true that $P(T) = 0$. If it was greater than $0$, then more fish could be taken. I'm not sure what to do from here though. One of the challenges with this problem is that it's impossible to work from the end. It might pay off to let the fish grow more at that instant so that you can fish more later.
My questions:
What is the $f(t)$ that maximizes $(2)$ given that $P$ changes according to $(1)$, $f(t) \ge 0$, and if $P = 0$, then $f = 0$?
Can the problem be modified in some way to get rid of $r, k, T,$ or $P_0$ (i.e. can it be transformed so that one of those can be fixed at $1$ [or any other value])? I think a linear transformation might be useful here, but I don't know.
I'm doubtful of an exact closed-form solution, so are there approximations of $f(t)$?