symbolic-math

Symbolic math lib

I have a planned project that will need to manipulate symbolic expressions like: a * b = c^2 + sin(d) I'm wondering what libs are out there for this kind of thing. Two that I found a while ago are openaxiom and FriCAS. neither of these seem like a good fit. An ideal lib would be a light as possible. At a minimum it must be able to de...

Derivatives in C/C++?

I have some expressions such as x^2+y^2 that I'd like to use for some math calculations. On of the things I'd like to do is to take partial derivatives of the expressions. So if f(x,y) = x^2 + y^2 then the partial of f with respect to x would be 2x, the partial with respect to y would be 2y. I wrote a dinky function using a finite differ...

Symbolic Mathematics Python?

I am extreamly interested in math and programming and planning to start symbolic math project from scratch. Is this good project idea? Where to start? How should one approach this project? Any good resources? Thanks in advance. ...

Matlab symbolic toolbox: What's wrong with my code?

I'm trying to solve three simultaneous nonlinear equations in the unknowns x, y, z with Matlab's symbolic toolbox. What's wrong with the following code? solve( '(x/4 + y/2 + z/4)*(1/(8*x) + 1/(16*y) + 1/(8*z)) = 0.5774', ... '(x/4 + y/4 + z/2)*(1/(4*x) + 1/(16*y) + 1/(16*z)) = 0.5774', ... '(x/2 + y/4 + z/4)*(1/(8*x) + ...

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? ...

How to solve symbolic equation with double coefficients in matlab?

I have quadratic equation 1/x = 1/(a-x) + 1/(3*a -x) I want to solve it in matlab: solve('1/x=1/(a-x)+1/(3*a-x)', 'x') ans = (4/3+1/3*7^(1/2))*a (4/3-1/3*7^(1/2))*a Is there any way to solve equation with float coefficient? Like ans = 2.215250437021530*a 0.451416229645136*a ...

How can I hook into MATLAB to evaluate symbolic derivatives from C code?

How can I use MATLAB's Symbolic Toolkit to symbolically evaluate derivatives from C or C++? ...

units conversion in python

sympy is a great tool for doing units conversions in python: >>> from sympy.physics import units >>> 12. * units.inch / units.m 0.304800000000000 You can easily roll your own: >>> units.BTU = 1055.05585 * units.J >>> units.BTU 1055.05585*m**2*kg/s**2 However, I cannot implement this into my application unless I can convert degrees ...

Programming language for working with axioms.

edit: Prolog is the answer. ...

How to compute simplified Groebner basis in GAP script

I tried to use Buchberger's Algorithm(see also: http://en.wikipedia.org/wiki/Buchberger%27s%5FAlgorithm and http://www.geocities.com/famancin/buchberger.html) to compute a Groebner basis for an ideal in rational field, here is my GAP script: F := Rationals; R := PolynomialRing( F, [ "x", "y", "z" ]); x := IndeterminatesOfPolynomialRing(...

MATLAB: Why does solve return an empty sym object?

I´m trying to solve this set of equations in MATLAB and I get an empty sym object: equations = {'I2B+I2EQAB=I22B+I2EQBC',... 'I2A=I2EQAB+I2EQAC+I22A',... 'I2C+I2EQBC+I2EQAC=I22C',... 'I22B=IZB+IC1B',... 'IZB=IC2B+IZBB',... 'I22C=-I2C*Z2C*YC/2+IZC',... 'IZC=IC2...

Symbolic math: DOUBLE cannot convert the input expression into a double array

I want to solve an integration with Symbolic math toolbox. However it seems that there is a problem whith double and sym variables. I wrote this code: function [q] = Eq27(Lg,x,r) q = 0; for k = 0:floor(x) for l = 0:Lg-1 q =((-1^l)/(factorial(l)factorial(k)))nchoosek(Lg+k,k+l+1)((r(k-x))^(k+1))exp(-1r*(k-x)); end end q = ...

Looking for a good reference on calculating permutations

Hi, As a programmer, I frequently need to be able to know the how to calculate the number of permutations of a set, usually for estimation purposes. There are a lot of different ways specify the allowable combinations, depending on the problem at hand. For example, given the set of letters A,B,C,D Assuming a 4 digit result, how m...

How do I solve a determinant in MATLAB?

As a simple example, let's say you have this matrix: M = [omega 1; 2 omega]; and you need to solve for the values of omega that satisfy the condition det M = 0. How do you do this in MATLAB? It is surely something simple, but I haven't found the function yet. ...

computer algebra soft to minimize the number of operations in a set of polynomials

hello I have systems of polynomials, fairly simple polynomial expressions but rather long to optimize my hand. Expressions are grouped in sets, and in a given set there are common terms in several variables. I would like to know if there is a computer algebra system, such as Mathematica, Matlab, or sympy, which can optimize multiple p...

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); %# The main expression If I want to use f in a special program to find its zeroes, how c...

Symbolic Math in MATLAB, solving simple integration

I have a problem with solving a simple integration through MATLAB. I want to solve this symbolic and don't have any problems doing this through other programs. Well I have this equation: syms k x fX(x) = k * e^(-3*x) for 2 <= x <= 6 which I want to integrate from the interval 2 to 6. Then I would solve the equation, so that fX(x) = 1...

Is there something like Sympy for Java?

I'm looking for a symbolic math library for Java along the lines of sympy for Python. Does anyone know of anything? Thanks! ...

Using JavaCC to infer semantics from a Composite tree

Hi all, I am programming (in Java) a very limited symbolic calculus library that manages polynomials, exponentials and expolinomials (sums of elements like "x^n * e^(c x)"). I want the library to be extensible in the sense of new analytic forms (trigonometric, etc.) or new kinds of operations (logarithm, domain transformations, etc.), s...

difference equations in MATLAB - why the need to switch signs?

Perhaps this is more of a math question than a MATLAB one, not really sure. I'm using MATLAB to compute an economic model - the New Hybrid ISLM model - and there's a confusing step where the author switches the sign of the solution. First, the author declares symbolic variables and sets up a system of difference equations. Note that the...