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
0
votes
0answers
30 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
0answers
33 views

How to compute gauge variation of expression?

Suppose I have a symmetric tensor field $h_{\mu\nu}$ I want to implement somehow the following gauge variation of this tensor field as follows $\delta h_{\mu\nu} = \nabla_{\mu}\epsilon_{\nu} + \...
0
votes
1answer
57 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): ...
5
votes
1answer
261 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 <...
3
votes
1answer
75 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 ...
0
votes
1answer
57 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
35 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 ...
0
votes
1answer
92 views

How to construct — based on physics-type notation — a magical simplex $\mathcal{W}$ of bipartite qutrits?

I have a short Mathematica program: ...
3
votes
2answers
103 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
56 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
4answers
135 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
41 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
45 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
70 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 ...
2
votes
1answer
37 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
96 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 ...
1
vote
1answer
52 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
vote
1answer
83 views

A program for finding the summation of an analytical expression

Consider the Baker-Hausdorff formula for two operators $A$ and $B$: $$e^BA e^{-B} =A+[B,A]+\frac{1}{2!}[B,[B,A]]+\frac{1}{3!}[B,[B,[B,A]]]+....,$$ where $[A,B]=AB-BA$. In the case of my problem, $[B,...
2
votes
2answers
39 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 ...
20
votes
4answers
850 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, ...
2
votes
2answers
304 views

=== not working properly [closed]

I've been trying to check the identity using wolfram Mathematica and I've found the following ...
1
vote
1answer
70 views

Reduction of differential operators

Suppose my code outputs the expression $$\frac{f^{(0,2)}(r,\phi )+r \left(f^{(1,0)}(r,\phi )+r f^{(2,0)}(r,\phi )\right)}{r^2}$$ This is simply the Laplacian $\nabla^2f(r, \phi)$. Is there a way ...
0
votes
0answers
104 views

Commutator of differential operators

Let $P_x = \frac{\hbar}{i}\frac{d}{dx}$, after specifying the commutator relation symbolically $[X, P_x] = i\hbar$, I can ask Mathematica to calculate commutator algebra. My question: is there a way ...
0
votes
1answer
71 views

Divergence and gradient operators in two dimensions

Divergence of a vector $\mathbf{a}$ can be numerically written as, \begin{eqnarray} \nabla \cdot \mathbf{a} \approx \sum_{i=0-9} w_i\mathbf{a(x+c_i)}\cdot \mathbf{c}_i \end{eqnarray} The lattice ...
0
votes
2answers
54 views

Sum over integer partition with variable function argument

Define $$\hat{X}(Y) = [X,Y] $$ I have known matrices $S_i$ and $V$. I am trying to use Mathematica to define a function which calculates $$ \sum_{\substack{n_1, \ldots, n_k>1\\ n_1+\ldots n_k = ...
0
votes
1answer
77 views

Lowering operator for spherical harmonics [duplicate]

I need to be able to generate all of the $ l=2 $ spherical harmonics using the lowering operator. The specific question is listed below. Any assistance would be much appreciated! Thanksenter image ...
0
votes
1answer
134 views

Partial trace and Partial Transposition of a matrix easily? [closed]

Could someone help me to understand as to how to compute the partial trace and partial-transposition of an arbitrary matrix? I mean, is there any code to carry out these operations in Mathematica? ...
2
votes
4answers
112 views

define an operator

How is it possible to define the operator $(x+\frac{d}{dx})^n$ as a function of $n$? I use op[x_] = (x + D[#, x]) &; with the action on, for example, $\cos(...
0
votes
2answers
70 views

A list of operators in the For cycle

I'm pretty sure that analogous questions have been asked here a zillion of times, but... I think it is pretty straightforward from the code what I expect it to give: ...
1
vote
0answers
20 views

Operator valued functions [duplicate]

For some parts of physics it is useful to define an operator valued function Take for example R[K_] := Sum[K[[j]] D[#, K[[j]]], {j, 1, 4}] It is supposed to be ...
2
votes
3answers
123 views

Noncommutative Expand into power series

I am new to Mathematica and am trying to apply it to quantum mechanics problems. The practice project I am dealing with now is considering quantum harmonic oscillator and ladder operator algebra ...
4
votes
1answer
60 views

Operator form for Histogram of multiple datasets?

I would like to plot a histogram for multiple datasets in a dataset query, but can't quite seem to make it work in operator notation: ...
5
votes
1answer
142 views

Associativity of upvalue

how can I ensure the following definition to be associative? Unprotect[Times]; a_ f[x_] + b_ f[y_] ^:= f[a x + b y] Protect[Times]; gives me ...
2
votes
1answer
92 views

Distribute operator

I have an operator defined by \[ScriptCapitalN] and want to Expand a term and then use ...
1
vote
0answers
50 views

Add operator symbols to matrices in Wolfram [closed]

I am working with the matrices of the form $u = \begin{pmatrix}Y &y\\0 & Y\end{pmatrix}$, and I have an operator $a$ such that $au=\begin{pmatrix}Y & ay\\0 & Y\end{pmatrix}$. Since y ...
5
votes
1answer
95 views

Indefinite order of differential operator

In the latest version of Mathematica, D can compute derivatives of symbolic order, that is, the $n^{\text{th}}$ (partial) derivative, returning an expression ...
2
votes
1answer
149 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
1answer
90 views

Commutator of block matrices

How to implement a commutator of matrices composed of operators? Background: Let $\hat A_{ij}$, $\hat B_{kl}$ be some sets of some operators. $\hat I$ is the identity operator. Their commutators are ...
1
vote
0answers
36 views

Del as a Differential Operator: (Matrix times Del) cross vector [duplicate]

I tried to reply to this answer, but don't have enough reputation points yet. Basically the poster constructed Del (i.e. $\nabla = \left( \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \...
0
votes
0answers
40 views

How do you treat gradient as a vector? [duplicate]

I need to express $\nabla = (\partial_x,\partial_y,\partial_z)$ as a vector, so that I can compute the differential operator given by $A\cdot\nabla$ (where here $A$ is a 3x3 matrix) using Mathematica. ...
0
votes
1answer
63 views

How can I define a derivation in Mathematica?

I would like to define a derivation in Mathematica. As an example something like this: for an operator O and operators $A,B$ in a two dimensional vector space with $$ O \times A = a \\ O \times B = b \...
0
votes
1answer
77 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 ...
4
votes
2answers
544 views

How to define a differential operator in Mathematica? [duplicate]

I want to define an operator $(\partial_{t}+1)^{2}=\partial_{t}\partial_{t}+2\partial_{t}+1$. Then, I want it to act on $t$. My code looks like this: ...
8
votes
1answer
172 views

Position-based Inline syntax for Curry

I would like to update an existing pseudo-curry function: • /: h_[pre___, •, post___] := Function[expr, h[pre, expr, post]]; that I use inline like this - the ...
0
votes
0answers
48 views

Non-commutative multiplication sign and constant treatment

By default, non-commutative multiplication behaves as (-W) ** (4 R) //FullForm ...
1
vote
1answer
51 views

Finding a pattern in sum of products of two or more variables with subscripts

I am trying (so far unsuccessfully) to isolate terms in an expression which are product of variables with a specific subscript pattern (the b_,_'s). I want only terms for which the first subscript ...
0
votes
0answers
75 views

How to use multiple placeholders to define a function that operates on special functions.

I am trying to understand if and how I can use multiple placeholders in order to define a function that will perform more than one operations on special functions; more accurately, sums, products, etc ...
2
votes
1answer
172 views

Linear operator algebra: How to distinguish scalars and operators?

In the book "A Physicist' s Guide to Mathematica" Patrick Tam introduces symbolic rules for an algebra of linear operators. Mathematically the rules are as follows, where upper (lower) case letters ...
0
votes
3answers
193 views

Calculating bracket operations [closed]

Is there a way to calculate commutation relations in Mathematica? For example, let's say I want to compute ; how can this be done?
0
votes
0answers
61 views

How to create operator variables and lists of operators?

I want to know if it is possible to create a variable that is an operator. (Please note I only started programming Mathematica today) For example, the partial operator $\partial_x$ i.e. ...