Gain is set for each \$ V_{in} \$.
\$ A_{Vin1} = -\dfrac{R_3}{R_1}\$.
\$ A_{Vin2} = -\dfrac{R_3}{R_2}\$.
and so on, \$ A_{Vin N} = -\dfrac{R_3}{R_N}\$.
If you were to analyze this circuit using superposition, you would find that for each input signal, it is just an inverting amplifier. The signals are amplified or attenuated individually. Therefore, gain is only a meaningful quantity with respect to each individual signal. Since gains are all independent of each other, summing them does not yield a meaningful result.
Because you want to control the amplification of a signal that is DC (maybe below 100Hz is my guesstimate), "conventional" devices such as JFETs are probably going to be fairly poor in DC performance. This would also apply to analogue multipliers such as the AD534 because temperature changes do affect analogue multipliers.
A better solution is to control an analogue switch from a square wave whose mark-space ratio represents the analogue control voltage. Your input feeds the switch and the output from the switch is your output.
If the square wave (say 10kHz) alternates between 0V (50% of the time) and 5V (50% of the time) and this switched the input signal (Vin) "on" and "off" via an analogue switch, the average output would be 50% of Vin. If the on/off ratio were altered to say 20% on (5V) and 80% off (0V), the average output would be 20% of Vin. Why do it this way?
It's quite easy to get a very accurate and reliable on/off duty-cycle using either analogue electronics or digital electronics and using this to "chop" the input to control its amplitude is a guaranteed way of overcoming the JFET/Multiplier problems associated with DC and temperature drift.
The output of the analogue switch would of course be "chopped-up" but the average value could entirely represent the transfer function you need. In addition, you can use standard filter techniques to recover the chopped signal back to a steady dc version.
You probably noticed that I mentioned the input being limited to 100Hz, and that I mentioned a chopping frequency of 10kHz - I did this purposely because this allows for a simple filter arrangement to recover the chopped output back to a smooth dc level.
Here's a simulation of a switching circuit: -
The output waveform (BLUE) is half a cycle of an input sinewave (100Hz) chopped by 10kHz 50:50 duty-cycle The chopping is done by the analogue switches S1 and S2. These are, of course, common-place devices. The red trace is the blue trace having undergone filtering by the op-amp circuit.
Because the duty-cycle of the square wave controlling the switches is 50:50, the output signal is halved in value. If the duty cycle were 1:99 (on for 1% of the time) then the output would be one-hundredth of the input.
This is how I'd tackle the problem BUT you could always use a cheap MCU and feed both inputs into its ADC and get the MCU to calculate the output value and have this fed to a DAC.
Best Answer
The key to this solution is to use the Vref input of a suitable A/D converter in order to scale the input voltage. This is not an all analog solution; but unless your frequency, resolution and/or latency requirements are too restrictive ...
1) Use a differential amplifier to take the difference between Vref+ and Vref-. This will be the Vref input to an A/D converter with a suitable reference voltage range (possibly ADS7816 for example). The differential amplifier will need to scale the output so that it falls within the allowable Vref max and min range of the A/D converter. The use of the Vref input sets the full-scale value for Vin taking care of the division in your transfer function (A/D output at full-scale when Vin = Vref+, and at 0 when Vin = Vref-). Note that you may not find an A/D converter that allows a Vref input all the way down to zero, but the ADS7816 is specified clear down to 100mV (Vref range 100mV to 5V).
2) Use a differential amplifier to take the difference between Vin and Vref-. Scale this the same as the differential amplifier in step 1. The output of this amplifier is the voltage input to your A/D converter.
3) All that is left then is to take the output of the A/D converter, convert it back to analog with a D/A converter, and apply necessary offset and gain with an op-amp to achieve a 1-5V range (calibration pots may be useful). A micro-controller would simplify the interface between the two converters, but it really doesn't need to do anything but time the conversions and transfer the data.
One of the main advantages to this solution over reading Vref+, Vref- and Vin separately into an A/D converter is that this method utilizes the full range of the A/D converter (assuming same resolution in D/A converter) for the output regardless of how close Vref+ is to Vref- (within the Vref min limits mentioned above). In other words, the number of steps (resolution) for Vout as it ranges from 1 to 5 volts will be the full range of the converters. If separate conversions are used for Vref+, Vref- and Vin; the number of steps available for Vout will be limited to the number of steps between the A/D conversions of Vref+ and Vref-.
Since there is only one conversion per sample with this solution, you will not need to worry about sampling and holding all three inputs at the same time, or what errors may result if they are sampled at separate times.
Another advantage of this method is speed. Since the microcontroller does nothing but time the conversions and transfer the data, the main limiting factor is the speed of the converters. For other solutions, if the microcontroller needs to do math (especially division), that time would need to be considered.
A useful app note on using Vref for scaling: VOLTAGE REFERENCE SCALING TECHNIQUES
Analog Devices has a useful tool for designing and testing differential amplifiers HERE.
For greater accuracy and stability, you might consider using instrumentation amplifiers for your differential amplifiers.