Questions tagged [operators]

Questions about using or composing operators--functional mappings from one state or vector space to another.

Filter by
Sorted by
Tagged with
1
vote
0answers
42 views

Precedence of @@ vs /@

How do I find what I think is called the "precedence" of a given operator. That is, for the following code: ...
3
votes
2answers
49 views

Define the behavior of operators without built-in meaning

I need an operation $\tilde{}$ that lifts another operation (for example, the sum, but this does not have to be limited to real numbers) in the sense that $\widetilde{ (x \oplus y)} = \tilde x + \...
19
votes
1answer
159 views

Why does OperatorApplied by default reverse the arguments?

Perhaps this is just one of those Mathematica curiosities, but I'd like to know why by default OperatorApplied[f][x][y] === f[y,x] versus the more usual way one ...
2
votes
0answers
21 views

Define an operator with the distributive property that works in general expressions

This is a follow up to this question. In that question they use TagSetDelayed to give a symbol the distributive property. In my case this becomes ...
3
votes
1answer
736 views

Gâteaux (directional) derivatives and higher order differentials of a functional

I would like to calculate the Gâteaux 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$ ...
4
votes
1answer
96 views

Partial transpose of 8x8 density matrix?

Please could someone help me to knew how to compute the partial partial-transposition of the following matrix? mat = Table[ρ[i, j], {i, 1, 8}, {j, 1, 8}]
0
votes
1answer
43 views

How to define derivative operation of a series acting on normal function

In some cases, I have to do derivarive of higher order acting on some function successively. Here is a toy example: I have a function named myfunc: ...
2
votes
1answer
30 views

Is associativity of operators documented?

Operator precedence is documented. Operators without built-in meanings are documented. The word "associative" apparently does not appear in either page. It's easy enough to do an experiment to observe ...
0
votes
1answer
145 views

How to calculate the divergence of stress matrix in polar coordinate system correctly

I calculate the divergence of stress matrix in polar coordinate system by the method of coordinate transformation as follows: ...
1
vote
1answer
125 views

How to program Mathematica to do the differential operator calculation

I want to create a surface Laplacian under the spheroidal coordinates, Now, I already have the surface gradient defined, but I don't know how to find the Laplacian. Since the surface gradient is too ...
0
votes
0answers
37 views

Defining and Squaring an Operator using Mathematica

