Wolfram Mathematica

Welcome! This is the main Mathematica chat room for mathematic...
Dec 11, 2018 06:15
particularly can i use to solve for a parameter that gives me a particular eigenvalue for an eigenvalue problem..
Dec 11, 2018 05:49
Would someone be willing to answer a few questions about ParametricNDSolve in mathematica..
Oct 24, 2018 05:45
is there a more seamless way to do it?
Oct 24, 2018 05:44
and then data = Import["np.csv"]
Oct 24, 2018 05:44
on the python side
Oct 24, 2018 05:44
import numpy as np

X = np.zeros((10,10))
for i in range(10):
X[i][i-1] = np.sqrt(i)
X[i-1][i] = np.sqrt(i)
np.savetxt('np.csv', X, delimiter=',')
Oct 24, 2018 05:44
ok..I was able to patch together something.
Oct 24, 2018 05:00
also, say I have a numpy array in python, I want to import that as a matrix into Mathematica..is their an easy way to do it using external evaluate or otherwise?
Oct 24, 2018 05:00
Oct 24, 2018 04:59
Another quick question I know Mathematica supports ExternalEvaluate and since 11.something I can do this by beginning an input cell with ">" which produces an external code cell..and say I wanna do something in python..I have multiple versions of python on my mac, how do i specify which python to use?
Oct 24, 2018 03:14
also would you happen to know using NDEigensystem or otherwise, how do i specifically compute eigenvectors for specific eigenenergies..
Oct 24, 2018 03:13
@b3m2a1 Thank you! :)
Oct 23, 2018 23:28
i havent been able to locate it in the documentation
Oct 23, 2018 23:28
How do i view the defaults for some method in mathematica. Specifically, Arnoldi i want to know the maxiterations and tolerance..
Oct 22, 2018 14:07
@user21 Yup! Found it Thanks! :)
Oct 22, 2018 06:50
Thanks for all your help! :)
Oct 22, 2018 06:50
I think imma call it day for now, and see if I can catch a hold of user21 tomorrow, and if he is free, pick his brain a little..
Oct 22, 2018 06:49
although I just tried NIntegrate for the first 2 eigenstates over the range I plotted them, and they seem to integrate to 1..
Oct 22, 2018 06:47
yeah I get what you mean.
Oct 22, 2018 06:45
Ahh okay, I didn't know that about NDEigensystem..but then again, it has no reason to expect that in general, I supposed.
Oct 22, 2018 06:30
also, the Interpolating functions that mathematica spits out, after assing them to something like y[x]:=.. I can just call them and treat them like regular functions while plotting, NIntergrating etc.?
Oct 22, 2018 06:27
i might try picking up the cell measure on a bigger computer
Oct 22, 2018 06:25
^I just converted the reduced mass i had in g from my problem to atomic units (hopefully correctly)
Oct 22, 2018 06:25
m2 = 1.16*10^-23*10^-3*1.097768382881*10^30
Oct 22, 2018 06:25
L2 = -1^2/(2*m2)*y''[x] + V2[x]*y[x];
Oct 22, 2018 06:24
my L2 is
Oct 22, 2018 06:24
at least qualitatively gives me a first eigenstate that hits zero at the right boundary, and decays on the left
Oct 22, 2018 06:24
Oct 22, 2018 06:20
{evals2, efuns2} =
NDEigensystem[{L2, DirichletCondition[y[x] == 0, x == -10^3],
DirichletCondition[y[x] == 0, x == 207.86985874369]},
y[x], {x, -10^3, 207.86985874369}, 50,
Method -> {"SpatialDiscretization" -> {"FiniteElement", \
{"MeshOptions" -> {MaxCellMeasure -> 0.01}}}}]
Oct 22, 2018 06:19
@b3m2a1 so..I have been dicking around with it for a bit..
Oct 22, 2018 02:35
I ran in the neighbourhood of the two walls, 35 and 208.and had to reduce the cell measure because it was taking way too long on my computer..do you know of a way to enforce the other BC
Oct 22, 2018 02:35
{evals, efuns} =
NDEigensystem[L2, y[x], {x, 35, 208}, 50,
Method -> {"SpatialDiscretization" -> {"FiniteElement", \
{"MeshOptions" -> {MaxCellMeasure -> 0.01}}}}]
Oct 22, 2018 02:35
V2[x_] :=
Piecewise[{{-\!\(TraditionalForm\`\(TraditionalForm\`6.\
516689755422356`*^-7\)\)*(x - \!\(TraditionalForm\`37.79451977158`\)),
x < 37.79451977158`}, {0,
37.79451977158` <=
x <= \!\(TraditionalForm\`207.86985874369`\) }, {10000,
x >= \!\(TraditionalForm\`207.86985874369`\)}}]
Oct 22, 2018 02:34
plotting the interpolating function from the o/p it sorta goes to zero where it is supposed on the right...but not on the left..
 

 The h Bar

