The author offers a complete discussion and solution of the functional equation
which holds for all , where is a non-void open real interval. Here is considered as an unknown real function and are fixed real constants. The main results show that, except the trivial case , a function is a solution if and only if either is a constant (provided that ) or is the sum of a Jensen affine function (which is the sum of a constant and an additive function) and a quadratic function (provided that ), where the quadratic function satisfies a certain homogeneity condition depending on the constants. Thus the quadratic part of the solution can only be nontrivial if the constants satisfy a further nontrivial algebraic property.