Rewriting a symbolic expression as a linear combination of others

I'm trying to solve something that might not be too hard (mathematically), but I'm a bit lost and want to do it with SymPy. I

Two variables are listed here X

, Y

(they are symbolic, I do not have access to any of the values) and known constants a

, b

..., g

. In a piece of existing software that I cannot change, from these

X' = a * X + b
Y' = c * Y + d
Z' = e * X * Y + f

      

... In other other existing software which I cannot change, I have different values, similar calculation is done. I'm simplifying it a lot for the purposes of this question, but to get the idea:

X' and Y' like above
Z_ = (a * x + b) * ( c * y + d) - g

      

To connect between Z'

, and Z_

I want to express z_ as a linear combination of X'

, Y'

, Z'

and 1:

Z_ == 𝛂 * X' + 𝛃 * Y' + 𝛄 * Z' + 𝛅.

      

How can I solve it for 𝛂

, 𝛃

, 𝛄

, 𝛅

using Sympy?

I know that I could have probably avoided SymPy, expressing each of the variables X'

, Y'

, Z'

, Z_

linear combinations X

, Y

, X*Y

and 1, and making matrix algebra. But since my problem is actually more complex and the details may change in the future, I would really appreciate some software help.

+3
sympy symbolic-math


source to share


No one has answered this question yet

Check out similar questions:

8
sympy: Transpose object has no list attribute
7
Setting Assumptions for Variables in Sympy Relative to Other Variables
3
How to speed up slow matrix multiplication in SymPy?
2
Sympy nsolve for the simultaneous equation of chemical equilibria
1
computer algebra is soft to minimize the number of operations in the set of polynomials
1
Existing tools for simple mathematical expression of equivalence Logic
1
Simplifying trigonometric representations of spin-weighted spherical harmonics with SymPy
1
Eliminate and Express Sympy Solver
0
Finding the answer to a singular matrix equation if it exists in SymPy
0
How do I print the contents of variables inside a math expression using Latex and Sympy in Matplotlib?



All Articles
Loading...
X
Show
Funny
Dev
Pics