Solving Nonlinear Wave Equations by Elliptic Equation