I am trying to work through a proof of a smoothing spline approach in Hilbert Space. The approach is named Lorimier's Theorem.

Under the section titledproofI see the following steps:

$\displaystyle \int_{0}^{T_i}g(u)du = T_ig(T_i)-\int_{0}^{T_i}ug'(u)du$

$\displaystyle = T_ig(0)+T_i\int_{0}^{T_i}g'(u)du-\int_{0}^{T_i}ug'(u)du$

$\displaystyle = T_ig(0)+\int_{0}^{T_*}(T_i-u)^+g'(u)du=<h_i,g>_H$

I do not understand the mathematics between step 2 and 3.

Here is my derivation so far:

Begin with $\displaystyle \int_{0}^{T_i}g(u)du $

Integrate by parts $\displaystyle (\int_{}^{}x dy = xy-\int y dx) $ by setting $\displaystyle x=g(u)$, $\displaystyle dx=g'(u)du$, $\displaystyle y=u$ and $\displaystyle dy=du$:

$\displaystyle \int_{0}^{T_i}g(u)du = [ug(w)]_0^{T_i}-\int_{0}^{T_i}ug'(u)du = T_ig(T_i)-\int_{0}^{T_i}ug'(u)du$

Recognize that $\displaystyle T_ig(T_i)=T_ig(0)+T_ig(T_i)-T_ig(0)=T_ig(0)+T_i\int_{0}^{T_i}g'(u)du$ and substitute into the previous equation:

$\displaystyle \int_{0}^{T_i}g(u)du = T_ig(0)+T_i\int_{0}^{T_i}g'(u)du-\int_{0}^{T_i}ug'(u)du$

What do I do next to arrive at step 3 and how is it that the author automatically recognizes that the result is equal to the inner product of $\displaystyle h_i$ and $\displaystyle g$?