Questions about differential equation $xf''(x) + 3x[f'(x)]^2 = 1 - e^{-x}$ 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?
 A: For $(c)$:
We are given:
$$xf''(x) + 3x[f'(x)]^2 = 1 - e^{-x}, \;\;f(0)=f'(0)=0$$
Find $A: f(x) \leq Ax^2\;\;\forall x\geq 0$
You've already showed that an extremum at $x=0$ will be a minimum, with $f''(0) = 1$. We are told $f'(0)=f(0)=0$, so we have $f$ taking on a local minimum of $0$ at $x=0$.
Therefore, we have it acting locally like $x^2$ in the neighborhood around $x=0$ (second order approximation).
We need to find a multiplier $A$ of $x^2$ so $f(x) \leq Ax^2$ for $x\geq 0$.
Let $g(x)=Ax^2$ then $g'(x)=2Ax,\;g''(x)=2A$
I want see if $f'(x)$ is bounded from above by $g'(x)$ for $x>0$, in which case:
$$\int_0^x f'(z)dz \leq \int_0^x g'(z)dz \implies $$
$$f(x)-f(0) = f(x)-0 = f(x) < g(x)-g(0) = g(x)-0 = g(x)$$
Going back to the equation, if $x>0$ we get
$$f''(x) + 3[f'(x)]^2 = \dfrac{1}{x} - \dfrac{1}{xe^x} \implies [f'(x)]^2 = \frac{e^x-xe^xf''(x)-1}{3xe^x}$$
From the non-negativity of the LHS, we can see that:
$$\frac{e^x-xe^xf''(x)-1}{3xe^x} \geq 0 \implies e^x-xe^xf''(x)-1 > 0$$
$$\implies f''(x) < \frac{e^x-1}{xe^x}$$
Since $f''(0)=1>0$ and $f'(0)=0$ we know there cannot be any critical points on $x>0$ because it will have to be a minimum.
So how big can $f'(x)$ be? Well we know a bound on $f''(x)$ on $x>0$
$$f''(x) < \frac{e^x-1}{xe^x} < 1 \;\;\forall x>0 \implies f'(x)=\int_0^x f''(z)dz \leq \int_0^x 1 dz = x$$
So we see that $g'(x)\geq x$ is sufficient for $f(x)\leq g(x)$ on $x>0$:
$$g'(x)\geq x\;\forall x>0 \implies g(x) = \int_0^x g'(z)dz \geq \int_0^x zdz =\frac{x^2}{2} \geq \int_0^x f'(z)dz = f(x)$$
So it looks like $A=\frac{1}{2}$ will be as small as we can go.
A: For (b), $f''(x)$ exists for all $x$, or so I assume given the statement of the exercise. You have established that $\lim\limits_{x\to0}f''(x)=1$ (assuming $f'(0)=0$), but worry that $f''(0)$ may exist but not equal $1$. That sort of thing is not possible.
