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
0
votes
1 answer

can't implement any series that uses power or factorial

I wrote a program to calculate the value of e^x by series and by library function.See the following: #include #include long long fact(int x) { long prod=1; int i=1; if(x==0) return 1; else{ …
0
votes
1 answer

Trying to put per mille symbol into plot label usinf matplotlib

I can't figure out how to put the per mille symbol into my plt.ylabel. anyone know how? import numpy as np import matplotlib.pyplot as plt plt.plot(x,y) ax = plt.gca() ax.invert_yaxis() plt.title("LR04 Benthic…
0
votes
1 answer

Infeasible Solution Error on CPLEX (2D Bin Packing Problem)

[Representation of feasible solution][1] [1]: https://i.stack.imgur.com/83ESm.png Hi Everyone, I'm currently working on an adaptation of a 3-Stage Two Dimensional Bin Packing Problem on Cplex. Unfortunately when I try to run the problem some errors…
0
votes
1 answer

Circle within a drop

How to create a program in mathematica that automatically adjusts a perfect circle inside the drop shape so that the outside parts of the circle are added part by part and returns us a value? As in the attached figure. Droplet example
0
votes
0 answers

Long math expression in R

It's my first time here and I'm not really practical, but I hope my question will be clear and I'll find the right answer. I'm trying to calculate a vowel space area (a phonetic measure for vowels) in R: that requires a long math expression. Here's…
Faergr
  • 11
  • 1
0
votes
1 answer

Fitting a coned semi torus surface to a scatter plot in python

So maybe this is more of a mathematical question but I'm a little stuck on this one. I have a scatter plot and am trying to fit a surface to it. Using two Gaussian's is working fairly well but its not perfect, and since I know the original data…
0
votes
2 answers

How to find the non-zero minimum value in the objective function of a mathematical model

It is a mathematical model. x is the 0-1 decision variable, and c is Non-negative coefficients. The tricky problem I'm facing now is how to find that non-zero minimum value in a series of cx. The objective function is as follows. Now, I want to…
0
votes
1 answer

Edit ExceptionSample so it can catch exceptions wherein text is entered as String input instead of integer data type input

How to catch an exception if the the input is string instead of integer? It's confusing me since they used Try, Catch, Finally which looks new to me. Please enlighten me thanks. import java.util.*; public class ExceptionSample { public static…
Koi
  • 7
  • 4
0
votes
0 answers

Abstract Matrix Algebra and Calculus in sympy

I am doing control engineering and I often face problems of the type below and I want to know if there is a way to deal with this in sympy. question: tl:dr: I want to make a MatrixSymbol dependent on a scalar Symbol representing time, to allow…
mike
  • 791
  • 11
  • 26
0
votes
1 answer

simple replacement of variables on wolfram-mathematica

I would like to make a simple replacement or substitution: y=a+b a=2d+e b=f+g How make Wolfram-Mathematica automatically show and make the substitution or replacement of variables a and b an show this result: y=2d+e + f+g ?
Gustavomcls
  • 1,655
  • 2
  • 12
  • 20
0
votes
0 answers

Implement mathematical equation for Loss function in pytorch

I implemented a GAN model and I would like the discriminator (UNET Discriminator) to compute decision over all pixels and [D(x)]i,j refer to the discriminator decision at pixel (i; j). The original loss in the paper is based on a vanilla Loss, but I…
0
votes
2 answers

Is possible to give a mathematical expression as argument in C language?

I'm trying to built a function which i can give as argument a mathematical expression such as "x**3+bx-c" and trough the newton method return me the roots of the given function. I was thinking in something like this following example, where 'r0' is…
0
votes
1 answer

Calculate 'Ranking' based on 'weights' - what's the formula , given different ranges of values

Given a list of cars and their top speeds, MPG and car cost. I want to rank them. With Speed a 'weight' of 50%, MPG 'weight' of 30% and car cost 20%. The faster the car, the better.. The higher the MPG, the better... The lower the COST, the…
Jon
  • 1,608
  • 7
  • 25
  • 38
0
votes
0 answers

Solution of a problem applying trapezoid method using python

I would like some help on calculating how a function needs to use the trapezoid method. The required data are: import numpy as…
0
votes
0 answers

How to make a formula of ppf in Java

I would like to know to define the formula of ppf (public provident fund )in java code. I have tried p*(Math.pow(1+i/100,t)); but I am getting it wrong Pff formula is: F = P[{(1+i)n-1}/i] where, ‘F’ stands for the maturity amount of the PPF ‘P’…