I have a Euler-Lagrange equation

$\displaystyle \frac{\partial f}{\partial x} - \frac{d}{dt} (\frac{\partial f}{\partial \dot{x}})= 0$

which for my f is

$\displaystyle \dot{x} + 1 - \frac{d}{dt} (\dot{x} + x + 1) = 0$

The solutions say I should end up with

$\displaystyle \ddot{x} - 1 = 0$

I end up with

$\displaystyle \dot{x} + 1 - \ddot{x} - \dot{x} - x = 0$

$\displaystyle \ddot{x} + x = -1$

I must be doing

$\displaystyle \frac{d}{dt} (\dot{x} + x + 1)$

incorrectly? What am I doing wrong?