I'm looking for a real-valued function $f$ such that \begin{equation} f(x)^2+f(x)^3=e^x \end{equation} I don't even know if this problem has a solution. I thought of searching for a $n$-degree polynomial approximation of $f$ (let's call it $P_n$) on the interval $[-a,a]$, using the Taylor series of the exponential: \begin{equation} P_n^2+P_n^3=1+x+\frac{1}{2}x^2+\frac{1}{6}x^3+\cdots \end{equation} By considering the truncated series, I can set a relation between the coefficients of $P_n$ and the corresponding coefficients of the powers of $x$ on the right side. The problem is that this setting gives rise to a system of overdetermined non-linear equations, which I don't know how to approach. Any help would be appreciated!
EDIT: I define $f(x)^2$ to be $f(x)\cdot f(x)$, not $f\circ f$.
The solution of $z^2 + z^3 = t$ that is positive for $t > 0$ can be written as
$$ \frac{\left(-8 + 108 t + 12 \sqrt{81 t^2 - 12 t}\right)^{1/3}}{6} + \frac{1}{3 \left( -8 + 108 t + 12 \sqrt{81 t^2 - 12 t}\right)^{1/3}} - \frac{1}{3}$$
However, caution: for $0 < t < 4/27$ the quantity inside the square root is negative, so complex numbers will appear (although the final result should come out real). This is inevitable: see casus irreducibilis.