Question about the functional equation $B(t,T)=c(t)B^2(t,T)$ arising from certain differential equations We are looking at a theorem which characterizes the affine term structure (ats) models in interes rate theory. What follows is from "Filipović, D. (2009): "Term-structure models: A graduate course", Springer-Verlag", chpt. 5, page 84.
We denote by $F(t,r,T)$ the bond price and say it is of (ats) if and only if
$$F(t,r,T)=e^{-A(t,T)-B(t,T)r}$$
for smooth functions $A$ and $B$. $r$ denotes the interest rate and is a stochastic process. Then the theorem states

a short rate model of the form
$$\mathrm dr(t)=b(t,r)\mathrm dt+\sigma(t,r)\mathrm dW(t)\tag{*}\label{*}$$
for continuous $b$ and $\sigma$ provides ats if and only if
$$\sigma^2(t,r)=a(t)+\alpha(t)r \text{ and } b(t,r)=b(t)+\beta(t)r$$
for continuous function $a$, $\alpha$, $b$ and $\beta$, and the functions $A$ and $B$ satisfy the system of ODE, for all $t\le T$:
$$\partial_tA(t,T)=\frac{1}{2}a(t)B^2(t,T)-b(t)B(t,T), \, A(T,T)=0$$
$$\partial_tB(t,T)=\frac{1}{2}\alpha(t)B^2(t,T)-\beta(t)B(t,T)-1, \, B(T,T)=0$$

The key point of the proof is that $F$ should satisfy the following equation
$$ \partial_t F+b\partial_rF+\frac{1}{2}\sigma^2\partial_{rr}F-rF=0\tag{1}\label{1}$$
where $b,\sigma$ are from \eqref{*}. For the proof, you put the explicit formula of $F$ into \eqref{1}, we see that the short rate model provides an ats if and only if
$$\frac{1}{2}\sigma^2B^2-bB=\partial_tA+(\partial_tB+1)r \tag{2}\label{2}$$
where I wrote $B$ for $B(t,T)$ and the same for $A$. Looking about the equation above the direction "$\Leftarrow$" is proved. For the direction "$\Rightarrow$", they first assume that $B$ and $B^2$ are linearly independent for fixed $t$ and show the claim. After that the only case which we now have to look at, is
$$B(t,T)=c(t)B^2(t,T)\tag{3}\label{3}$$
for some constant $c(t)$. I guess we also fix here $t$. Then they conclude the following things, which I do not understand: \eqref{3} should imply that $B(t,\cdot)=B(t,t)=0$. Why is that true?
From there they say, well then \eqref{2} implies that $\partial_tB(t,T)=-1$. I also do not get that conclusion.
After all they conclude that the set of elements $t$, for which $B(t,\cdot)$ and $B^2(t,\cdot)$ are linearly independent is open and dense in $\mathbb{R}_+$.
I have no idea how one can conclude all these things. Some help would really be appreciated.
 A: Assume $B(t,T) = c(t)B^2(t,T)$ for some $t$. Since this must hold for all $T \geq t$ we have $B(t,T) = B(t)$ is a constant independent of $T$. If you look into the book you mentioned you'll also notice there that $B(T,T) = 0$ for all $T$ (as a consequence of normalization on $F$). Therefore we actually have $B(t,T) = 0$ for all $T$. Inspecting the $r$-part of $(2)$ it follows that $\partial B(t,T) = -1$ for all $T$.
Putting this together, if $B$ and $B^2$ are linearly dependent for some $t$, the function $B(t,T)$ has an isolated zero at $t$ for all $T$. Therefore the set of $t$ where $B$ and $B^2$ are linearly independent is open (it is a union of open intervals between isolated zeros) and dense (since zeros are at the boundaries of those open intervals). Finally, since everything in sight is continuous, you can continue the results from the case where $B$ and $B^2$ are independent to all $t$.

EDIT: As for why the zeros are isolated. Let's illustrate this on a simple example of function $f(t) = -t$. We have $f(0) = 0$ and $\partial_t f(t) = -1$. The zero in this example is isolated trivially, since it is the only zero of $f$. But the situation also applies for every $T$ to $B(\cdot, T)$ from the above discussion: it will near $t$ look like $f$ around $0$ i.e. like a straight line with downward slope. So it should be clear that there is no other zero in some $\epsilon$-neighborhood.
Maybe it would be also useful to illustrate with a counterexample of a function that also has a non-isolated zero. For example $f(x) = xsin(1/x)$ for $x \neq 0$ and $f(0) = 0$. But such a function necessarily isn't smooth (which $B$ is, therefore it can't have a non-isolated zero).
As for the denseness. We say that subset $A \subset B$ is dense if the closure $\bar A = B$. In our case $B$ is a closed interval of $\mathbb R$ and $A = B \setminus Z$ where $Z$ is the set of zeros. So it is enough to show that every zero is in the closure of $A$. But this is immediate from the above discussion, since if $t$ is a zero then there is an $s$ such that the interval $(s,t) \subset A$ doesn't contain a zero. Moreover the closure of  $ {(s,t)}$ is $[s,t] $, i.e. $t$ belongs to the closure of $A$. Therefore the closure of $A$ contains $Z$ and so is equal to $B$, as was to be proved.
