0

I know that for: a+ bx1+ cx2=0, a+ 2bx1+ cx2=8 I can solve the equation using linalg:

g = np.array([[a,b], [a,2b]])
w = np.array([0,8])
solution = np.linalg.solve(g, w)

But how can I solve the following equations using np: a+ bx1+ cx2 + dx1^2+ 3ex2^2=0, a+ 2bx1+ 2cx2 + dx1^2+ ex2^2=8

  • 2
    Does this answer your question? [How to solve a pair of nonlinear equations using Python?](https://stackoverflow.com/questions/8739227/how-to-solve-a-pair-of-nonlinear-equations-using-python) – fdermishin Nov 24 '20 at 17:38
  • 1
    The second equation is non-linear and can't be solved by `np.linalg.solve` – fdermishin Nov 24 '20 at 17:39
  • thanks for the comments. I really wanna do it with numpy. is there still a way to solve it through numpy? its critical for me because I want to store these values in arrays and do vector manipulations on them through numpy – Jhonathan Mizrahi Nov 24 '20 at 20:20

0 Answers0