Here is the circuit.
simulate this circuit – Schematic created using CircuitLab
What do I have to do when there are two different sources?
Find all the voltages in the resistors.
Supposing every current going out of the nodes, here are the equations:
NODE1) \$V1=-15\$
NODE2) \$V2/R2+(V2-V3)/R3-I1=0\$
NODE3) \$(V3-V1)/R1+(V3-V2)/R3-I2=0\$
- I don't know if the first equation is right, or if it has to be \$-15+(V1-V3)/R1+I1=0\$
- I don't know what am I supposed to do with the \$V1\$ in the NODE3 equation, using -15 instead of \$V1\$ or simply don't put it. (?)
Considering only the NODE2 and NODE3 equations: \$G*V=I\$ I have to find \$G^-1\$:
\$G^-1=1/detG*(G^a)^T\$
\$G^a\$ = matrix composed by algebraic complements, \$G^T\$ = transposed.
By doing that I find the wrong results.
I know there are many ways to resolve this problem, but I have to practice the node voltage method.
It may be that I made some algebra or numerical errors, I'm trying again in the meantime.