The tag has no wiki summary.

learn more… | top users | synonyms

33
votes
5answers
1k views

V10's Operator Forms - what are they good for?

V10 introduces an operator form for several functions perhaps primarily due to their role in queries as part of introducing data science functionality. At first pass it seems a lot of effort to add ...
26
votes
2answers
1k views

when is f@g not the same as f[g]?

I have always thought that f@g will give the same result as f[g] in all cases, and it is just a matter of style which one to use ...
18
votes
11answers
1k views

Generating an ordered list of pairs of elements from ordered lists

I have a pair of ordered lists. I want to generate a new ordered list (using the same ordering) of length n by applying a binary operator to pairs of elements, one from each list, along with the index ...
17
votes
3answers
548 views

How is + as an infix operator associated with Plus?

How is + associated with Plus? Suppose I want to define a head FooBar and have it ...
16
votes
5answers
1k views

Having the derivative be an operator

How do I create an operator which acts like a derivative to everything to the right of it: for example: $ \left( \partial_x + \partial_y + z \right ) x \psi $ How do I make that evaluate to: $x ...
15
votes
2answers
230 views

Is there a comprehensive list of functions with V10 operator forms?

Version 10 sports operator forms for many functions like Map, SortBy, Select which allow you ...
11
votes
3answers
330 views

Replace operators

/. can be used to replace variables but how can one replace operators. For example in a * b, ...
10
votes
9answers
524 views

How to find range in which a number falls, from given list of numbers?

How can one find the range in which a number falls, from given list of numbers? ...
10
votes
1answer
119 views

Using MapIndexed[List] on a dataset fails — why?

The following works: MapIndexed[List]@{1, 2, 3} (* {{1, {1}}, {2, {2}}, {3, {3}}} *) This works too: ...
9
votes
6answers
403 views

Performing Computations on Sets

I would like to find a permutation of $\quad S=\{\frac{1}{10}, \frac{1}{2}, \frac{4}{7}, \frac{3}{5}, \frac{2}{3} \}\quad$ that maximizes the sum of theses elements raised to unique powers: ...
8
votes
1answer
771 views

How do I expand a sum?

I have a problem with Mathematica's symbolic manipulations. As an example, consider the following expression: $$\sum _{i=1}^n -2 x_i \left(-a x_i-b+y_i\right)=0$$ How do I get Mathematica to expand ...
8
votes
2answers
254 views

Change associativity of the @ operator

The @ operator in Mathematica is right-associative by default, i.e. f@g@h evaluates as f@(g@h) Is it possible to make the ...
7
votes
3answers
1k views

Using D to find a symbolic derivative

I need to do the following: Define a function Take the derivative of this function and have a look at the symoblic representation Substitute in some values With the bonus that I want to use the ...
6
votes
1answer
365 views

What is the mathematical meaning behind D[f]?

y = a + b x; I can understand this output of the ordinary differentiation of y w.r.t. x ...
5
votes
3answers
232 views

Element-wise list operation on list of lists [closed]

Suppose a function F operates on list A: $$A=\{a_1, a_2,\cdots, a_n\}$$ I have a list of lists, B: $$B=\{A_1, A_2,\cdots,A_m\}$$ Is there a syntax to specify that F should operate on members of B, ...
5
votes
3answers
326 views

ComplexInfinity/Indeterminate error when evaluating derivative

Motivation: I want to find the coefficients for the polynomial that is obtained when one adds together the first $n$ natural numbers to the power of $a$; that is, when you consider $1^{a} + 2^{a} + ...
5
votes
3answers
425 views

How to define the Poisson bracket in Mathematica

