# Critical point problem

so I was doing my calculus homework and ran into this tricky question.

Determine the total number of critical points of the function $f(x)=(x+e^x)^k$, where $k>0$ is an integer

So I got the derivative is $f'(x)=k(x+e^x)^{k-1} \times (1+e^x)$, but I couldn't find the point, however when I look at the graph there is a point around $0.567$ or W($1$), so I am a bit lost.

Thanks!

• you mean $f(x)=(x+e^x)^k$? – mengdie1982 Jul 11 '18 at 8:19
• Yes, that is what I meant. – Michael M Jul 11 '18 at 8:20
• Using iterations i got $-0.567$. – Chris2018 Jul 11 '18 at 8:26
• It should be $\color{red}{-}W(1)$ – Claude Leibovici Jul 11 '18 at 9:06

$$f'(x)=k(x+e^x)^{k-1} \times (1+e^x)=0$$

has only one solution which is where $x+e^x=0$ and that is the point that you want to approximate.

The answer should be negative so $x=0.567$ is problematic.

# Solution

Notice $$f'(x)=k(x+e^x)^{k-1}(1+e^x).$$

Let $$f'(x)=0$$. Then we obtain $$x+e^x=0$$

This equation has no closed-form solution. But by graphing $$y=-x$$ and $$y=e^x$$, you may intuitively find there exists only one root over $$(-1,0)$$. Moreover, we may prove this fact. Since $$f''(x)=1+e^x>0.$$ Then $$f'(x)$$ is rigorously increasing over $$(-\infty,+\infty)$$. Thus, there exists at most one solution for $$f'(x)=0$$. Notice that $$f'(-1)=-1+e^{-1}<0$$ and $$f'(0)=0+e^0>0$$. Thus, by intermediate value theorem, we may claim the fact.

• Thank you for the explanation! – Michael M Jul 12 '18 at 0:17

At critical points $f'(x)=0$ so

$0=k(x+e^x)^{k-1} \times (1+e^x)$
k and $(1+e^x)$ are positive so $0=x+e^x$
$x_n=-e^{x_{n+1}}$ so $x \approx -0.56714329$

Given \begin{align} f'(x)&=k(x+\exp(x))^{k-1} \times (1+\exp(x)) \end{align}

the function $f$ have no critical points for $k=1$ and one critical point for $k>1$ at

\begin{align} x&=-\operatorname{W}(1) \approx -0.567143290409784 . \end{align}

Edit

We need to solve $f'(x)=0$, so since it is given that $k>0$ and we know that $\exp(x)>0$ for all $x\in \mathbb{R}$, we can ignore the factor $(1+\exp(x))$, and all we left to consider is when

\begin{align} (x+\exp(x))^{k-1}&=0 . \end{align}

for $k=1$ we have

\begin{align} f(x)&=x+\exp(x) \\ f'(x)&=1+\exp(x)>0 \quad \forall x\in\mathbb{R} . \end{align}

For $k>1$:

\begin{align} x+\exp(x)&=0 ,\\ -x&=\exp(x) ,\\ -x\exp(-x)&=1 \tag{1}\label{1} . \end{align}

At this point we have an equation of the form $u\exp(u)=v$, and a long time ago it was suggested to write an exact solution of this equation as $u=\operatorname{W}(v)$, where $\operatorname{W}$ is the Lambert W function, which for equations of the form $u\exp(u)=v$ plays exactly the same role as the function $\ln$ plays for equations of the form $\exp(u)=v$: to express the exact solution of $\exp(u)=v$, we write $u=\ln(v)$.

So, to continue with \eqref{1}, we have \begin{align} \operatorname{W}(-x\exp(-x))&=\operatorname{W}(1) ,\\ -x&=\operatorname{W}(1) ,\\ x&=-\operatorname{W}(1) \tag{2}\label{2} . \end{align}

Now, we need to recall that when dealing with $\operatorname{W}$ (very much like with quadratic equation, for example) we can face with from 0 to at most two real solutions, which have special names $\operatorname{W_0}$ and $\operatorname{W_{-1}}$.

The number of solutions and their range is solely defined by the argument $v$ in $\operatorname{W}(v)$:

Thus, in our case \eqref{2}, the argument of $\operatorname{W}$ is $1$, that means, we have just one real solution,