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
4
votes
1answer
70 views

Can I control depths in `Inner`?

I want to optimize the code like this: ...
1
vote
0answers
67 views

Superposition of the differential operators

My problem can be easily solved without Mathematica, however, I am curious how to do it in Mathematica. Moreover, I can be stuck with a similar, but more cumbersome problems in the future. Following ...
1
vote
1answer
156 views

Raising, lowering and number operators for Dirac notation

Starting from this very interesting post Defining quantum-mechanical Bra and Ket operations, i would like to implement raising, lowering and number operators, taking into account that they might be ...
0
votes
0answers
83 views

How to define a product on formal power series (pseudo-differential operators)?

I am used to working with the set of (algebraic) pseudo-differential operators, which consists of formal power series in the symbol $D$ (differentiation operator) of the form $$X = \sum_{j=-\infty}^n ...
5
votes
2answers
141 views

How to construct infix operator with usual behavior?

I am trying to define my own infix operator and having problems with strung-together evaluation. The code below is a simple example. What I would like is to have the operator treated associatively, ...
3
votes
1answer
405 views

What are current approaches for supporting Dirac notation for quantum mechanics?

I'd like to be able to use Mathematica to preform some basic quantum mechanics and quantum computation operations using Dirac's Bra-Ket notation. I've seen several solutions to defining basic ...
3
votes
1answer
458 views

What is the operator **? [closed]

In mathematica if you run: ...
4
votes
2answers
296 views

Interchanging addition and multiplication

Suppose I have an expression that employs addition and multiplication, but no subtraction or division: $$ 2 a + 5 b x^3 + c \;. $$ I would like to change this to $$ (2 + a) (5 +b + x +x +x) c \;, $$ ...
1
vote
0answers
54 views

Operator on a multivariable function in a sum

