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
3answers
344 views

Iterated differential operator

I would like to implement the following differential operator in Mathematica, $$\prod_{j=1}^n \left({d \over dx}-j\right)$$ On a case by case basis, I can just expand it out and write things in terms ...
1
vote
0answers
47 views

Precedence of @@ vs /@ [closed]

How do I find what I think is called the "precedence" of a given operator. That is, for the following code: ...
3
votes
2answers
50 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 + \...
2
votes
0answers
23 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 ...
4
votes
1answer
101 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
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 ...
-5
votes
3answers
429 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 : ...
7
votes
2answers
308 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 ...
19
votes
1answer
164 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 ...
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
44 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 ...
0
votes
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 ...
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
78 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
33 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
85 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): ...
10
votes
4answers
386 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
106 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
75 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 ...
0
votes
2answers
167 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
147 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
4answers
158 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
120 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
115 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
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 ...
1
vote
1answer
78 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
90 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
55 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 ...
21
votes
4answers
970 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
352 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
92 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
282 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
88 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
113 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
83 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
293 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? ...

1
2 3 4 5