Questions tagged [operators]
Questions about using or composing operators--functional mappings from one state or vector space to another.
273
questions
0
votes
1
answer
62
views
Problems with defining a R(c)-linear operator
My objective is to define an opeartor op such that for every rational function $f(c)$ of a fixed symbol c, $op(f(c) x)=f(c) op(x)$. What is a good way to implement ...
0
votes
0
answers
70
views
Clebsch–Gordan coefficient calculation for L-S basis in system of three particles
I am trying to calculate eq (A3)
...
2
votes
1
answer
84
views
General solution of a differential equation
I'm a beginner in Mathematica and I'm learning about dealing with differential equations but I'm stuck in this problem
What I tried to do is I observed that I have the same differential operator ...
9
votes
1
answer
183
views
List[...] + Association[...], or Association[...] + List[...], when does the order matter?
Values of a list can be added to an association's values like so,
...
0
votes
1
answer
73
views
How to define a composition of operators?
If I define P[x]=D[#,x]& (derivative operator)
How can I define another operator $Q$ such that $Q(f(x))=Pf(x)+a$ (for example)?
Thanks.
0
votes
1
answer
47
views
Symbolic calculations with operator ordering
Given the following set of equations:
...
0
votes
0
answers
36
views
Taking sums of differential operators
If I define a differential operator:
T[i_] := D[#, x[i]] &
I am able to apply it multiple times to a function without any issues:
...
3
votes
3
answers
209
views
Finite Differences:
I am having difficulty implementing finite differences in the correct columns of my code.
...
2
votes
1
answer
87
views
Defining custom operators for indexed objects [closed]
I have some symbolic indexed objects $A_i$, $B_{ij}$, $C_{ijk}$, $D_{ijkl}$, etc.
I want to define a symbolic differential operator $\partial_{xy}$ that acts on these indexed objects in the following ...
7
votes
6
answers
480
views
Applying several functions to the same argument
Is there a more concise way of achieving the following result (possibly without d |->)?
...
2
votes
0
answers
78
views
How to define the square root of an operator [duplicate]
How can I define the operator $\sqrt{m^2-\frac{\partial^2}{\partial x^2}}$, such that it acts on the function $\psi(x)$ as follows: \begin{eqnarray*}
\sqrt{m^2-\frac{\partial^2}{\partial x^2}}\...
3
votes
3
answers
276
views
Apply central difference formula to a variable twice
I am working with finite difference methods analytically and I would like to be able to perform operations on subscripted variables.
I would like to generate the following expression by applying a ...
4
votes
3
answers
277
views
How can I construct a determinant-type differential operator?
How can I construct a determinant-type differential operator, where the multiplication of elements in the determinant represents the composition of multiple differential operators?
\begin{align*}
\...
0
votes
1
answer
60
views
Nested RowBox in MakeExpression reports error when I define my own curl operator, but the single RowBox in MakeExpression works well
I want to define my own vector notation so that the input \[Del] \[Cross] a outputs curl[a] while the ...
1
vote
1
answer
181
views
Doing algebra with differential operators
I'm doing some work on stochastic processes, where I use random functions which are defined by their properties over averages, i.e $$\langle f(t) \rangle =0 \\ \langle f(t) f(t')\rangle = \alpha(x,y) ...
0
votes
1
answer
90
views
Could Mathematica analytically work with operators (such as $\nabla$) and vectors?
I have the following expression: $$(\nabla+\vec{P})^2$$
where $P=(r\cos\theta sin\phi,r^4\sin\theta,r\cos^3\phi)$
I would like to open the brackets and simplify the expression.
Are there in ...
1
vote
3
answers
128
views
Is it possible to prevent two functions from commuting?
I have an expression of the following type:
x f[a] g[b]
where x is a number but f[a] and <...
8
votes
7
answers
2k
views
Can I use == to compare two list element wise?
I have the following lists Y and EY with actual and estimated outcomes.
...
2
votes
1
answer
109
views
How to define an operator like ⊕?
For example, I define the circle plus as
a_\[CirclePlus]b_ := a + b^2;
a__\[CirclePlus]b_ := (a[[1 ;;-2]]\[CirclePlus]a[[-1]])\[CirclePlus]b;
But when I try
...
1
vote
1
answer
51
views
How can I define an operator and plot its iterates?
I am trying to define a function (an operator) that "integrates then translates" a function. More specifically, for an input f[x], I want to integrate it as \int_0^x f[t] dt, then translate ...
1
vote
0
answers
252
views
How to define momentum operator for use with creation and annihilation operators in quantum mechanics
I am having trouble writing the momentum operator in the differential form to complete a piece of code shown here so that I can show a commutator [P,Q] = I .
Here is what I have done so far, and I ...
1
vote
2
answers
164
views
Replace with non-commutative product
I'm trying to evaluate some scattering amplitudes terms in Mathematica using the spinor helicity formalism. For that, I need to turn products like $\epsilon_i\cdot k_j$ into spinor product which can ...
11
votes
2
answers
214
views
How to make a function with two patterns listable?
Suppose that I have a function that has two patterns:
disksConstantRadius[radius_][points_] := Disk[#, radius] & /@ points
(noting that this would be better---...
1
vote
0
answers
118
views
How to define a vector operator?
I know how to define a single-variable differential operator like
Clear[Op]
Op[x_] := a D[#, {x, 1}] &
and I can do operations like
...
7
votes
1
answer
287
views
What does the operation Map[({...}=#;{...})&, ] do?
With reference to the answer by @Bill to the question posted here, I am trying to understand the following three lines
...
2
votes
1
answer
298
views
What's wrong with or? [closed]
Consider
Clear[x];
x = 2;
x < 2.9 || x > 3.1
This yields
True
So, everything is o. k. (interesting)
But when you replace ...
1
vote
1
answer
126
views
How do I make an operator that acts on a function with the function's argument explicitly given?
I am trying to make a finite difference operator such that it would behave similar to the partial derivative $\partial_{x}f[x]$.
$\delta_n[f[n],m] := \frac{f[n+m]-f[n]}{m}\ .$
I couldn't find a way to ...
2
votes
1
answer
63
views
Using Through function with vectors
I have the vectors defined as follows:
v1={x1,y1,z1};
v2={x2,y2,z2};
v12=v2-v1;
v21=v1-v2;
I am passing an integer function for iteration purpose as follows:
...
2
votes
1
answer
130
views
How to give a property to a list of functions?
For example, I have defined a bunch of binary functions Sum1, Sum2, Prod1, ...
2
votes
1
answer
87
views
Visualizing order of operations
TreeForm[HoldForm[ (9-2^2+10 8)/9]]
produces this:
Is there a way to use Divide instead of ...
2
votes
2
answers
115
views
Product of different differential operators
I need to define a multivariable differential equation of the type
$$
\mathcal{D}=\Theta_1^2-z_1(-\Theta_1+\Theta_2+\Theta_3+\Theta_4)(1+\Theta_1+\Theta_2+\Theta_3+\Theta_4)\\
\;\;\;\;\;\;\;\;\;\;\;\;\...
0
votes
1
answer
31
views
Confusing abnormalities observed when counting a specific operator in an expression [duplicate]
Recently I have met with some confusing abnormalities when trying to determine if there is a specific operator (usually Plus[] ) in an expression by programming. ...
2
votes
1
answer
87
views
How to convert an expression of several variables into an operator
Given the expression
How can I define the following operator like
g[u_, v_] := eq1
The correct definition is
3
votes
2
answers
164
views
How to subtract a list from certain sublists of a list? [closed]
I have a problem in doing an operation on this vector
{{2,3},{3,4},{5,6}}-{1,1}
I want to minus this to get the result
...
0
votes
1
answer
143
views
Second order differential operator in Mathematica
I am trying to write the code for the following expression in Mathematica:
$$\partial_{x} e^{-g x}=-g e^{-g x}+e^{-g x} \partial_{x}\,.$$
I was able to do so with the help of the following links with ...
0
votes
0
answers
58
views
How to write the expression for first order differential operator in Mathematica?
How to write the expression for first order differential operator in Mathematica?
What I mean to say that I want to evaluate
$$\frac{\partial}{\partial x}f(x)=f'(x)+f(x)\frac{\partial}{\partial x}.$$
...
3
votes
1
answer
98
views
Define an operator for long equations
I'm trying to workout a long expression with derivations, the thing is I can't seem to transfer this problem to code.
What I need is a operator $D = l^\mu \frac{\partial}{\partial x^\mu} $ where $l^\...
7
votes
1
answer
465
views
What operator is this?
I was looking at some sample code in a YouTube video and saw an "operator" (not sure this is the right term) consisting of a horizontal bar with circles on the ends. I searched through the ...
0
votes
2
answers
70
views
How to define specify parameter functions of a Sturm-Liouville operator & plot its effect on specific functions?
I have a Sturm-Liouville operator:
$$\mathcal{Ly(x)}=-\frac{\mathrm{d}}{\mathrm{d}x}\left(p(x)\frac{\mathrm{d}}{\mathrm{d}x}y(x)\right)-q(x)y(x)$$
but I do not yet know the parameter functions $p(x)$ ...
0
votes
0
answers
62
views
Is there a concise way to generate a continuous less-than relationship?
Actually, I have a ton of variables, Let me simplify it to 4 in this post.
vars = {a, b, c, d};
0 < Less @@ vars < 10
0 < (a < b < c < d) < ...
0
votes
2
answers
135
views
How can I remove the attributes "Orderless" from function Times stably and reliably?
Recently I have been doing some algebra of partitioned matrices, where product like below is common:
where $A_{11}, A_{12}, X, Y$ are all partitioned matrix blocks thus all are matrices in essence.
...
3
votes
1
answer
92
views
A possible issue in combination of the Infix operator ~ with Sequence [closed]
There are other similar questions on this site about using the Infix operator for more than two arguments, which I have read. But there is one thing that I wasn't able to understand and couldn't ...
1
vote
0
answers
122
views
Use self-defined operator symbol simplify formula
Mathematica is very useful and powerful in symbol compute, but some output isn’t concise if we didn’t simplify.
Can i predefined some operator? eg. Lie bracket. Here is a minimum example.
Suppose ...
0
votes
1
answer
73
views
Defining Numerical Integral Functional [closed]
In some sense the question is a combination of defining an operator and defining numerical integration with parameters. For example, I want to define $I[f] = \int_0^1 f(x)dx$. and tried
...
1
vote
2
answers
86
views
System of rules transformingn a multivariate polynomial onto corresponding partial derivative operator
I take a complex multivariate polynomial, and I want to transform it into the corresponding differential operator. I.e., I am looking for the set of rules transforming variables to derivation, ...
2
votes
1
answer
716
views
Simplifying quantum operators (ladder operators with multiple modes)
Similar to this question, I am interested in working with an implementation of quantum ladder operators.
I've been trying to use this "Quantum Mathematica Package" to solve some lengthy ...
3
votes
0
answers
207
views
Commutator of QFT Operators $[\hat{a}_p, \hat{a}^\dagger_k]$ and 4-Momentum Integrals
I just recently started looking into CAS (i.e. i have very little experience in Mathematica), specifically for doing basic calculations in Quantum Field Theory.
For that i would like to define $\hat{a}...
0
votes
2
answers
228
views
How to create an operator which is a composition of a sequence of operators?
Suppose I have a sequence of operators $\partial_x$, $\partial_x^2$,..., $\partial_x^n$. I want to define an operator which is a composition of these $D_x^{(n)}=\partial_x\circ\partial_x^2\circ\cdot\...
7
votes
1
answer
215
views
Applying Operators inside complex expressions to argument with Through
I am developing some functions to help me work with Quantum Mechanics Momentum Operators. Here, for simplicity, I represent them with these simple functions because the actions of the operators ...
1
vote
2
answers
170
views
How to make a change of variable $y=x^2$ in the differential operator $\frac{d^2}{d y^2}$?
I have this differential operator
$$\frac{d^2}{d y^2}\qquad (1)$$
I want to make a change of variable $y=x^2$ in $(1)$ so that I get this differential operator
$$ \frac{1}{4 x^2} \frac{d^2 }{d x^...