Find expression of current in this circuit

You are given two batteries of emf values E1 and E2 and internal resistance r1 and r2 respectively. They are connected in series nad parllel as in the diagram. Find an expression for the current in R for the methodo f connection

Based on the direction of your arrows, your signs should be reversed on the first one. Other than that, it is correct.

In the second one, you still have three variables in two equations. You need to set up two loops (E1, r1, R; E2, r2, R). Keep in mind the direction of your arrows, again. This will give you two currents: i1 and i2. The current through R will equal i1 + i2.

what do you mena that in the first one i need to swtich the signs? Isn't the ir1 and ir2 values going to be negative??
for hte second one
[tex] -i_{1} r_{1} + E_{1} - iR = 0 [/tex]
[tex] -i_{2} r_{2} + E_{2} - iR = 0 [/tex]
[tex] i = i_{1} + i_{2} [/tex] is this correct?
Also can you have a look at a similar question on circuits and stuff in this https://www.physicsforums.com/showthread.php?t=98929
thank you for your help!

The current is going in the direction of the arrow and resistors are passive devices, meaning the voltage on the 'upcurrent' side is higher than the voltage on the 'downcurrent' side. When setting up a mesh current loop, it's best to use the first sign encountered as you go around the loop in the same direction as the arrow. You encounter the negative side of the power source first, hence it's negative. You encounter the positive side of the resistor first (the side with the higher voltage), hence the positive sign.

If your result for i is positive, then you chose the right direction for your current. If your result for i is negative, then it means the current is actually going the opposite direction of the arrow. Not a big deal for your simple circuits, but it comes in handy when you have to solve a circuit where you really can't tell what direction the current will flow just by looking at it.