Electronic – What happens to batteries connected together with a resistor

physics

I have 2 batteries, one is 5V, the other is 1V. I connect the batteries positive to positive and negative to negative. Further more I add a resistor in between the positive and negative leads.

schematic

simulate this circuit – Schematic created using CircuitLab

Then what happens?

One thing would be current rushing from the 5V battery into the 1V one possibly destroying it but that's just a poor setup for the thing I'm interested in, what happens to the resistor? Does it get 5V? or 1V? Or both? Logic would suggest the resistor would get 4V but I tried it in a circuit simulator and it failed to analyze the situation and I can't make Google understand what I'm asking.

Best Answer

Assuming we are talking about the circuit below:

Described circuit with ideal batteries

...then the voltage across the resistor is indeterminate. If we assume the batteries are mathematically ideal voltage sources, then the circuit is like saying 5 = 1. It can't be solved because it's inconsistent to begin with.

Just because ideal batteries create a mathematical problem doesn't mean building the circuit with real batteries breaks any physics (but it will quickly break the batteries themselves, wire used to connect them, and/or the experimenter). Actual batteries and the wire used connect them have some a small but nonzero series resistance. If we model the internal resistances of the batteries then the circuit to analyze looks like this:

Batteries with internal resistance

For a typical battery, R1 and R2 will be under an ohm. The series resistance makes the circuit solvable.