Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solving simultaneous equations

I am new to Sagemath and I am trying to figure out how to solve two equations representing a circuit composed of a diode and a resistor. Here's what I entered into Sage :

id, vd = var('id vd')
eq1 = id == 10*10^(-12) * (e^(vd/0.039)-1)
eq2 = id == (10/500) - (vd/500)

However, this evaluates to :

[id == -1/500*vd + 1/50, id == 1/100000000000*e^(25.64102564102564*vd) -1/100000000000]

What I would like to get is the numerical values of both id and vd (respectively the current and voltage drop across the diode), i.e. approximately 18mA and 0,8V. This simple circuit was taken from "Electronic Devices and Circuit Theory' and was originally solved using Mathcad, but I can't figure out how to do this in Sagemath.

Thanks for the help.