Well, let's first try to make a more complete description of your problem:
$$\frac{dx}{dt} = -x + u$$
This means that on State Space you have: $A=-1$, $B=1$, $C=1$ and $D=0$
The formal definition of the cost functional is:
$$J=x(t_{f})^{T}F(t_{f})x(t_{f})+\int^{t_{f}}_{t_{0}}\left(x^{T}Qx+u^{T}Ru\right)dt$$
Your cost functional is:
$$J =\frac{1}{2}\int_{0}^{1}{(x^2+u^2)dt}$$
Then you have two possibilities: $F(t_{f})=0$ or $x(t_{f})=0$... This depends on your boundary conditions and systems characteristics.
This is important because another boundary condition is this: $P(t_{f})=F(t_{f})$
We also can state that $Q=0.5$ and $R=0.5$.
So we can follow up to build up the Algebraic Riccati Equation for this system:
$$2P(t)-2P^{2}(t)+2=-\dot{P(t)}$$
I believe you will also need to find your co-state $\lambda$...
I know it is not exactly a complete answer to your question, but I believe you can follow up from here.