Hello I have a question regarding the possibility of defining a operator using Mathematica. Essentially what I would like to do is define the following, \begin{gather*} {\mathcal D := \frac{1}{(x^2+...
0
votes
0answers
61 views

Evaluating a differential expression using Mathematica

I am attempting to calculate the following expression in Mathematica, but I am having a bit of difficulty doing so. I want to calculate the following expression \begin{gather*} \left(x^2\sqrt{1-...
3
votes
2answers
77 views

How to check if all the members of a list lies in specific ranges based on another list?

There are two lists as follows: lista = {i, j, k}; listb = {{1, 2}, {3, 4}, {5, 6}}; If i in ...
1
vote
0answers
39 views

Create an operator that holds its arguments [duplicate]

How can I create an operator that holds its arguments? I am looking to define something similar to oper[x_][expr_] := Hold[expr] I am expecting the following ...
7
votes
2answers
293 views

Defining an operator in Mathematica?

How to define the following operator in Mathematica? $$\hat{\nabla}^4=\left(\frac{\partial^2}{\partial\hat{r}^2}+\frac1{\hat{r}}\frac{\partial}{\partial\hat{r}}\right)^2$$
3
votes
1answer
59 views

How to expand (not replace) the “+”, “>” infix operator on strings? [duplicate]

I went through the similar questions to overload the behavior of built-in operator, like How to overload the operator "*" as KroneckerProduct. The answers given there are usually to use new ...
8
votes
3answers
3k views

Creating the Nabla operator (also known as Del operator) as an operator

How can I define the nabla operator (also known as Del operator) as a an operator, acting on everything to the right of the operator! Also taking \[Del]^2 would ...
0
votes
0answers
18 views

Problem with makeOperator which yields Polynomials of an operator

Hi Is it possible to improve the macro provided by Jens Polynomial expansion of operator ...
0
votes
0answers
43 views

Nest function n times

A trivial example would be f[x_]:=x Nest[f, 7, n] which would of course be 7 because it is independent of ...
4
votes
2answers
615 views

Polynomial expansion of operator

I am new to Mathematica, I am trying to generate the polynomial function of a operator. So for example, the operator $L $ is $\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y} $, and I want ...
10
votes
4answers
385 views

Operator currying: how to convert f[a,b][c,d] to {a+c,b+d}?

This question is related to this golfing question (but I'm not interested in golfing, only in functional operator composition): How can we convert f[a,b][c,d] to <...
1
vote
3answers
114 views

How to use `Through` function to pass through derivative operator

Because of the need of the operation rules of variational notation, I want to achieve the following effects: Through[(f + s)'[x]] Through[(f + s)''[x]] I want to ...
11
votes
2answers
309 views

Why `Drop` and `Take` do not support a operator form

Since Mathematica 10 introduced the operator form, I have been a big fan of it. Whenever I use some buit-in functions, I first look up whether they support operator form. To me, it was quite ...
0
votes
2answers
167 views
4
votes
2answers
251 views

Wick's theorem for Gaussian stochastic variables

I wonder whether there exists a clever way to implement Wick's theorem for Gaussian stochastic variables $\eta_{j_{i}}$ (with $\langle \eta_{j_{i}}\rangle=0$ for $\forall i$) which in general states: ...
2
votes
2answers
65 views

How can I concisely define a matrix-form partial derivative operator?

I have a vector $\boldsymbol{u}(x,y) = \begin{bmatrix} u_x(x,y) \\ u_y(x,y) \\ \end{bmatrix}.$ I would like to get $\boldsymbol{\sigma}(x,y) = \begin{bmatrix} \sigma_x \\ \sigma_y \\ \tau_{xy}...
4
votes
2answers
192 views

Can C-like function call syntax be easily achieved for particular function names?

I'm trying to use Mathematica as a tool to prove that some C code is equivalent to another (up to roundoff errors). For this I need to somehow paste C expressions like ...
0
votes
0answers
65 views

Simplifying a differential equation acting on a product of functions

I have a function $f(x_1, \ldots , x_n)$ in $n$-variables that satisfies a fourth order linear differential equation (say $Df=0$). The function $f(x_1, \ldots, x_n)$ is of the form $f(x_1, \ldots, x_n)...
0
votes
0answers
46 views

Using FullSimplify to simply expressions involving differential operators

I am trying to simplify some long formulas involving differential operators in $n$ variables. For example, I want to simplify $$\left(\frac{\partial}{\partial x}-\frac{\partial}{\partial y}\right) \...
0
votes
1answer
76 views

Simplifying $\left(f\left(x\right)\frac{\partial}{\partial x}\right)^nf\left(x\right)$ into a summation

In case you're wondering how to get differentials to act like operators in Mathematica, I stumbled across a package Carl Woll made to solve this issue in this question. There's a a more recent version ...
0
votes
0answers
32 views

How to transform polynomial to differential operator?

How to transform the multiariate polynomial to corresponding differential operator? For instance, for a polynomial $ \frac{1}{2} z_1^2 z_3^6 $ is the goal operator $ \frac{\partial ^8}{\partial ^2x_1\...
0
votes
0answers
33 views

Implicit definition of a coordinate in differential equation [duplicate]

I would like to solve the following differential equation $\frac{d^2 \psi(r_*)}{dr^2_*} + (\omega^2 - V(r)) \psi(r_*)=0$ and the boundary conditions are $\psi(\inf) = \psi(-inf) = 0$. The problem is ...
0
votes
1answer
83 views

Multiply function-valued matrices

I would like to create a notebook for calculations in supersymmetric quantum mechanics. The basic building blocks are two functions (or maybe better: operators): ...
3
votes
1answer
105 views

Best way to apply a list of functions to a list of values?

This question is closely related to questions 83720, 17460, and 11298. How would you write the operator F = Through[#1[#2]] & in the prettiest, fastest, or ...
20
votes
4answers
949 views

What is the definition of Curl in Mathematica?

I have a usual mathematical background in vector and tensor calculus. I was trying to use the differential operators of Mathematica, namely Grad, ...
0
votes
1answer
73 views

How to substitute integral operators into polynomials?

Suppose I have a polynomial $a_0+a_1 f(x,t) + a_2 f(x,t)^2 + ....$. In code, a0 + a1 y + a2 y^2 + a3 y^3 /. y :> Integrate[Subscript[y, k] E^(I k y), k] <...
0
votes
0answers
37 views

Defining a function through an ODE containing unspecified operators

I want to do some algebra using a function only defined through a DE containing unspecified operators. The DE is $$ \partial_zu(z) = \left[\hat{D}+\hat{N}(z,u)\right] u(z). $$ Here $u$ lives in ...
3
votes
2answers
144 views

Append a function of an expression as operator form using Curry?

I fielded this q to tech support but didn't get a conclusive answer yet: Is it possible to use Curry specifically to modify ...
1
vote
0answers
58 views

Distribute && over a list [duplicate]

I cannot find an operator "RO" so that given a list, say {a,b,c}, RO[&&,{a,b,c}] produces a && b && c
2
votes
1answer
117 views

Distribute operator

I have an operator defined by \[ScriptCapitalN] and want to Expand a term and then use ...
2
votes
4answers
154 views

Skipping indices in a product

I have a matrix $A$ for which I want to compute the quantity $T\lambda_j = \Pi_{\lambda_i\ne \lambda_j} \frac{A - \lambda_i I}{\lambda_j-\lambda_i}$, where $\lambda_i$ ($\lambda_j$) denote the ...
0
votes
1answer
44 views

Performing a simple operation with operators [closed]

I have a map defined as $\qquad \Phi(X) = a^2\, Tr[X] |0\rangle \langle 0| + b^2\, Tr[X] |1\rangle \langle 1| + a\,b\, Tr[\sigma_z X] |0\rangle \langle 1| + a\,b\, Tr[\sigma_z X] |1\rangle \langle ...
2
votes
1answer
104 views

Problem with defining a simple linear operator

I need to define a linear operator, which should have very simple linearity: myOp[Plus[f_, g_]] := myOp[f] + myOp[g] myOp[a_ f_[x_, t_]] := a myOp[f[x, t]] where ...
1
vote
2answers
109 views

Simplify differential expressions

One can differentiate a two dimensional vector like this, ClearAll["Global`*"] u[x_, y_] := {f[x, y], g[x, y]} Div[u[x, y], {x, y}] with output ...
4
votes
2answers
146 views

How can I define operators that implement the algebra of sets?

I need to define some operators with properties like idempotence and distribution over union and intersection so that Mathematica can symbolically simplify expressions. How do I define such operators? ...
2
votes
1answer
40 views

Define different actions for the same operator depending on the nature of its arguments

I am working with terms of the form A**B1**B2 where A, B1, and ...
2
votes
1answer
131 views

Defining an operator with given properties

In symbolic derivations with Mathematica, one often needs to define an operator with some desired properties, which will be used to stand for a general function or transform. For example, I would ...
0
votes
0answers
196 views

Defining a complex partial differential operator

I tried to define a partial differential operator using this code ...
2
votes
2answers
54 views

Defining a differential operator that acts on a non-commutative basis

Given a non-commutative basis ${x_0,x_1,x_2}$ I'd like to define a differential operator that acts as so $$ \Delta_i (\sum_{n=0}^\infty c_n x_i^n) = \sum_{n=1}^\infty c_n x_i^{n-1}, \quad \Delta_i ...
1
vote
1answer
75 views

Define custom operator and specific application

I want to define a specific operator that will act in generic functions that depend, say, in the variable z. My problem is that I want when a specific function is ...

1
2 3 4 5