This question comes from Michael Spivak's Calculus, Chapter 11, Problem 59, for which there are already a few posted questions about this problem:
"Calculus 4th Edition" by Michael Spivak -- Chapter 11 Problem 59
Spivak — Chapter 11 Problem 59 Problems understanding the solution
Find a formula for $f''$ in terms of $f$, where $f\gt 0$ and $(f')^2=f-\frac{1}{f^2}.$
However, all of these questions seem to gloss over a minor technicality that I can't seem to wrap my head around. It occurs in the very first manipulation:
$[f'(x)]^2 = f(x) - \frac{1}{[f(x)]^2}$
$2f'(x)f''(x) = f'(x) + \frac{2f'(x)}{[f(x)]^2}$
Why is the LHS justified? $[f'(x)]^2 = 2f'(x)f''(x)$ is only true if $f'(x)$ and $f''(x)$ are defined. Of course $f'(x)$ is defined, because otherwise the original equation wouldn't make sense, and we can justify the RHS using the fact that $f(x) \geq 1$ (again because if not, the original equation wouldn't make sense). But I can't find a way to justify the LHS. And I don't know anything about diff. equations to come up with a counter-example if it's not.
Does the question assume $f''(x)$ is defined? If not, why is it necessarily? If so, is there a counter-example where $f$ satisfies the above, but $f''(x)$ is not defined?
Update: I've made some progress. First of all, $f''(x)$ is necessarily defined if $f'(x) \neq 0$, but that's kind of trivial. More interesting is when $f'(x) = 0$.
Note that $f(x) = 1$ is a trivial solution to the equation. If you have another solution $g(x)$ such that $g(x) = 1 : \forall x \in (a,b)$, then $g''(x) = 0 : \forall x \in (a, b)$, and in particular, $g''(a)$ and $g''(b)$ are undefined! So the answer to my question is no. But now comes forth a new question...
What if $g(x)$ is a solution such that $g(x) = 1$ is only true for a single $x$? This is Paul Frost's idea of an isolated point. In this case, must $g''(x)$ be defined? I think it is, and should be $2f'(x)f''(x)$ but it's tricky to prove.
One week later, I finally solved this damned problem. I'm writing up my conclusions because I think the other solutions missed some key cases. For details of the proofs for each case, ask below.
Case 1: $x_1$ is a point such that $f(x_1) \neq 1$. Then $f''(x_1) = \frac{1}{2} + \frac{1}{f^3(x_1)}$
Case 2: $x_1$ is a point such that $f(x_1) = 1$, and there exists $x_2$ and $x_3$ such that $x_2 < x_1 < x_3$ and $f(x_1) = f(x_2) = f(x_3) = 1$. Then $f''(x_1) = 0$.
Case 3a: $x_1$ is a point such that $f(x_1) = 1$, and there exists $x_2$ such that $x_2 < x_1$ and $f(x_1) = f(x_2) = 1$. But $\forall x > x_1 : f(x) \neq 1$. Then $f''(x_1)$ is undefined!
Case 3b (The mirror image of Case 3a): $x_1$ is a point such that $f(x_1) = 1$, and there exists $x_3$ such that $x_1 < x_3$ and $f(x_1) = f(x_3) = 1$. But $\forall x < x_1 : f(x) \neq 1$. Likewise, $f''(x_1)$ is undefined.
Case 4: $x_1$ is a point such that $f(x_1) = 1$ and $\forall x \neq x_1 : f(x) \neq 1$. Then $f''(x_1) = \frac{1}{2} + \frac{1}{f^3(x_1)}$.