How do I take the larger of two analog signals?
Sketch of a solution : for it to work well, the devil's in the details...

A comparator decides which signal is larger.
Its output controls an analog switch, aka 2:1 multiplexer, connecting the selected signal (the larger one) to the output.







simulate this circuit &ndash; Schematic created using CircuitLab

You probably want a "make before break" switch (read the datasheets) so that at the moment of switching, the output is the average of the two input values. As they are by definition the same voltage at the moment of switching, this prevents glitches or spikes.

Note : depending on the actual devigce you use as a comparator, you may need a pullup resistor on its output (the MUX "select" line). Details of comparator, MUX control voltages etc aren't shown, they will depend on the actual devices selected.