Questions tagged [mathematical-expressions]

In mathematics, an expression is a finite combination of symbols that is well-formed according to rules that depend on the context. Symbols can designate numbers (constants), variables, operations, functions, and other mathematical symbols, as well as punctuation, symbols of grouping, and other syntactic symbols.

Strings of symbols that violate the rules of syntax are not well-formed and are not valid mathematical expressions. For example:

would not be considered a mathematical expression but only a meaningless jumble.

In algebra an expression may be used to designate a value, which might depend on values assigned to variables occurring in the expression; the determination of this value depends on the semantics attached to the symbols of the expression.

These semantic rules may declare that certain expressions do not designate any value; such expressions are said to have an undefined value, but they are well-formed expressions nonetheless.

In general the meaning of expressions is not limited to designating values; for instance, an expression might designate a condition, or an equation that is to be solved, or it can be viewed as an object in its own right that can be manipulated according to certain rules. Certain expressions that designate a value simultaneously express a condition that is assumed to hold, for instance those involving the operator to designate an internal direct sum.

Being an expression is a syntactic concept; although different mathematical fields have different notions of valid expressions, the values associated to variables does not play a role. See formal language for general considerations on how expressions are constructed, and formal semantics for questions concerning attaching meaning (values) to expressions.

261 questions
1
vote
2 answers

Amount of steps from one field in a grid to another, orthogonally?

How do I calculate the amount of "steps" there is from one field to another in a grid, moving orthogonally? I am implementing an A* pathfinding system for a game that I am developing, and this simple mathematical operation is in my way. I should…
Mathias Lykkegaard Lorenzen
  • 15,031
  • 23
  • 100
  • 187
1
vote
1 answer

Understanding recursion using all possible combinations in an array

I'm trying to understand recursion with the help of few examples. I found this example of printing all possible combinations of r elements in a given array of size n using recursion. Print all possible combinations of r elements in a given array of…
1
vote
1 answer

Sympy: substitute to symbolic bosonic commutation its numerical value

I would like to simplify expressions involving boson commutators using sympy. The problem is that, using secondquant in sympy, the numerical values of the bosonic commutator [b_0,b^\dagger_0]=1 and [b_0,b^\dagger_1]=0 is never substituted to the…
Chaos
  • 199
  • 1
  • 13
1
vote
2 answers

How to change an operation in python with input?

I am trying to work on a graphing calculator in Python using Numpy and Matplotlib. Here is my code: import numpy as np import matplotlib.pyplot as plt a = input("enter operation") #operation can be something like '**2 or + 1' b =…
1
vote
1 answer

Qualify MathJax expressions

Can anybody tell me if exists any way to qualify mathematical expressión written in MathJax, I mean, I want to use a program which in real time take the mathematical procedures and detect if there were mistakes or not.
CAMILO HG
  • 183
  • 1
  • 9
1
vote
2 answers

C# expression trees for a calculator

I'm a C# newbie. I want to write a calculator app in C#. Would C# expression trees be a good way to go for the guts of it? (That is, the part that takes a series of keypresses and turns them into an expression that the calculator can evaluate and…
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
1
vote
1 answer

How to get variable names in Mathematica timeseries?

I am using the predefined "WindSpeedData" function, which returns a TimeSeries object. How can I get the variable names that constitute the time series and their corresponding data?
1
vote
1 answer

How can I operate, like take square root, of numbers like 2x + 4y + 6z?

I am working on a project for my Applied Mathematics major, basically I have a number class (triangular fuzzy numbers) and I have a function that uses similarity method on fuzzy numbers I give as input. Problem is, this is a Fuzzy Linear Programming…
user8721364
1
vote
1 answer

Mathematical functions on Python 3

I have a work to do on numerical analysis that consists on implementing algorithms for root-finding problems. Among them are the Newton method which calculates values for a function f(x) and it's first derivative on each iteraction. For that method…
NoGoodAtMath
  • 111
  • 4
1
vote
1 answer

How to evaluate a list of symbolic expressions

I have a dictionary dictionary1 that contains variables as : x1, x2, x3, y1, y2 .. they are each associated with a structure of data containing mostly list of datas. Each variable of the dict has a list of integers of the same size. I have a list of…
G. Esel
  • 31
  • 6
1
vote
0 answers

Converting LATEX to mathematical symbols in android like math.stackexchange.com

I am building an app which will include questions from physics,mathematics and chemistry.So it is bound to have symbols which are often used in those subjects.I am exactly needing what math.stackexchange.com is using i.e. showing mathematical…
1
vote
2 answers

How to evaluate the mathematical expression from the string in J2ME

How to evaluate the mathematical expression from the string in J2ME. For example a string containing "2*4".From the string i want evaluate the mathematical expression and get the result as 8 (2*4).How should i done this in J2ME. In "Java™ Platform…
SIVAKUMAR.J
  • 4,258
  • 9
  • 45
  • 80
1
vote
0 answers

Can we train google vision OCR to read printed complex mathematical expressions?

Google Vision OCR API is unable to read mathematical expressions, can we train it to read the complex mathematical expressions? If yes, please let us know the procedure. If not, can you please suggest some other OCRs which can serve the purpose? We…
1
vote
2 answers

Problems attaching a function handle on Matlab to integral expression

I have an integral expression which I defined on Matlab using x = 0:1/1000:1; g = @(x) (exp(-1./x.^2).*heaviside(x)).*(exp(-1./(1-x).^2).*heaviside(1-x)); t = 0:1/1000:1; f = zeros(size(t)); for i = 1:length(t) f(i) = integral(g,0,t(i)); end I…
Jason Born
  • 163
  • 1
  • 14
1
vote
2 answers

Getting Matrix Input in Mathematica

I want user to input a matrix. I have the below code for this. rmatrix = {{Input["r11"], Input["r12"]}, {Input["r21"], Input["r22"]}} But it shows a separate dialog for each item. I want to get the complete matrix in one dialog. I also tried it in…