Questions related to the application of Mathematica to problems in physics.

learn more… | top users | synonyms

37
votes
5answers
10k views

Find eigen energies of time-independent Schrödinger equation

I'm trying to get the eigenvalues of a one dimensional time-independent Schrödinger equation, $-\frac{h^2}{2m_0}\frac{d^2\psi}{dx^2}+U(x)~\psi=Ei~\psi$ where U(x) is some potential and Ei is the ...
37
votes
4answers
4k views

Is there something like DensityPlot3D to visualize atomic orbitals?

I'm visualizing some hydrogen like atomic orbitals. For looking at plane slices of the probability density, the DensityPlot function works well, and with something ...
22
votes
3answers
1k views

Create an adaptive amount of local variables for error propagation

I intend to write a function which calculates the result and the error for any formula with any amount of variables using the Gauß Error Propagation. The error $\mathrm{d}R$ for a function $R(a,b,c)$ ...
40
votes
8answers
7k views

Circuit drawing in Mathematica

This past semester I taught an introductory electromagnetism course and had quite a nice time using Mathematica to draw all sorts of figures and diagrams (mostly for problems and etc.). However, I was ...
6
votes
2answers
1k views

How to change coordinates of a differential operator?

I'm doing a basic quantum mechanics problem and am trying to learn how to do it in Mathematica. Any help would be much appreciated. $\vec{L} = \vec{x} \times \vec{p}$ where $\vec{x}$ has components:...
4
votes
1answer
785 views

NDSolve with vector function

