Python sympy: changing the arguments when substituting a function
After a page of sympy manipulations I get and expression involving LambertW, but the answer given is for the zeroth branch cut. I can tell that I wanted the -1 branch. So, I’d like to change every occurrence of LambertW(y)
into LambertW(y, -1).real
, where y is an arbitrary sympy expression (that is different in each instance), in a set of expressions that are large enough so that doing it by hand is error prone.
Solve a transcendental equation with sympy
I have trouble to solve the following simple equation with sympy.
Sympy seems to take way too lot of time.
Differential algebraic equations with nested Piecewise seems not solvable for sympy.solve()?
currently I am trying to use sympy to help me derive differential algebra equations from OpenModelica(a physical simulation tool). A similar example can refer to pymoca. The physical model is not the point so it can be ignored.
Symbolic center of mass of the solution of linear inequalities
Given m linear equations over n + m variables {v1, …, vn, c1, …, cm}, how can I find the center of mass (CoM) of the part of n-dimensional hyperspace defined by vi >=0 and the equations? The CoM in general will be an expression with the cj variables still free.
sympy nonlinsolve returns EmptySet
I’m wondering why nonlinsolve
doesn’t report the known value of a
when that is the only variable I request a solution to:
Sympy: Assume symbolic factor is not zero during solve
I’m want to solve an Equation “f(x) > y” for “x”:
Equation
Differential equations which cannot be solved by substituion in Sympy
These 2 differential equations taken from the book Advanced Mathematics by Mr. Spiegel, cannot be solved by Sympy. I have checked the socumentation of Sympy solving ODEs a lot. They can be solved by substituing y’= p and then sperating variables in p and y:
SymPy pauli algebra should simplify terms if labels are in a different order?
The evaluate_pauli_product
function in the Pauli Algebra module doesn’t simplify by combining terms which have the the same “label” values specified in a different order. If I’m understanding correctly that Pauli symbols with different labels effectively describe tensor products, does it make sense for the simplification to be made?
Codegen SymPy matrix
I have the following code where Aij and Bij are matrix of Sympy expressions :
My implementation for reproducing a paper
I’m trying to reproduce this paper. I’ve basically done everything and I’ve obtained the final expression of page 3. My only problem is that my implementation gets slow for larger numbers really fast.