Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
Score of 0
1 answer
110 views

README I have written a Jupyter Notebook to check if an identity is true: for example $\tan{x}=\frac{\sin{x}}{\cos{x}}$ (which is converted to Eq(sin(x)**2, (1 - cos(x))/2)) returns True whilst for ...
Advice
1 vote
2 replies
86 views

I have written a Jupyter Notebook (Q29175.ipynb) with the following contents: $\frac{d}{d x}\cos^{3}{x}=-3\cdot (\cos^{2}{x})\cdot(\sin{x})$ import json from sympy import * from latex2sympy2_extended ...
Score of 3
0 answers
222 views

(If it rings a bell but not really necessary to understand my question: I'm trying to look at high order dispersion in a medium using Sellmeier equations for the refractive index.) I have two ...
Score of 2
2 answers
107 views

I have this little piece of Sympy code import sympy as s L1, L2, x = s.symbols('L1, L2, x', real=True, positive=True) P, q = s.symbols('P, q') m, kN = s.symbols('m, kN', real=True, positive=True) E, J ...
Score of 1
1 answer
106 views

I want to work around sympy's limitation of assuming partially commutative behavior. If I define the non-commutative symbols import sympy as sy u = sy.Symbol('u',commutative=False) v = sy.Symbol('v',...
Advice
1 vote
2 replies
67 views

Suppose I define sympy.Symbols as follows import sympy as sy A = sy.Symbol('A',commutative=False) B = sy.Symbol('B',commutative=False) and combine them as sy.simplify(AB-BA) sympy correctly does not ...
Score of 3
1 answer
179 views

How do I persuade SymPy to evaluate an infinite sum which converges and I know SymPy should be able to do? For example, the following just gives back the unevaluated infinite sum: a = Symbol('a',real=...
Score of 3
1 answer
67 views

I would like to generate random polynomial ith coefficient in GF(2), but I fail to do so, random_poly returns a polynomial with coef in ZZ. Here below is the python sequence (with ipython3) In [23]: p=...
Score of 2
2 answers
231 views

So I know from physics that position at a given time can be calculated using its derivatives like this: Now I know this looks awfully similar to Taylor series: In fact they are exactly the same. ...
Score of 8
2 answers
213 views

When I add another expression to Unevaluated(), then try to print it, the unevaluated output is surrounded by (). The problem comes when the first coefficient in the resulting expression to be ...
Score of 4
1 answer
74 views

I have a question about the way .equals() interacts with .parse_latex(): pef = parse_latex("\sin(\pi/2)") print(pef.equals(1)) > False print(sin(pi/2).equals(1)) > True I've tried ...
Score of 1
2 answers
123 views

Sympy has (at least?) three types of infinity (infinity, negative infinity, and complex infinity). I have come across the problem of testing if a sympy expression is infinite and my program failed ...
Score of 2
1 answer
113 views

I'm trying to make a simple program that compares two Latex inputs and checks whether it's the same regarding math and notation. First, I wanted to check which mathematic expressions work without any ...
Score of 1
1 answer
58 views

I'm currently working on a project which needs to convert Latex strings into SymPy code. I am very new to SymPy. I've encountered a problem which I can't find the answer for myself: from sympy.parsing....
Best practices
0 votes
2 replies
79 views

I have a linear equation like this: ((x + b) * a) / (c * d) + ((x - b) * e) / (f * g) = 0 I want to solve it in Python step by step, showing all intermediate steps like in a school notebook. I know I ...

15 30 50 per page
1
2 3 4 5
403