Resolution of equations

Hello,

I would like to manage to solve this kind of equations :
eq1 = sym.Eq(asym.exp(-b90),33)
eq2 = sym.Eq(asym.exp(-b92),66)

I first tried with one equation this and it worked:

import sympy as sym
from sympy import solveset, S
from sympy.abc import x
from sympy import Symbol

a = symbols('a')
eq=sym.Eq(sym.exp(a*90),33)
solveset(eq,a,domain=S.Reals)

Then I tried this but it didn’t work :

a,b = symbols('a,b')
eq1 = sym.Eq(a*sym.exp(-b*90),33)
eq2 = sym.Eq(a*sym.exp(-b*92),66)
result=sym.solveset([eq1,eq2],(a,b),domain=S.Reals)

I get this error :

import sympy as sym

from sympy import solveset, S

from sympy.abc import x

from sympy import Symbol

​

a,b = symbols('a,b')

eq1 = sym.Eq(a*sym.exp(-b*90),33)

eq2 = sym.Eq(a*sym.exp(-b*92),66)

result=sym.solveset([eq1,eq2],(a,b),domain=S.Reals)

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [59], in <cell line: 9>()
      7 eq1 = sym.Eq(a*sym.exp(-b*90),33)
      8 eq2 = sym.Eq(a*sym.exp(-b*92),66)
----> 9 result=sym.solveset([eq1,eq2],(a,b),domain=S.Reals)

File C:\ProgramData\Anaconda\lib\site-packages\sympy\solvers\solveset.py:2178, in solveset(f, symbol, domain)
   2175     return S.EmptySet
   2177 if not isinstance(f, (Expr, Relational, Number)):
-> 2178     raise ValueError("%s is not a valid SymPy expression" % f)
   2180 if not isinstance(symbol, (Expr, Relational)) and  symbol is not None:
   2181     raise ValueError("%s is not a valid SymPy symbol" % (symbol,))

ValueError: [Eq(a*exp(-90*b), 33), Eq(a*exp(-92*b), 66)] is not a valid SymPy expression


Does anyone have an idea of how I could proceed? Maybe solveset is not the adapted function?

Thanks for reading

This is a sympy rather than a python question. You might get a better response on stackoverflow.com.

Okay I will post there. Thank you !