Questions tagged [symbolic-computation]

Symbolic computation or algebraic computation or computer algebra relates to algorithms and software for manipulating mathematical expressions and equations in symbolic form, as opposed to manipulating the approximations of specific numerical quantities represented by those symbols.

Symbolic computation or algebraic computation or computer algebra relates to algorithms and software for manipulating mathematical expressions and equations in symbolic form, as opposed to manipulating the approximations of specific numerical quantities represented by those symbols.

See http://en.wikipedia.org/wiki/Symbolic_computation

83 questions
39
votes
6 answers

Introduction to computer algebra systems?

Does anybody know of any resources (books, classes, lecture notes, or anything) about the general theory of computer algebra systems (e.g. mathematica, sympy)? "Introductory" materials are preferred, but I realize that with such a specialized…
rz.
  • 19,861
  • 10
  • 54
  • 47
18
votes
1 answer

Dealing with piecewise equations returned by sympy integrate

In sympy I have an integral which returns a Piecewise object, e.g. In [2]: from sympy.abc import x,y,z In [3]: test = exp(-x**2/z**2) In [4]: itest = integrate(test,(x,0,oo)) In [5]: itest Out[5]: ⎧ ___ …
17
votes
3 answers

symbolic computation in C++

I need to do analytical integration in C++. For example, I should integrate expressions like this: exp[I(x-y)], I is an imaginary number. How can I do this in C++? I tried GiNaC but it can just integrate polynomials. I also tried SymbolicC++. It can…
MOON
  • 2,516
  • 4
  • 31
  • 49
14
votes
2 answers

Factor/collect expression in Sympy

I have an equation like: R₂⋅V₁ + R₃⋅V₁ - R₃⋅V₂ i₁ = ───────────────────── R₁⋅R₂ + R₁⋅R₃ + R₂⋅R₃ defined and I'd like to split it into factors that include only single variable - in this case V1 and V2. So as a result I'd expect …
viraptor
  • 33,322
  • 10
  • 107
  • 191
12
votes
3 answers

Multivariate Taylor approximation in sympy

I aim to write a multidimensional Taylor approximation using sympy, which uses as many builtin code as possible, computes the truncated Taylor approximation of a given function of two variables returns the result without the Big-O-remainder term,…
flonk
  • 3,726
  • 3
  • 24
  • 37
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 +…
6
votes
2 answers

Algorithm to detect and remove least number of inconsistent facts (probably in PROLOG)?

How do you program the following algorithm? Imagine a list of "facts" like this, where the letters represent variables bound to numeric values: x = 1 y = 2 z = 3 a = 1 b = 2 c = 3 a = x b = z c = z These "facts" clearly must not all be "true": it's…
Alex R
  • 11,364
  • 15
  • 100
  • 180
6
votes
2 answers

C# library overloads ^ operator. How to use ** instead?

The Symbolism library overloads arithmetic operators. Although it's written in C# I can use it from F#: open Symbolism let x = new Symbol("x") let y = new Symbol("y") let z = new Symbol("z") printfn "%A" (2*x + 3 + 4*x + 5*y + z + 8*y) the…
6
votes
1 answer

Why doesn't Rebol 3 honor quoted function parameters that are parenthesized?

The DO dialect uses series of category PAREN! for precedence, and will usually boil away the underlying parentheses structure prior to invoking a function. However, it used to be possible in Rebol 2 to specify in a function's definition that you…
6
votes
1 answer

Truth tables in python using sympy

I'm trying to create a program, that uses sympy to take a set of variables and evaluate a symbolic logic expression over the domain of those variables. The problem is that I cannot get python to evaluate the expression after it spits out the truth…
alvonellos
  • 1,009
  • 1
  • 9
  • 27
5
votes
2 answers

How do I evaluate a Symbolic variable in SymbolicC++?

I have been trying out a couple computer algebra libraries for C++ to use with a vector calculus course I am taking. I am having trouble with nonlinear equations in GiNaC and in SymbolicC++ it actually worked. Here is a simple example, but the…
4
votes
1 answer

Maxima CAS : summation with symbolic upper limit n not simplifying when the upper limit is specified later with ev()

The following two pieces of maxima code should be equivalent: sum(x[i], i, 1, 2); ev(%, x[1] = 5, x[2] = 3); and: sum(x[i], i, 1, n); ev(%, n = 2, x[1] = 5, x[2] = 3); In the first case, maxima knows to evaluate the expression to 8. In the second…
daj
  • 6,962
  • 9
  • 45
  • 79
4
votes
1 answer

Inverse Laplace transform of a rational function with third order polynominal denominator, using Sympy

I'm trying to do the inverse Laplace transform of a generalized rational function of the form: D/(A*s**2 + B*s + C) using sympy. from sympy import * from sympy import inverse_laplace_transform as ilt from sympy.abc import s, t var('A:D') eq =…
Reza Saidafkan
  • 320
  • 2
  • 9
4
votes
0 answers

OOP: Change of class of object following operation - operations no longer as desired

I am new to Object Oriented Programming. After a lot of stressing, I have finally managed to define my own class of objects in matlab's symbolic engine, muPad. The engine has its own language, the syntax of which is very logical and similar to…
Kobs
  • 209
  • 3
  • 8
4
votes
0 answers

Integration of big trigonometric functions

In SymPy, what is the recommended way to integrate a big trigonometric functions like this one shown below? The numerical integration gives -27151.225. from sympy import pi, sin, cos from sympy.abc import x, t function =…
Saullo G. P. Castro
  • 56,802
  • 26
  • 179
  • 234
1
2 3 4 5 6