# Voltage subtractor with two AC sources?

I can't figure out how to do a differential amplifier with AC sources. I've built the generic DC one that I was taught in school (see attached image) but it's giving me weird values. For example, it's producing a positive voltage even when the negative terminal has a greater voltage.

My signals are primarily 10 to 22kHz. I would really like to do this with one op amp. Transistors are okay, but I'm trying to minimize the amount of connections that I would need to solder to a PCB.

The op amp is powered by a DC source (single supply, 5V).

Technically, these AC sources are oscillating DC voltages with a voltage offset originating from a headphone jack. What I mean is, the voltage oscillates from 0 to 1 volt. The changing frequency drives a coil next to a magnet inside a headphone. I would like to amplify the difference in sound coming out of the headphones (left minus right) and feed it into a circuit. It's on the order of 100 mW total power. I don't know whether this makes them technically AC or DC, but I'm assuming that this is what's causing the issues with the op-amp.

With a single supply you will need an offset DC voltage on the $+V_2$ input to prevent $V_{out} < 0~V$.

You can do this by adding a $2.5~V$ voltage divider to the $+$ input. You can replace the single resistor to ground with two resistors, of two times the value, one to $+5~V$ and one to ground.