-1

I try to use Sympy in order to modify an expression. Here is my problem.

I have a first function from theoratical calculation : g = f(Km, bm, Kx, bx, V)

I am able to measure two parameters A and B (function of the same parameters) associated with G and F (known constant).

A = f(Km, bm, Kx, bx, V, G, F) B = f(Km, bm, Kx, bx, V, G, F)

I would like to express g as a function of A and B. I have to specify that I am not sure that this is fully possible.

I tried sympy but cannot find the way. I am not sure this is the good tool.

Thanks for your help, Clément

ClementB
  • 7
  • 1
  • The question is quite broad. The functional linkage that is being asked depends on what the form of g, A, F actually are, and cannot be answered unless more detail on those dependencies is shared. Sympy can help with the relevant symbolic calculations, but the relevant symbolic form needs to be expressed first. – juandesant Jan 13 '22 at 17:18

1 Answers1

0

Thank you for your answer. The form of equations are below. The parameter that change is V. To clarify the context, I do experiment that permit to calculate A and B directly without modify V. I try to get a mathematical expression of g from A and B without success and wonder if there is a way to do it with Python. At least to check if I am not good enough at math ;)


import sympy as sp
from IPython.display import *
sp.init_printing(use_latex=True)

V, Km, bm, Kx, bx, G, F, g, Rtm, Rtx = sp.symbols('V, Km, bm, Kx, bx, G, F, g, Rtm, Rtx')

Rtm = 1/((1-g)*Km*bm*sp.exp(bm*V))
Rtx = 1/((g)*Kx*bx*sp.exp(bx*V))

A = (Kx*sp.exp(bx*V)-Km*sp.exp(bm*V))/(G*F)*(1/Rtm-1/Rtx)
B = (Kx*sp.exp(bx*V)+Km*sp.exp(bm*V))/(G*F)
g = (Km*sp.exp(bm*V))/((Kx*sp.exp(bx*V)+Km*sp.exp(bm*V)))
ClementB
  • 7
  • 1