1

I need to solve dynamically created system of equations with scipy.optimize.root.

What is a proper way to create such a function in linear and non-linear cases:

  1. Example of linear system to generate:

Example of linear system to generate

  1. Example of non-linear system to generate:

Example of non-linear system to generate

s.ouchene
  • 1,682
  • 13
  • 31
  • What have you tried so far? Where are you stuck? – Nico Haase Jan 14 '20 at 08:14
  • I find the solution to linear case: the generalisation is build by np.dot like in [this example](https://stackoverflow.com/questions/42059584/optimize-root-with-a-matrix-equation). Now I'am stuck at how to build non-linear case. – Dmitry Bogdanov Jan 14 '20 at 08:42
  • The function should be well written Python. It has to conform to `root's` expectations, and should be fairly efficient, since it will be called many times. Beware of trying to be too 'dynamic' since that could end up slowing things down - if the function has to be constructed from some parameters or abstract specification each time it's called. – hpaulj Jan 14 '20 at 17:23
  • Your question is way too general. How do you expect to specify the function to start with? Arrays of numbers, symbolic expression, string? Just how general? And what do you expect to end up with? – hpaulj Jan 14 '20 at 17:25

0 Answers0