Let c be a linear functional defined by its moments c(x i ) = c i for i = 0, 1, . . .. We proved that the nonlinear functional equations P(t) = c(P(x)P(αx + t)) and P(t) = c(P(x)P(xt)) admit polynomial solutions which are the polynomials belonging to the family of formal orthogonal polynomials with respect to a linear functional related to c. This equation relates the polynomials of the family with those of the scaled and shifted family. Other types of nonlinear functional equations whose solutions are formal orthogonal polynomials are also presented. Applications to Legendre and Chebyshev polynomials are given. Then, orthogonality with respect to a definite inner product is studied. When c is an integral functional with respect to a weight function, the preceding functional equations are nonlinear integral equations, and these results lead to new characterizations of orthogonal polynomials on the real line, on the unit circle, and, more generally, on an algebraic curve.