I need to define an operator that does as follow for any function $h_m$. $\qquad O[h_m](k,M,b,l_{max})=\sum_{l\neq (0,m)}^{l_{max}}il \left (h_l(k,M,b,l_{max}) b_{m-l}(k)- c_l\partial_k h_{m-l}(k,M,...
1
vote
2answers
114 views

Defining an operator: Partially evaluate a Pure Function

I would like to define an operator that takes some parameters as input and returns a function. Here is an example: ...
3
votes
2answers
1k views

Matrix differential operator

i'm new in MATHEMATICA. I want to create an operator $D^{(f)}=\partial_x+f'-\partial^2_x$ and $D^{(g)}=\partial_x+g'-\partial^2_x$ and put it into a matrix element, then multiplied by a vector whose ...
5
votes
2answers
115 views

Define an operator for FileNameJoin

When I join file names, it's inconvenient to use FileNameJoin. The workaround is to use <> instead, however <> is not exactly like FileNameJoin. I tried to define an operator . It just doesn't ...
0
votes
1answer
118 views

How to efficiently exponentiate a differential operator with non-commuting terms, acting on an infinite series?

My question is related to this one, but I am more explicit with the form of the operator in the exponential and the function $f$. Let us have the expression: $$ e^{\mathrm{i} \left( f(x)(\hat{q} \...
3
votes
1answer
115 views

Single argument operator form?

I've heard the explanation that functions like StringDrop[] are varargs and so that is why they do not have an operator form. But when you are only using the ...
-1
votes
1answer
65 views

odd matrix operation [closed]

This is for the case of a 10 x 10 matrix. I have the matrix ...
3
votes
2answers
156 views

A function which maps $(ax + by)(cx + dy) \mapsto (a \partial_x + b \partial_y) (c \partial_x + d \partial_y)$

I am new to Mathematica and, as the title says, looking for a way of mapping (for example) the polynomial $$(ax + by)(cx + dy) \mapsto \left(a \frac{\partial}{\partial x} + b \frac{\partial}{\partial ...
0
votes
1answer
51 views

Symbollic integration and differentiation of operated functions

This question is a continuation of this one. I used the answer provided in the previous question to write this code ...
14
votes
2answers
444 views

How I can define this operator in Mathematica?

I want to define an operator $G$ such that $$G(f):=\begin{cases}f(\{x\}),&\lfloor x\rfloor\text{ is even}\\\frac1{f(\{x\})},&\lfloor x\rfloor\text{ is odd}\end{cases}$$ for any function $f$, ...
2
votes
0answers
57 views

Defining the Distributive Depth of an Operator

I am working on defining the relations between Bras and Kets in Mathematica, and I am using the CircleDot operator to represent multiplication. I seem to have some trouble defining how operations on ...
12
votes
2answers
348 views

What is the best way to define Wirtinger derivatives

Wirtinger derivatives ( also called Cauchy operators) in complex analysis are widely used tools. They are defined in the case of one dimensional complex plane as follows $$\frac{\partial}{\partial z}=...
0
votes
0answers
168 views

Defining a complex partial differential operator

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

Custom opaque operator with custom axioms?

Is there any way to define a custom opaque operator/function in Mathematica that satisfies custom axioms, so that the Mathematica engine can perform simplifications using those axioms? For example, ...
1
vote
0answers
69 views

How can I realize operator $\frac{D}{e^D-1}$ in Mathematica?

Especially if it is applied to an integral of a function. So, I need for a given function f[t] the following: $\frac{D}{e^D-1} \int_0^t f(t)dt |_{t=\omega}$
4
votes
1answer
651 views

Proof of the Dirac-$\gamma$ matrices identity

Given the matrices $\gamma_{k}=\begin{bmatrix} O & -i\sigma_{k}\\ +i\sigma_{k}& O \end{bmatrix}$ where $\sigma_{k}$ is the $k^{th}$ Pauli matrix $\gamma_{4}=\begin{bmatrix} I^{2} &0 \...
8
votes
4answers
505 views

Change Operator Precedence of --> operator

I am trying to use --> operator with highest precedence ...
0
votes
0answers
229 views

Defining a del operator [duplicate]

I understand the Grad function is a mean to taking the gradient of an arbitrary function. However, I'd like to define the Del ...
1
vote
2answers
128 views

Problem with Distribute and Composition

I'm having trouble with the following. When I try to expand an expression like Through[Distribute[g@*(f@*g + g@*f), Plus]@x] I get what I would expect. That is, ...
3
votes
3answers
161 views

How make D[f,x] treat OverBar[x] as a constant

I have an expression of the form f = a*x +OverBar[x], where OverBar[x] is just a name, it has not much to do with the variable x. I want ...
9
votes
2answers
247 views

Which operators are missing from the official precedence table?

I often use the Operator Input Forms page as a reference for operator precedence as well as which (used or unused) operators exist. However, I just noticed that at least one operator is missing from ...
1
vote
0answers
97 views

Construct a univariate function pertaining to the space of $2 \times 2$ real matrices [closed]

Consider the space of uniformly distributed $2 \times 2$ real matrices \begin{equation} \left( \begin{array}{cc} a & b \\ c & d \\ \end{array} \right), \end{equation} with the restriction ...
3
votes
1answer
134 views

How to define “typed” objects and their operator specializations?

I've defined a primitive sort of type system where my objects are defined as lists with an associated identifier: ...
3
votes
1answer
628 views

Hadamard Lemma and commutators algebra

I would like to implement the following formula, which goes under the name of Hadamard Lemma: $ e^A \, B \, e^{-A} = \sum_{k=0}^{+\infty} \frac{1}{k!} [A,B]_k $ where $ [A,B]_0 = B , \...
2
votes
1answer
7k views

Difference between = and := [duplicate]

I wanted to know the difference between two operators: = and := I couldn't find the ":=" operator on the list at https://reference.wolfram.com/language/tutorial/Operators.html Can someone help? ...
4
votes
4answers
221 views

How to implement the action of a shift operator on arbitrary functions?

How can I expand expressions like $$(1-g(x)D)\frac{1}{1-f(x)D},$$ where $f(x),g(x)$ are some functions and $D$ is the shift operator defined by $Dh(x)=h(x+a)D$. What I'm trying to do is to formally ...
4
votes
1answer
573 views

What does “slash at” mean /@? [closed]

I searched "slash at" as well as "/@" to no avail. Consider Normalize /@ A I see the net effect, but what does /@ really mean? I understand that @ can be used ...
1
vote
0answers
50 views

Operator Splitting and Taylore series

I am not a user of mathematica so I am not sure if what I want to do is possible. Imagine I have the following cauchy problem: $$\frac{dw}{dt} = F(t, w(t)) = f1(w(t), t) + f2(w(t), t)$$ where I have ...
3
votes
1answer
99 views

Generating a list of values from the application of a sequence of operators

I have a module 'L' that reads: L[f0_,n_]:=Module[{ft=f0}, a[t]={}; Do[AppendTo[a[t], Inr[f0,ft]]; ft=U@ft, {n}]]; It takes an input function f0, applies ...
3
votes
2answers
176 views

Product of n different operators

I have a sequence of differential operators given by $H_n = x \frac{d}{dx} + n$ where $n=1,2,...$ and I would like to construct the operator $\hat{O}(n) = \frac{1}{n!}H_nH_{n-1}...H_2H_1$ as a ...
5
votes
1answer
1k views

I want to be able to define (a(x) d/dx + b(x))^n

I want to be able to define an operator $(a(x) d/dx + b(x))^n$ where $d/dx$ is the derivative operator and $a(x)$ and $b(x)$ are known functions and $n$ is a positive integer. Related Query: How ...
0
votes
0answers
310 views

Non commutative products and scalars

Say I have an expression such as $$a.(\alpha b)$$ where $a$ and $b$ are non-commutative operators, but $\alpha$ is simply a scalar. How do I tell Mathematica to treat $\alpha$ as a scalar and "pull" ...
1
vote
1answer
152 views

How to do matrix operation if the first matrix is an operator? [duplicate]

Suppose I have: mM = {{D[#, x]&, D[#, y]&}, {D[#, y]&, D[#, z]&}} v = {f[x, y, z], g[x, y, z]} I want to get $u=mMv=\{\frac{\partial f}{\partial ...
1
vote
1answer
84 views

What are rules in Mathematica and what are its uses? [closed]

I'm new to Mathematica. I have been going through the official reference and came across this article on rules to which I was led by a Google search on how to ...
4
votes
1answer
416 views

Defining a matrix with elements acting as operators

This question is directly related with my previous one. I'll try to be more specific here. I have a matrix {{a[x],b},{c,d}}, where ...
3
votes
2answers
203 views

Replacing multiplication of matrix elements by application of these elements as functions

I want to realize the following idea in Mathematica. I've got a matrix {{a,b},{c,d}} which is multiplied to a vector {h,k} ...
13
votes
2answers
254 views

Custom operator form for system functions?

There are some functions for which an operator form would make sense but isn't implemented. For example, I'd like to make this work: RandomSample[3] @ Range[10] ...
2
votes
2answers
113 views

Why is the square of a differential operator not evaluated automatically?

I defined an operator: py[f_[x, y]] := (I*h*D[f[x, y], y] - x) // Expand (not important, but it represents a simplified component of a quantum momentum in a ...
3
votes
2answers
147 views

Computing powers of the operator using symbolic computation

Suppose $t\in\mathbb{R_+}$ - some parameter, $V: \mathbb{R}\to\mathbb{R}$ - some function. I have an operator $S:f\mapsto S[f]$ that maps a function $f$ to a function $S[f]$: $$ S[f](x) = f(x+\sqrt{t})...
0
votes
1answer
463 views

what do those signs #1, #1^2, #1^3, & mean here? [duplicate]

I have read common pitfalls page and the documentation page but I still don't understand what do those signs mean here? ...
5
votes
2answers
527 views

How best to write an exponential of differential operators?

I want to evaluate a term like this, $$\left.\exp\left({1\over 2}\sum_{i,j=1}^{n}(A^{-1})_{ij}{\partial \over \partial x_i}{\partial \over \partial x_j}\right) f(\vec{x})\right|_{\vec{x}=0}$$ and I ...
0
votes
1answer
134 views

Differential equations expressed in operator form [duplicate]

Is it possible to make a workable operator representation of differential equations in Mathematica? I think it would make solving my differential equations easier, but I have no idea how to do it. ...