2021-11-19 13:17:26 +0200 | received badge | ● Notable Question (source) |
2021-11-19 13:17:26 +0200 | received badge | ● Popular Question (source) |
2021-01-06 16:03:01 +0200 | received badge | ● Nice Question (source) |
2021-01-06 15:25:48 +0200 | commented answer | Flatten relations OK, I think I figured it out myself. For reference, the solution to my problem is the following: |
2021-01-06 14:50:26 +0200 | commented answer | Flatten relations Thank you both! The suggestion of tmonteil works perfectly for solving the equations symbolically. Unfortunately, I have too many relations to solve symbolically and so I must solve them numerically. I would like error bounds and so I would like to use RBF. To be more concrete, imagine that I set B = [RBF(pi), 2 * A_0, A_0 + A_1^2, A_1 * A_2] How would I then solve the same problem? I would like all the solutions to be of type RBF with error bounds. Of course I could solve all the symbolic equations first and then substitute in the RBF value at the end. This however would be extremely computationally intensive and so I want to substitute iteratively. I am sorry I should have phrased the original problem this way. Thank you Sebastien for the additional suggestion |
2021-01-06 14:06:11 +0200 | received badge | ● Supporter (source) |
2021-01-06 06:55:53 +0200 | received badge | ● Student (source) |
2021-01-06 06:35:17 +0200 | asked a question | Flatten relations I have a program in which I have created a list of variables A = list(var('A_%d' % i) for i in (0..N)) and a list of expressions B involving the variables such that the i th expression involves A0, ... , Aj where j=i-1. The idea is the the B[i] should give you the formula for Ai. I now want to flatten all the relations by substituting in a number B[0] for A0, and then using B[i] to substitute inductively. E.g. Suppose B = [1, 2 A0, A0 + A1^2, A1 * A2, .....] Then I want this to represent A0 = 1, A1 = 2 A0, A2 = A0 + A1^2, A3 = A1 * A2, ..... and I want to produce the list obtained by solving these relations, i.e. 1, 2, 5, 5, ...... How should I go about this? Keep in mind that number of variables, N, will be quite large. To be a little more precise, I would actually like to obtain a list of arbitrary precision real balls, i.e. I want to solve the relations numerically with error bounds. |