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
1
vote
1 answer

Replacing symbolic derivatives in MATLAB

I have a symbolic function that looks like this syms x y(x) h fn(x) = y + (h^2*(diff(y(x), x) + 2))/2 + (h^5*diff(y(x), x, x, x, x))/120 + (h^3*diff(y(x), x, x))/6 + (h^4*diff(y(x), x, x, x))/24 + h*(2*x + y(x) - 1) I'd like to replace all…
Vyas
  • 234
  • 1
  • 10
1
vote
0 answers

How to write a symbolic summation(symbolic expression) in MATLAB?

I have an academic license for MATLAB for two months and in this version Simulink is not supported. My problem is that I want to write a symbolic expression in MATLAB and the debugger shows me that I may need some features of Simulink. The part of…
Jimbo_ai
  • 167
  • 1
  • 13
1
vote
1 answer

Error in solving symbolic inequalities using Matlab

I am new to Matlab. I am trying to use solve: syms x y S = solve(x^2 + y^2 + x*y < 1, x > 0, y > 0, [x, y]); solx = S.x soly = S.y but Matlab returns: Warning: 5 equations in 2 variables. In C:\Program …
1
vote
1 answer

Solve equation without using symbolic toolbox in Matlab

I need to solve this equation for the variable \theta: using Matlab WITHOUT using symbolic toolbox. The reason for this is that I am compiling the m-file to .Net Assembly and symbolic toolbox can not be used. I know how to solve it using vpasolve,…
NESHOM
  • 899
  • 16
  • 46
1
vote
1 answer

symbolically/parametric solving a nonlinear equation in Matlab

I have these two equations where x, y and z are variables and p1, p2 and p3 are parameter. Can MATLAB find parametric/symbolic solutions for x y z based on p1, p2, p3? 2(x−p1)+2(xy−p3)y = 0 2(y−p2)+2(xy−p3)x = 0
1
vote
0 answers

Why does the Python runtime coerce the return of "in" to bool, but not the result of comparison operators (==, >, <, etc)?

Consider the following class definition: class Symbolic(object): def __eq__(self, rhs): return Symbolic() def __le__(self, rhs): return Symbolic() def __gt__(self, rhs): return Symbolic() def…
hbristow
  • 1,896
  • 1
  • 12
  • 9
1
vote
1 answer

Access to submatrices in symbolic writing (matlab)

Considering a matrix defining using Symbolic Toolbox: syms X Y f(X,Y)=[1 X X^2; 1 Y Y^2]; we obtain: >> f(X,Y) ans = [ 1, X, X^2] [ 1, Y, Y^2] How can we extract only the second row of this matrix? Is the indexing scheme…
Guuk
  • 505
  • 3
  • 17
1
vote
1 answer

Unexpected result on solving some inequality in Matlab symbolic computation

Please consider this example. I would like to solve x^3 - 2x > 0. I try the following commands: syms x; f = @(x) x^3-2*x; solve(f(x)>0,x) and Matlab returns this ans = solve([0.0 < x^3 - 2.0*x], [x]) which is not what I expect. Therefore I use…
epsilonxe
  • 69
  • 1
  • 6
1
vote
1 answer

How to input a symbolic variable in SymbolicC++

I'm making a program that takes input for an expression and integrates it and prints the result to the user. I'm using SymbolicC++, but can't seem to figure out how to input a symbolic... how do I do this - I'm using Visual Studio for my IDE
Rahul
  • 1,056
  • 2
  • 9
  • 26
1
vote
1 answer

Maximum recursion depth error in Sympy when using non commutative symbols

I have some big expressions which have their symbols with the attribute is_commutative=False. Here is an example: import sympy from sympy import pi, sin, cos, exp sympy.var('L, xPL, cosa, i, j, r2, sina, t, x', commutative=False) sin.is_commutative…
1
vote
0 answers

Example of recursive define in real system/ programs

I'm working on a solver to solve the recursive constraint. How the solver works is like that, for example given a sequence which is recursively defined as a(n) = a(n-1)*2 + 2. then the solver will find the exactly formula representing the a(n) based…
1
vote
1 answer

Sympy, is it possible to force a class to stay on the left or on the right side of the expression

In this answer it is explained how to avoid args to be sorted in SymPy classes like Mul, Add and so on. For a new created class like this one explained here it can go to the right hand side when multiplied by a sympy.core.numbers.Float,…
Saullo G. P. Castro
  • 56,802
  • 26
  • 179
  • 234
0
votes
0 answers

Matlab - Symbolic matrix ranks different after vpa application

Recently I have encountered the following paradox (in my mind at least). I tried to evaluate the rank of a symbolic matrix in Matlab (not really sure if rank() works as intended in the symbolic case, but anyway), but in order to simplify the…
0
votes
1 answer

Use symbolic matlab for flexible number of arguments and functions

I have a function F which takes as an input a vector a. Both the output of the function and a are vectors of length N, where N is arbitrary. Each component Fn is of the form g(a(n),a(n-k)), where g is the same for each component. I want to implement…
Scipio
  • 313
  • 2
  • 15
0
votes
0 answers

Matlab symbolic equation rearranging

I'm trying to plot the boundaries of Arnold tongues (the regions were periodic solutions exist) for the circle map, f(x) = 2x + a + b*sin(2*pi*x)/pi mod 1. These are defined when f^n(x)=x and d/dx(f^n(x)) = 1, where f^n(x) represents iterating the…
Rob
  • 1
  • 1