# The sum of two coordinates at which the first two derivatives of $f(x) = e^{2x}(x^2 + 2x)$ are equal

I came across the problem on Khan Academy while studying differential calculus:

Consider the function $$f(x) = e^{2x}(x^2 + 2x)$$.

There are two x-coordinates at which $$f'(x) = f''(x)$$. What is the sum of these two coordinates?

While finding the derivative of $$f(x)$$, I got everything reduced down to

$$f'(x) = e^{2x}(2x+2) + 2e^{2x}(x^2 + 2x)$$

Khan Academy says this can be further reduced to $$e^{2x}(2x^2 + 6x + 2)$$, obviously so I can apply the product rule again to find the second derivative, but I have no idea how they made that happen. Can anyone help me understand their algebra?

• It's just basic factorizing, isn't it? Commented Mar 28, 2015 at 21:51
• HINT: First distribute the $2$ in the second term into the brackets as follows $$2e^{2x}(x^2+2x)=e^{2x}(2x^2+4x)$$ Commented Mar 28, 2015 at 21:52

$f'(x) = e^{2x}\left(2x+2+2(x^2+2x)\right) = e^{2x}\left(2x^2+6x+2\right)$. Can you take it from here?
• Derp. Thank you! Yes, I'm going to apply the product rule to the reduced first derivative, then solve for $f'(x) = f''(x)$. I'll accept your answer in seven minutes. Commented Mar 28, 2015 at 21:55
Just factor out the $e^{2x}$:
$$e^{2x}(2x+2)+2e^{2x}(x^2+2x)=e^{2x}(2x+2+2(x^2+2x))=e^{2x}(2x^2+6x+2)$$
Facor out as was shown above: $$f'(x) = e^{2x}\left(2x+2+2(x^2+2x)\right) = e^{2x}\left(2x^2+6x+2\right)$$ But to find the second derivative you don't have to do it, because: $$f''=(e^{2x}(2x+2))' + (2e^{2x}(x^2 + 2x))'=2e^{2x}(2x+3)+4e^{2x}(x^2+3x+1)=2e^{2x}(2x^2+8x+5)$$