symbolic-math Questions
1
Say I have the following expression which I would like to integrate over the variable z from 0 to L.
import sympy as sp
mdot, D, R, alpha, beta, xi, mu0, q, cp, Tin, L = sp.symbols("\dot{m}, D, R...
Brunell asked 14/12, 2019 at 22:52
2
Solved
What is the most appropriate way to express the following in SymPy:
A sum over samples 'x[i]' with 'i' going from concrete
0 to symbolic 'N'. 'x[i]' itself shall be symbolic, i.e.
always appear as ...
Evanesce asked 29/9, 2017 at 15:54
4
Solved
I use Mathematica for symbolic math calculations. I am planning to switch to another language. Matlab (which I use for standard computation stuff) includes this feature but I am looking at the poss...
Radon asked 1/7, 2015 at 8:3
5
Solved
According to wiki:
In mathematics and computer science, computer algebra, also called
symbolic computation or algebraic computation is a scientific area
that refers to the study and developmen...
Osmosis asked 6/5, 2013 at 9:25
1
I have a problem with sympy where it won't update my values. So I'm trying to do an iterative method for solving $\sigma_x$ and when I try to put numerical values into my expression it won't update...
Yahairayahata asked 23/3, 2022 at 13:9
2
I want to use a Int vector as an array index.
python.
array = [12,45,66,34]
s= Solver()
x = Int('x')
s.add(array[x] == 66)
so the x should be 2..
how can i do it?
Schopenhauerism asked 25/3, 2018 at 9:21
2
In sympy, I want to create a constant e.g. to represent the speed of light.
Thus I initialize c with the keyword constant=True.
Later I want to check, if a symbol is a constant or a variable.
Unexp...
Lamasery asked 29/7, 2021 at 18:25
3
Solved
When I type
import sympy as sp
x = sp.Symbol('x')
sp.simplify(sp.log(sp.exp(x)))
I obtain
log(e^x)
Instead of x. I know that "there are no guarantees" on this function.
Question. Is there ...
Separates asked 9/9, 2017 at 9:39
1
Related to a previous question: I am using Julia Symbolics package and would like to represent 5*pi symbolically. I tried the following to no avail:
using Symbolics
5 * Symbolics.pi # expanded to 1...
Boutin asked 18/4, 2021 at 18:58
3
Solved
I am looking for a way to represent a symbolic expression such as sqrt(3)*x so as to avoid sqrt(3) being calculated upfront.
Sample code:
using Symbolics
@variables x
y = sqrt(3)*x
Showing y, we c...
Contingent asked 17/4, 2021 at 18:56
2
I am trying to write a program that simplifies mathematical expressions.
I have already written a parser that converts a string to a binary tree.
For example (1+2)*x will become
*
/ \
+ x
/ \
1...
Affectional asked 19/2, 2021 at 16:2
3
I am new to the subject "modeling of physical systems". I read some basic literature and did some tutorials in Modelica and Simulink/Simscape. I wanted to ask you, if I understand the following con...
Wonderment asked 20/5, 2016 at 19:14
2
Solved
I have a 4x4 matrix A with rather long but simple symbolic expressions in each of its entries. About 30 different symbols are involved. By "simple" I mean that these symbols are combined using only...
Chaoan asked 4/5, 2016 at 11:48
2
Solved
I have a multivariate polynomial (which in the general case many many variables) whose coefficients list some data that I need to read off, but it doesn't seem like sympy gives a good way to do thi...
Vacuum asked 24/4, 2016 at 0:38
3
Solved
I just cannot seem to understand the difference. For me it looks like both just go through an expression and apply the chain rule.. What am I missing?
Nardi asked 17/4, 2017 at 16:24
2
In the program below, SymPy does not seem to understand that the integrand is the derivative of a product. Is there a way to make it return u*v?
import sympy
x = sympy.symbols('x', real=True)
u = ...
Skew asked 29/6, 2018 at 9:47
3
Solved
I'm doing a very simple probability calculations of getting subset of X, Y, Z from set of A-Z (with corresponding probabilities x, y, z).
And because of very heavy formulas, in order to handle the...
Tears asked 2/3, 2013 at 23:7
2
Solved
I'm using sympy v1.0 in a Jupyter Notebook. I'm having trouble getting expression to simplify how I'd like. Here's a toy example; it does the same thing my more complicated expressions do...
impor...
Bonar asked 22/4, 2016 at 16:13
2
In SymPy, I am trying to perform a matrix multiplication and expand it afterwards. However, SymPy does not seem to support the expansion of matrix expressions. For example, here is the 4th order Ru...
Prater asked 5/1, 2016 at 16:10
1
Consider the following example
import sympy as sy
n = sy.symbols('n')
A = sy.MatrixSymbol("A",n,n)
B = sy.MatrixSymbol("B",n,n)
C = sy.MatrixSymbol("C",n,n)
M = A.inverse()*B.inverse() - A.inverse...
Elyn asked 21/8, 2018 at 6:57
2
Solved
Suppose I have a column vector of formulae like this
N =
4*k2 + 5*k3 + k1*x
7*k2 + 8*k3 + k1*y
and a column vector of symbolic variables like this
k =
k1
k2
k3
The formulae are linear ...
Monet asked 17/12, 2018 at 17:38
2
Solved
As much as this may sound like a simple task, I have not encountered a way to do it though the documentation.
After running an arbitrary routine (such as one of these examples, I get something lik...
Orelle asked 23/1, 2018 at 14:37
1
Solved
I would like to obtain a symbolic expression which is the derivative of atan2(y,x), where y and x are some expressions with a variable z. Can I safely assume that diff(atan2(y,x),z) gives me what I...
Reagent asked 5/9, 2018 at 2:48
1
Solved
I am trying to integrate over a constant function in MATLAB 2017a, but I am stuck. First of all when I integrate using the following script, I get the right output. So the script works for a x0 whi...
Torsk asked 8/6, 2018 at 8:19
0
I know spio.loadmat does not properly load symbolic variables created in Matlab into Python. But, I am wondering if anyone here has ever tried to load such .mat files in Python using any sort of tr...
Roselani asked 7/6, 2018 at 22:28
1 Next >
© 2022 - 2024 — McMap. All rights reserved.