Questions tagged [symbolic-math]

Symbolic math tools allows for analytically process mathematical expressions - without the necessity of assigning specific numeric values to variables.

Common software that allows for symbolic math operations include

See this comparison of computer algebra systems (CAS) for other software packages that support symbolic math operations.

Online examples of Computer Algebra System

1493 questions
7
votes
2 answers

Symbolic Mathematics for .NET

I am looking for symbolic mathematics library for .NET framework. I have looked at Math.net but it's not something usable yet. Do you know if there is another library exists?
John Lamber
  • 281
  • 4
  • 9
7
votes
2 answers

How can I factor specific variables out of a formula in Matlab?

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 with respect to k. I'd like to find a matrix M such…
Theodore Norvell
  • 15,366
  • 6
  • 31
  • 45
7
votes
2 answers

Can SymPy recognize the derivative of a product?

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 = sympy.Function('u') v =…
Rastapopoulos
  • 487
  • 2
  • 18
7
votes
2 answers

How to export the output of gplearn as a sympy expression or some other readable format?

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 like >>> print(est_gp) sqrt(div(add(1.000,…
7
votes
1 answer

Computation of symbolic eigenvalues with sympy

I'm trying to compute eigenvalues of a symbolic complex matrix Mof size 3x3. In some cases, eigenvals() works perfectly. For example, the following code: import sympy as sp kx = sp.symbols('kx') x = 0. M = sp.Matrix([[0., 0., 0.], [0., 0., 0.],…
Azlof
  • 117
  • 1
  • 7
7
votes
3 answers

Consistent terminology: Modeling, DAE, ODE

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 content correctly: Symbolic manipulation is the…
AssMero
  • 239
  • 1
  • 5
7
votes
2 answers

Speeding up computation of symbolic determinant in SymPy

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 addition/subtraction, multiplication/division, and…
gspr
  • 11,144
  • 3
  • 41
  • 74
7
votes
2 answers

Machine learning in Clojure

We have theano and numpy in Python to do symbolic and numeric computations, optimising our Machine Learning computations (eg: Matrix multiplications and GPU usage). What are the relevant tools in Clojure to do Machine learning (or at least things…
fyquah95
  • 818
  • 6
  • 18
7
votes
4 answers

Is there general method to solve for a single unknown if the unknown variable changes?

I have a simple algebraic relationship that uses three variables. I can guarantee that I know two of the three and need to solve for the third, but I don't necessarily know which two of the variables I will know. I'm looking for a single method or…
topher
  • 328
  • 1
  • 8
7
votes
0 answers

why are matlab symbolic calculations so slow?

I was testing with the symbolic toolbox of Matlab. And wonder why it is so slow even when just calculating with symbolic numbers. To test it I wrote this syms x x = subs(x,1); a = 1; tic for i=1:10000 z_sym = x + 1; end toc tic for i=1:10000 …
solid
  • 377
  • 2
  • 10
7
votes
2 answers

Spyder SymPy Wont Print Symbolic Math

I setup Anaconda 2.0.0 (Win 64). It has SymPy 0.7.5. I configured Spyder (2.3.0rc that came with Anaconda) to use symbolic math: Tools > Preferences > iPython console > Advanced Settings > Symbolic Mathematics I create a new project and a new file:…
Matt M.
  • 812
  • 3
  • 16
  • 24
7
votes
2 answers

Interpreting error from computing Jordan form of 36-by-36 matrix

I've been trying to compute the jordan normal form of a 36-by-36 matrix composed of only three distinct entries, 1, 1/2, and 0. The matrix is a probability transition matrix so, given these entries, the matrix is obviously sparse. The issue I've…
7
votes
4 answers

How do I make a function from a symbolic expression in MATLAB?

How can I make a function from a symbolic expression? For example, I have the following: syms beta n1,n2,m,aa= Constants u = sqrt(n2-beta^2); w = sqrt(beta^2-n1); a = tan(u)/w+tanh(w)/u; b = tanh(u)/w; f = (a+b)*cos(aa*u+m*pi)+a-b*sin(aa*u+m*pi); …
Alireza
  • 211
  • 3
  • 10
  • 18
7
votes
2 answers

SymPy, simplification / substitution using known patterns or sub-expressions

I have the following expression: from sympy import pi, sin, cos, var, simplify var('j,u,v,w,vt,wt,a2,t,phi') u0 = v*a2*sin(pi*j/2 + pi*j*t*phi**(-1)/2) + pi*vt*a2*cos(pi*j/2 + pi*j*t*phi**(-1)/2)*j*phi**(-1)/2 + pi*w*a2*cos(pi*j/2 +…
7
votes
2 answers

Numerical Integration over a Matrix of Functions, SymPy and SciPy

From my SymPy output I have the matrix shown below, which I must integrate in 2D. Currently I am doing it element-wise as shown below. This method works but it gets too slow (for both sympy.mpmath.quad and scipy.integrate.dblquad) for my real case…
Saullo G. P. Castro
  • 56,802
  • 26
  • 179
  • 234