So, I'm trying to solve this nonlinear system of equations and I am getting the error "cannot create mpf". Here's the sympy link . Anyone know how to solve thsi?
Asked
Active
Viewed 688 times
-1
-
Please comment/answer what I'm missing here/doing wrong before downvoting the question. – Eular Nov 29 '18 at 13:55
1 Answers
0
mpmath is made for doing numerical calculations and l
is a symbol, thus the error (you used an mpmath tanh
in your second attempt, but SymPy's tanh in the first example). You already have the solution for k from your first attempt. Solving for l
requires solving a 12th order polynomial in exp(1.401*l) which you won't be able to do symbolically in general.

smichr
- 16,948
- 2
- 27
- 34
-
But I want the solution of k,l in terms of p,q. That's not the solution I'm getting here. How do I do that? – Eular Nov 29 '18 at 13:50
-
The first solution isn't a solution at all, Its just the value of k you get from the first equation in terms of l, ignoring the 2nd equation. – Eular Nov 29 '18 at 13:53
-
I updated my response. You are right, the value of l is not actually given. – smichr Nov 29 '18 at 17:12