Ask Your Question

samric's profile - activity

2021-07-23 11:19:28 +0200 received badge  Popular Question (source)
2015-01-08 22:32:13 +0200 commented answer Solving simultaneous equations

Thanks for the help. Now let's suppose I had i equations (i > 2) and I wanted to get the numerical solutions for their i variables, would it be possible to do it without having to substitute those variable individually into the i equations?

To put it another way, is there a quick and easy way to get sage to resolve numerically a set of equation the way Mathcad would do it, i.e. :

Given
  <set of equation>
  ....
Find(<variable numerical values>)
2015-01-08 21:23:12 +0200 asked a question 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)
solve([eq1,eq2],id,vd)

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.