(Possible duplicate yet I still can't understand.) Basic 2D revolving around origin: ...
47
votes
1answer
4k views

Measuring fractal dimension of natural objects from digital images

This is a useful topic. A college physics lab, medical diagnostics, urban growth, etc. - there is a lot of applications. On this site by Paul Bourke about Google Earth fractals we can get a high ...
31
votes
3answers
1k views

A better “VisibleSpectrum” function?

Since ColorData["VisibleSpectrum"] is wrong, I would like to have a more accurate function to use. Can this information be extracted from Mathematica itself?
20
votes
1answer
679 views

How to numerically solve a 1-d time-independent Schrödinger equation?

The point is to solve the eigensystem of the given Hamiltonian. I tried ParametricNDSolve combined with FindRoot to search for ...
22
votes
2answers
3k views

Animation of double pendulum

Sadly, I am a completely newbie. I am studying Physics and in our theoretical physics class we got the task to solve the double pendulum using Mathematica. We just got the program, but no introduction ...
21
votes
4answers
3k views

Convert spectral distribution to RGB color

Presume that I have a spectrum as a function of wavelength (an example being the blackbody spectrum): I want to convert that to a single RGB color to display on-screen, i.e. the "color" of that ...
13
votes
2answers
524 views

Pull out scalars from NonCommutativeMultiply in commutator of SU2 spin algebra

I am trying to work on spin chains in Mathematica. That is, N spin-1/2 on a one-dimensional lattice with periodic boundary condition (N+1=1). I need therefore the SU2 spin algebra $S_z, S_+, S_-$ with ...
8
votes
3answers
1k views

How to manipulate gauge theory in Mathematica?

I want to know if there is a way of typing into Mathematica an expression like the following, $$\epsilon^{\mu \nu \lambda} f^{abc} A^a_\mu A^b_\nu A^c_\lambda + g\epsilon^{\mu \nu \lambda} A^a_\mu \...
9
votes
3answers
300 views

Labeling solutions of an Eigenvalue equation involving Bessel functions

I'm solving the Schrödinger equation for a particle in an annular geometry with hard wall boundary conditions and I've reduced it to the following equation: $$J_m(k\,R_1)\,Y_m(k\,R_2) - J_m(k\,R_2)\,...
9
votes
1answer
1k views

Schrödinger eigenvalue problem in two dimensions (Harmonic Oscillator)

I read here the discussion about how to solve a one-dimensional eigenvalue problem. I am wondering, how can one generalize these methods to two dimensions? For example, how to solve this equation: $$...
30
votes
2answers
3k views

The Orbit and Perigee of the Flamsteed comet

Historical context This year we have the 330-th anniversary of the Battle of Vienna - one of the great formative events of European history, it took place on September 12, 1683. Kara Mustafa, Grand ...
14
votes
3answers
1k views

Constructing a symbolic Hermitian matrix

I need to construct a symbolic Hermitian matrix like m = { { n, a, b, b}, {Conjugate[a], n, b, b}, ... } but I am not able to set ...
41
votes
6answers
3k views

ColorData[“VisibleSpectrum”] is wrong?

I am trying to visualize the visible spectrum using the built-in ColorData["VisibleSpectrum"] function which "colors based on light wavelength in nanometers". But I ...
14
votes
3answers
923 views

How can I simulate this toggle mechanism?

I've been introduced to Mathematica very recently. Basically, I haven't actually "solved" anything in my Mathematica lifetime, but I've done some simulations. With my fractional knowledge, I tried ...
13
votes
2answers
797 views

How to calculate position from 3 dimensional acceleration data?

I discussed this problem yesterday with Pickett here. We concluded that the best solution may be just Interpolate and then ...
10
votes
1answer
1k views

Drawing a graph with specified edge lengths

I was wondering if it was possible to ask Mathematica to draw a graph provided some set of vertices: $(v_1, ..., v_N) \in V$ connected by $M$ edges $(e_1, ..., e_M) \in E$, where the length of each ...
7
votes
3answers
402 views

FEM Solution desired for “Plate with orifice” deflection: Application of Boundary Conditions and use of Regions

I found the deflection of an orifice plate (circular plate with a hole) subject to uniform pressure using Mathematica's NDSolve functionality. The plate is fixed at its outer circumference and is ...
4
votes
1answer
183 views

Recognize physical constants?

Is there some way to ask Mathematica to recognize physical constants, such as 32 or 9.81 (gravitational acceleration, in different units, at Earth's surface)? I have in mind something like the "...
2
votes
2answers
241 views

Attempting to use NDSolve to plot harmonic oscillator solutions

NDSolve[{ (-y''[r]/1880) + (470 (0.04077)^2 r^2 - 48 + 1/(1880 r^2)) y[r] == 0, y[0] = 0, y'[0] = 0}, y, {r, -4, 4}] I use this but get errors and am ...
9
votes
2answers
343 views

Boson commutation relations

I have tried to adapt this answer to my problem of calculating some bosonic commutation relations, but there are still some issues. The way I'm implementing the commutator is straightforward: ...
2
votes
1answer
463 views

Calculate scalar potential from electric field

Is it possible for Mathematica to solve an equation like $\nabla f(\mathbf{r}) = - \mathbf{E}(\mathbf{r})$ for $f(\mathbf{r})$? I tried ...
2
votes
1answer
148 views

Equal flow boundary conditions

I'm having the following issue that can not find a solution , by using this boundary condition v[0, t] == u[1, t] that Mathematica does not understand, someone ...
0
votes
1answer
264 views

How to plot and visualize a single linear vector in 3D? [closed]

I have a vector (in physic) designated as F1=250cos(60)i+250cos(60)j+250cos(45)k, and i would like to see it in a 3D graphic with the axis centered at the origin, after what i would include other ...
7
votes
2answers
422 views

Plotting 2-D Electron Density Carbon Atoms

I need to create a 2-D electron energy density plot in Mathematica to compare with my STM experimental results in my lab class. This would be done by plotting the sum of the symmetric and anti-...
9
votes
1answer
2k views

Interactive steam tables and phase diagrams in Mathematica

I teach an undergraduate course in Thermodynamics and I would love to use Mathematica to demonstrate the various engineering processes that involve the expansions and compressions of steam and common ...
8
votes
1answer
377 views

Diverging solution to coupled second order ODEs from NDSolve

For a physics application I am considering the radial Bogoliubov-de Gennes equations in two dimensions. In dimensionless form they read as follows $$ \begin{cases} \bigg[\frac{1/4-m^2}{r^2}+2(E-1)\...
6
votes
2answers
403 views

Time evolution/dynamics of circular plate with hole (Biharmonic equation and stiffness)

On this Mathematica.SE form, there exists information on how to use Mathematica to demonstrate the vibration of a circular membrane and the deflection of an orifice plate (the latter I had raised ...
3
votes
1answer
389 views

Introduction to Vectors and NDSolve

I want to use NDSolve for a complicated equation that contains vectors. I am still new to Mathematica, and have really enjoyed what I have learned thus far. Concerning this question, I have already ...
2
votes
1answer
163 views

Operator operation

There are two basic operators r={x,y,z} and p=-I*h*{D[#,x] , D[#,y], D[#,z]} &. The angular momentum operator is defined as $...
1
vote
1answer
241 views

Why Integral does not converge?

I am trying to solve for $\Omega$ this nonlinear integral equation: $$1+\dfrac{z}{k^2}-\dfrac{z^2}{K_2(z)} \dfrac{\Omega}{k^3} \displaystyle\int_{1}^{\infty} \gamma^2\, \text{ArcTanh} \left(\sqrt{\...
5
votes
3answers
250 views

Finding the conditions for degenerate solutions to a cubic equation

I have a cubic equation (corresponding to the band structure of a physical system) given by w in the code below. ...
3
votes
1answer
597 views

Animated Wave Propagation using Fourier & InverseFourier

This is a continuation off of previous help on the first part of my project: fourier issue arising from input miscommunication Now I want to go one step further in the current code. Here's the code ...
3
votes
1answer
616 views

Traces of products of Pauli matrices

Given a matrix $M$ of shape $2^L*2^L$, I would like to compute all the traces $\text{Tr}( M.(\sigma^{n_1}\otimes\sigma^{n_2}\otimes\ldots\otimes\sigma^{n_L})) $ for $n_1=1...4$, $n_2=1...4$, ..., $n_{...
3
votes
0answers
204 views

How to solve the Tsunami model and animate the shallow water wave?

Recently when I was learning differential equations, I noticed there is a shallow water wave equation to model the tsunami propagation. How to establish and solve the initial and boundary conditions ...
2
votes
1answer
217 views

2D Fourier transform of a few (4) disjoint discs on a plane

I'd really appreciate some advice. Short Version I'm trying to calculate the following $$ \psi(X,Y,z=d)=\underset{aperature}{\iint}\psi(x,y,z=0)e^{-i\frac{k}{d}\left(xX+yY\right)}dxdy\\\psi(x,y,z=0)=...
2
votes
1answer
396 views

Finding 111 plane of Carbon Diamond

All, I looked at the example on the Mathematica Website with the Carbon Diamond Lattice. Example I am referring to I am wondering is there a way to highlight an individual plane such as the 111 or ...
1
vote
2answers
294 views

Inputting two arrays for a module in Mathematica

I am relatively new to the Mathematica enviroment and not sure where I am going wrong. I have evaluated the question and understand it, but dont know how to exactly create a module for it. The ...
0
votes
1answer
86 views

Problem simulating a wave on a string by solving the wave equation as a difference equation.

This is a question I posted earlier however the purpose of what I'm doing is going to be expounded much more clearly. ...
0
votes
1answer
133 views

Plotting results of numerical differential equation

I'm numerically solving the ODE equation $a = -kv$, i.e. $ x'' = -kx'$. sol = NDSolve[{y''[x] + 0.1 * y'[x] == 0, y[0] == 0, y'[0] == 10}, y, {x, 0, 100}] I need ...