The author studies the nonlinear problem $\tau u_{tt}+au_t-bu_xx=f(x,t,u(x,t))$ on $0< x < 1, 0 < t \leq 1$, with homogeneous initial conditions $u(x, 0) = 0$ and $u_t(x,0)=0$ on $0\leq x \leq 1$, and homogeneous boundary conditions $u_x(0,t)=0$ and $\int_0^1u(x,t)\,dx=0$ on $0 < t \leq 1$. The exact and approximate solutions of the above problem is given in the reproducing kernel space. The advantages of this method are as follows. First, the conditions for determining the solution can be imposed on the reproducing kernel space, and therefore, the reproducing kernel satisfying the conditions for determining the solution can be calculated. The kernel is used to solve problems. Second, the iterative sequence $u_n(x, t)$ converges to the exact solution $u(x, t)$. Moreover, the partial derivatives $u_n(x, t)$ are also shown to converge to the partial derivatives of u(x, t). Results obtained by the method are compared with the exact solution of each example and are found to be in good agreement with each other.