Solving a Symbolic system of equations SYMPY

97 Views Asked by At

I have the following equations I want to symbolically solve for a solution.

$$\lambda = \frac{C_{v,u} + \beta \Sigma_0}{\Sigma_0 \beta^2 + \sigma^2_u}$$

$$\mu = \frac{\sigma^2_u p_o - \alpha \beta \Sigma_0}{\Sigma_0 \beta^2 + \sigma^2_u}$$

$$\alpha = -\frac{\mu}{2\lambda}$$

$$\beta = \frac{1}{2\lambda}$$

I want to solve for $\lambda, \mu, \alpha, \beta$.

How do I set it up in SYMPY? Or any other symbolic computational system?

1

There are 1 best solutions below

1
On BEST ANSWER

A Human Algebra System is quite sufficient.

The first and fourth equations give

$$\sigma_0^2+\Sigma_0\beta^2=2\beta(C_{u,v}+\beta\Sigma_0)$$ which is quadratic in $\beta$.

Then

$$\alpha=-\frac\mu\lambda=-\frac{\sigma_u^2p_0-\alpha\beta\Sigma_0}{C_{u,v}+\beta\Sigma_0}$$

simplifies as

$$C_{u,v}\alpha=-\sigma_u^2p_0.$$