Now I have an equation to solve:
exp(x * a)-exp(x * b) = c, where a,b and c are known constants.
I tried sympy and scipy.optimize.fsolve, even brenth and newton. Nothing good. I 'm new to python, like 2 weeks. So pls help me out of this. Thanks!
Now I have an equation to solve:
exp(x * a)-exp(x * b) = c, where a,b and c are known constants.
I tried sympy and scipy.optimize.fsolve, even brenth and newton. Nothing good. I 'm new to python, like 2 weeks. So pls help me out of this. Thanks!
It's still unclear what you really want. Symbolic- vs. Numerical-optimization and exact solution vs. least-squares solution.
Ignoring this and just presenting the least-squares approach:
Output:
Alternative example:
Output:
That's just a demo in regards to scipy.optimize. This might not be what you want after all.