If $f,g$ are functions of the independent variables $\{q_1, q_2, ..., q_N, p_1, p_2, ..., p_N\}$, then the Poisson bracket is defined as: \begin{equation*} [f, g] = \sum_{i=1}^N \left(\frac{\partial ...
4
votes
2answers
617 views

How to change coordinates of a differential operator?

I'm doing a basic quantum mechanics problem and am trying to learn how to do it in Mathematica. Any help would be much appreciated. $\vec{L} = \vec{x} \times \vec{p}$ where $\vec{x}$ has ...
4
votes
4answers
176 views

Exponential of a Differential Operator

In Mathematica, is it possible to exponentiate a differential operator such that the operator will act on a function, $f(x,p)$? Specifically, I wondering if I can get Mathematica to do this: ...
4
votes
2answers
2k views

How to find (numerical) value of a derivative at point?

I have the following function: f[0, 0] = 0 f[x_, y_] := Exp[-(x^2 + y^2)^(-1)] How do I find its partial derivatives at any given point, including $(0,0)$? This ...
4
votes
1answer
77 views

Factoring a differential equation into an operator product

Following the fundamental theorem of algebra, I can (as stated here in Sec. 1.1.4) factor an $n$th-order linear ordinary differential equation $$ a_n \frac{d^n x}{dt^n} + a_{n-1} \frac{d^{n-1} ...
4
votes
2answers
131 views

Scalar product operator of complex vectors

What is the scalar product operator for complex vectors (or matrices) in Mathematica? The usual $Dot[]$ doesn't work. E.g. here is what the Mathematica gives $$\{1,0\}.\{I,0\}=I$$ but the answer ...
4
votes
1answer
90 views

Avoid writing explicit form of operator

I would like to evaluate the following (simplified) expression with Mathematica : $\frac{\delta}{\delta J} \exp[(J(x)+K(x)) \Delta (J(x)+K(x))]$ where $\Delta$ is a differential operator independent ...
4
votes
0answers
55 views

Operator and VariationalMethods [closed]

I'm trying to get the variational derivative $\delta E$ respect to $\Phi$ of this functional $$ E[\Phi] = \int d^3r\ \left[ -\frac{\hbar^2}{2m}\nabla^2\Phi + V(\vec{r})\Phi^*\Phi + ...
4
votes
0answers
115 views

Can Mathematica Operators be combined in a linear fashion for readability?

Here's a simple example. Suppose we want to find the off-diagonal matrix of m: m={{1,2},{3,4}} This can be solved fairly simply by extracting a list of the ...
3
votes
2answers
233 views

Question on operator: // N

I've seen a notebook with the following: ...
3
votes
2answers
267 views

Differential operator squared

I defined a one-dimensional momentum operator $\hat{p}=-i\hbar\frac{\partial}{\partial{x}}$ in Mathematica p = -I * h * D[#, x]& and I want to get the ...
3
votes
1answer
196 views

Defining the Moyal Product in Mathematica

What would be the best way to define the Moyal Product, $f(x,p)\star g(x,p)$, in Mathematica? $f(x,p)\star g(x,p)$ may be written as $f\star ...
3
votes
1answer
145 views

Gateaux (directional) derivatives and higher order differentials of a functional

I would like to calculate the Gateaux derivative of a functional (i.e. a function depending on functions). A simple example for the Dirichlet functional: $L(u(x))=\int_0^1 \frac{1}{2} (u'(x))^2 dx$ ...
3
votes
1answer
101 views

Custom operators; custom pattern matching with pure functions

What I'm trying to achieve in Mathematica is the creation of a binary operator whose operands are both pure functions over the natural numbers. The result of the operator should be another pure ...
3
votes
1answer
209 views

Define operator algebra

My objective is to work out commutators like this $$[f(x,y)\partial_x^2+g(x,y)\partial_x+h(x,y),a(x,y)\partial_x^2+b(x,y)\partial_x+c(x,y)]$$ or ...
3
votes
1answer
111 views

Displaying the meaning of an operator using Information

I'm using CircleTimes ($\otimes$) operator defined as a_\[CircleTimes]b_ := KroneckerProduct[a, b] so I can use ...
3
votes
2answers
634 views

why I can't define a commutator operator in this way?

I am trying to define some operators I used frequently.For example, I defined a KroneckerProduct operator as $ \otimes $ as follows: a_$ \otimes $b_:=a.b-b.a and this works fine. Then I want to ...
3
votes
1answer
58 views

Extract differential operator from differential form

Let's say I have : a*u''[x]+b*u'[x] where a and b are constant I would need to get ...
2
votes
2answers
383 views

Replacing values of a function

I have recently starting using Mathematica and have recently come to what seems as an impasse in my understanding of the language. If this is too "tell me how to do it" I would certainly understand. ...
2
votes
2answers
42 views

Column Operation - Subtract part of nested list from part of another nested list [duplicate]

I have two lists with x- and y-coordinates with different z-coordinates of the form {{x0, y0, z0_1}, {x1, y1, z1_1}, ..., {xn, yn, zn_1}} and ...
2
votes
1answer
81 views

Operator-Input Form for Lists?

The documentation on Operator-Input Forms shows the following example which suggests that there is an alternative, convenient, operator-style, tidy technique for inputting lists. However, there is ...
2
votes
2answers
153 views

HoldForm[Operator ##] on some list

Recently in response to this question Mr.Wizard suggested an unusual way to summing numbers. This doesn't seem to be documented. ...
1
vote
1answer
96 views

Linearity of a function in Mathematica

I have a function which has something like myFunc[q,a state[c,d]] a could be anything, and I want to tell Mathematica that ...
1
vote
1answer
80 views

Operator operation

There are two basic operators r={x,y,z} and p=-I*h*{D[#,x] , D[#,y], D[#,z]} &. The angular momentum operator is defined as ...
1
vote
1answer
88 views

How to solve an operator form of an integral equation by iteration method?

How I can obtain the $n^{th}$ approximation of the following Operator form integral equation? $F(t)=A(t)+\int_0^tds B(s)F(s)$, where $A(t)=\bigg{(}\begin{matrix}t&0\\Cos(t)&1 ...
1
vote
1answer
155 views

Efficient way to give symbolic elements symmetry

I have a symbolic expression that represents a set of operators. These operators have quite a bit of symmetry to simplify expressions: ...
1
vote
0answers
64 views

Is there any way to define a new binary operator? [duplicate]

I am looking to define a new operator that would work similarly to the + or - operator. My end goal is to make a dice operator for calculating random distributions in the normal d20 fashion (e.g. 5d6 ...
1
vote
0answers
26 views

custom precedence for custom infix operator with InfixNotation [duplicate]

I am trying to define several custom operators with custom precedence to implement geometric algebra. Loading the notation package << Notation` I can ...
1
vote
0answers
61 views

Define an operator without Built-in Meanings containing a Power function [duplicate]

I would like to define the following operator: $$ \left[T^{(j_{1})}\otimes U^{(j_{2})}\right]_{m}^{(j)}=\sum_{m_{1},m_{2}}\left\langle j_{1},m_{1};j_{2},m_{2}\big|j,m\right\rangle ...
1
vote
0answers
110 views

Defining an operator

Let s be a positive integer and let DifferenceDelta be this function with step = 1. Define ...
1
vote
0answers
41 views

Parallelizing an associative binary operation

I have an associative binary operation '.', which I often use in this sort of way: result = expr1 . expr2 . expr3 . expr4 The ...
1
vote
0answers
49 views

Definition of differential operators [duplicate]

I am curious how differential operators are defined in Mathematica. More specifically, if the Laplacian function wasn't available, how would one go on to define such a function in Mathematica directly ...
0
votes
1answer
77 views

What's wrong with my implementation on CountryData

I was wondering, *for which countries is the proportion of Phone line users to population greater than or equal to that of the United States?* This is what I inputted below, but the list of countries ...