An Op amp circuit to implement quadratic function
Have a look at the Analog Devices AD633 datasheet. It's an old product and has probably been surpassed multiple times but the datasheet gives some very good circuit examples.



Figure 1. The AD633 Low Cost Analog Multiplier can be used for multiplication, squaring, division and square root.

One multiplier would be required for your \$ aX^2 \$ term and another for your \$ -bX \$ term. A summer would then be required to finish the job.

Op amp version



Figure 2. For op-amp based multiplication you need to get the log of each input, sum them and get the inverse-log. This circuit uses the logarithmic characteristics of the diode VI curve. The sign and range of the output voltage will be limited to the diode forward voltage drop. Source: Wikimedia.

In Figure 2 \$ V_b = log^{-1}(log(V_1) + log(V_2)) \$ - ignoring gain, etc.

Further information on the basic building blocks can be found at Wikipedia's Operational amplifier applications - Logarithmic output and Exponential output.



Responding to OP's comment on OP:


  A(V2-V1) where A is a constant that can be changed thus setting V1 to zero gives AV2. Feeding this into another opamp (with the same A) and V1 to add them together gives an output of the form (A)*(AV2-V1). So it does the quadratic in A.


The result of \$ A (AV_2 - V1) = A^2 V_2 - AV_1 \$. This is not the same as \$ A V_1^2 - A V_1 \$ where \$ V_1 = X \$ in your original equation (which is what you asked for). You have failed to multiply variables by variables. You have multiplied variables by constants.