General chat for Physics SE (physics.stackexchange.com). For M...
Nov 26, 2018 02:08
as far as i know for each value of M which runs from -1,0,1 the tensor operator should be proportional to a component of the vector cross product for the the case of K = 1, M = -1, I get that it is a linear combination of 2 components of the vector cross product, I am pretty sure this incorrect, unless someone here knows otherwise perhaps?
Nov 26, 2018 02:06
I am using the fact that the clebsch-gordan coefficients in the sum are zero whenever p+q =/= M
Nov 26, 2018 02:06
but, for $$[V^{(1)}\otimes W^{(1)}]^{(1)}_{-1} = (1/ \sqrt{2})V^{(1)}_{0} W^{(1)}_{-1} - (1/ \sqrt{2})V^{(1)}_{-1} W^{(1)}_{0} $$ i get terms that don't cancel out
Nov 26, 2018 02:06
I was able to show, $$[V^{(1)}\otimes W^{(1)}]^{(1)}_{0} = (i/\sqrt{2})(V \times W).\hat{z}$$
Nov 26, 2018 02:05
$$[V^{(1)}\otimes W^{(1)}]^{(K)}_{M} = \sum_{p,q} \langle 1,1; p,q| K,M\rangle V^{(1)}_{p} W^{(1)}_{p}$$

and $$V^{(1)}_{\pm 1} = \mp\frac{1}{\sqrt{2}}(V_x \pm iV_y)$$
$$V^{(1)}_{0} = V_z$$
Nov 26, 2018 02:05
Things are defined as follows
Nov 26, 2018 02:05
a quick question, I am trying to prove that tensor operators $$[V^{(1)}\otimes W^{(1)}]^{(1)}_{M}$$ are proportional to the three components of the vector cross product of V,W
Nov 8, 2018 05:03
i guess it is okay just to treat it as some external field..like we would in an ising model?
Nov 8, 2018 03:41
I have been given no information about the origin of this field or its physical significance by my lecturer..
Nov 8, 2018 03:41
so, I have been given a lattice gas with $$E_\nu = \frac{-\sigma}{N}\sum_{i,j}^{N}s_is_j$$ the coupling is weak but long range not nearest neighbour and asked to compute a canonical partition function in terms of a ghost field $\phi$ which has a gaussian distribution: $$p(\phi) \propto \exp(-N \phi^2/2kT \sigma) $$ what I don't get is what does it mean to use a "ghost field" in this case
Oct 26, 2018 04:46
yeah i am trying to look at transitions between a|x| and infinite box, with a slanted wall, ...and well in the large L limit (length of the box)..it is just a very shallow linear potential..I can sorta get the solutions to work out, but trying to write reasonable explanations and give me self some solid intuition is hard
Oct 26, 2018 04:04
I can't seem to get good intuition for it, and i can't seem to find a good enough source that discusses the subtleties in detail..
Oct 26, 2018 04:04
yeah..
Oct 26, 2018 04:03
@Semiclassical gotcha. so if it is just a linear potential in space, and no boundaries..it is indeed a continuum of energies isn't it?
Oct 26, 2018 03:13
clearly there is a gap in my understanding somewhere
Oct 26, 2018 03:13
I had a quick question about quantum mechanics, for a particle in a linear potential say -c*x, the energy eigen spectrum should be continuous? but we solve the time independent schrodinger equation by transforming it into a airy equation and then the roots of the airy function correspond to energies. I guess this is at odds with my intuition for the energy spectrum to be continous? but then the we normalise the airfunctions to a delta-function like we would for continous case...?