I have some doubts regarding the following problem from Apostol's Calculus I book (problem 31 from section 8.28). I posted my solution attempt below. Can anyone please verify the solution and give me some hints concerning the doubts?
Problem
Given a function $f$ which satisfies the differential equation
$$xf''(x) + 3x[f'(x)]^2 = 1 - e^{-x}$$
for all real $x$.
(a) If $f$ has an extremum at a point $c \neq 0$, show that this extremum is a minimum.
(b) If $f$ has an extremum at $0$, is it a maximum or a minimum?
(c) If $f(0) = f'(0) = 0$, find the smallest constant $A$ such that $f(x) \leq Ax^2$ for all $x \geq 0$.
Solution
(a) If $f$ has an extremum at a point $c \neq 0$, then $f'(c) = 0$. Plugging this into the differential equation, we get:
$$cf''(c) = 1 - e^{-c} \implies f''(c) = \dfrac{1 - e^{-c}}{c}$$
By cases:
- If $c > 0$, then $1 - e^{-c} > 0$, so $f''(c)$ is positive.
- Otherwise, if $c < 0$, then $1 - e^{-c} < 0$, and so $f''(c)$ is positive.
Either way, the second derivative, $f''(c)$, is positive. Therefore, $f$ has a minimum at $c$.
(b) If $x \neq 0$, we can divide both sides of the differential equation by $x$ to obtain:
$$f''(x) + 3[f'(x)]^2 = \dfrac{1}{x} - \dfrac{1}{xe^x}$$
Consider the limit of the above expression as $x \to 0$. If $f$ has an extremum at $0$, then we have $f'(0) = 0$, so the limit of the left-hand side expression is $\lim_{x \to 0} [f''(x) + 3[f'(x)]^2] = \lim_{x \to 0} f''(0)$. Furthermore, the limit of the right-hand side expression is:
$$\begin{aligned} \lim_{x \to 0} \left( \dfrac{1}{x} - \dfrac{1}{xe^x} \right) &= \lim_{x \to 0} \left( \dfrac{e^x - 1}{xe^x} \right) \\ &= \lim_{x \to 0} \left( \dfrac{e^x}{e^x + xe^x} \right) & \text{(L'Hôpital)} \\ &= \lim_{x \to 0} \left( \dfrac{1}{1 + x} \right) = 1 \end{aligned}$$
Therefore, we have that $f''(0) \to 1$ as $x \to 0$. Since this is a positive value, we can conclude that $f$ has a minimum at $0$.
DOUBT: Above, I am concluding that $f''(0)$ has a positive value based on the fact that $f''(0) \to 1$. However, I think that this depends on assuming that $f''$ is continuous at $0$. How can I justify this assumption?
(c) DOUBT: I couldn't figure this one out. Any hint?
EDIT: For item (c), here is the beginning of an initial attempt.
The Taylor expansion of $f(x)$ near $x = 0$ is:
$$f(x) = f(0) + f'(0)x + f''(0)\dfrac{x^2}{2} + o(x^2)$$
We are given that $f(0) = f'(0) = 0$. Also, from item (b), we concluded that $f''(x) \to 1$ as $x \to 0$. If $f''(0)$ is continuous at zero (again: how can I justify this claim?), then we have $f''(0) = 1$. So:
$$f(x) = \dfrac{x^2}{2} + o(x^2)$$
If we can show that the remainder of this expansion is $\leq 0$ for all $x > 0$, we will have $f(x) \leq x^2/2$ for all $x > 0$, and so $A = \frac{1}{2}$. Is this correct, and is there any way to proceed from here?