Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [physics]

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

1
vote
1answer
95 views

Solving the eigenvalue problem for a double well potential using a 1D particle in a box as a basis set

My first question is how would I go about getting the 1D particle in a box eigenfunctions using matrix techniques and how would I use the particle in a box eigenfunctions as a basis set for the ...
4
votes
1answer
164 views

Dynamic, nonlinear, damped Euler–Bernoulli beam equation

I would like to solve the 3 coupled PDEs describing a damped, nonlinear (i.e displacements in the $x$ direction along the beam need to be considered along with the $y$ displacements normally ...
0
votes
1answer
32 views

NSolve cannot work with MinValue?

I am trying to solve the following problem: find the smallest value of $b$ such that the inverse of the solution u[p] given by ...
1
vote
0answers
33 views

HypExp and HPL packages for hypergeometric functions: Evaluating a function HPL[{minus,plus},x]?

I am currently using the HypExp and HPL packages, which are useful for expanding hypergeometric functions in series around integer or half-integer values, as in common in dimensional regularization ...
0
votes
1answer
28 views

Is NDSolve being precise here? Light deflection angle

I am currently trying to calculate deflection angles for the path of photons near Schwarzschild black holes, using the formula $$\Delta\phi=2\int_{r_0}^\infty \frac{dr}{r^2\sqrt{1/b^2-1/r^2(1-1/r)}}$...
1
vote
1answer
84 views

Plotting and Animating Spherical Spring Pendulum

first post and somewhat new to Mathematica. Extremely new to making animations in Mathematica. My goal is to make a 3D animation of a Spherical Spring Pendulum system for a personal project. I ...
0
votes
1answer
38 views

Solve nonlinear differential equation system (Plot solution)

When I solve the system of differential equations I get two solutions for each variable (See the picture). My question is how I can neglect one of the solutions at the plot (The yellow and the blue). ...
0
votes
0answers
31 views

Solve nonlinear differential equation system - Plot

When I solve the system of differential equations I get two solutions for each variable (See the picture). My question is how I can neglect one of the solutions at the plot. Thanks. Code: ...
1
vote
1answer
48 views

Taking the limit of a parametric function produced by ParametricNDSolveValue

I'm working on a project for hard-sphere scattering, and to solve the for the phase function $\overline{\delta}_l(k,r)$ I use the variable phase equation $$ \frac{d\overline{\delta}_l(r,k)}{dr} = -\...
0
votes
0answers
42 views

Graphene layer rotation

I made single layer graphene by using Code as below: ...
2
votes
2answers
75 views

Spinning top: how to plot position on a sphere?

I am modelling a spinning top on a sphere and I want to obtain plots such as these I have solved the equations of motion ...
5
votes
2answers
180 views

Black hole orbit in Mathematica

I am currently investigating the motion of a particle around a black hole. The Lagrangian for the system is $$ \mathcal{L}=F(r)\dot{t}^2-\frac{\dot{r}^2}{F(r)}-(r\dot{\phi})^2 $$ Where $ F(r) = 1 - ...
0
votes
0answers
55 views

Jupiter as a Circular Mass Ring

I am trying to model the planet Jupiter as a uniform circular ring of matter and calculate the central force inside of it. This ring has the Sun as its center and defined by its linear mass density <...
0
votes
1answer
46 views

Trying to evaluate NDSolve inside of FindRoot

I want to find the equation for the range of a projectile as a function of its elevation angle at launch. Currently, I am stuck in my effort to calculate the time. What I have doesn't work right ...
0
votes
1answer
56 views

Equation of motion of a system

I am studying the problem in Vibration effects. I would like to obtain the simplified equation of motion in (2.7). ...
0
votes
0answers
71 views

How can I get a numerical value from a function?

I am a Mathematica beginner working on a problem in the area of quantum mechanics. I adapted this source code to work with the problem I'm trying to solve. At present, the graphics produced by the ...
0
votes
0answers
31 views

Assumptions in integration

I am trying to evaluate the integral $$ \int_0^{2\pi}\frac{D_{11}^2+2D_{12}^2+D_{22}^2+D_{33}^2}{1+e\cos x(t)}dx $$ Where $D_{ij}$ are third derivatives wrt $t$ as defined below. ...
1
vote
1answer
100 views

Having trouble working with two mass, three spring dynamic system

I am following a dynamic analysis example https://www.math24.net/mass-spring-system/ and trying to implement it in Mathematica. However, I am having trouble even getting simple properties like the ...
0
votes
2answers
105 views

How can I know how many points are used to by the interpolating function returned by NDSolve?

In a problem in which the solution has oscillations that I solved, the amplitude of the oscillations is much lower than I expected. It looks as if the interpolating function doesn't use enough points ...
0
votes
1answer
62 views

Gravity inside the earth with non-uniform density [closed]

I want to compute gravity inside the earth in different layers I have their thickness and density, can you please help me which formula I can use for this?
0
votes
1answer
93 views

Why does Monte Carlo integration underestimate my integral as integration range increases?

I'm having a huge problem with Monte Carlo integration. This simple example adequately shows the problem. ...
6
votes
2answers
202 views

Conductance from Landauer-Buttiker approach

I have a single-rectangular potential barrier in graphene. The transmission $T(E,\theta)$ is given by $$T(E,\theta) = \left[1+\left(\frac{V}{\hbar v_Fk_x}\right)^2\tan^2\theta\sin^2(k_xD)\right]^{-1}$$...
3
votes
1answer
72 views

WhenEvent - energy conservation not valid [closed]

I would like to simulate the following conservative system, with purely elastic impacts (coefficient of restitution is 1). Applying the WhenEvents the energy of the system is not conserved. How can I ...
0
votes
1answer
29 views

How to combine a ContourPlot with a Manipulate[Parametric Plot]

I have this code of an orbit at a Lagrange Point of the Sun-Jupiter system ...
1
vote
2answers
91 views

Stability of collinear Lagrange points

I am currently simulating the restricted 3-body problem in Mathematica. I have identified the Lagrange points and their coordinates. Now I want to see how particles move in their vicinity, to check ...
1
vote
1answer
90 views

Cutting off some terms from a matrix

I'm working with perturbation in differential geometry. I got a huge matrix for Christoffel symbol, and I need to simplify it using the consideration that $\phi^2$, $\psi^2$, $\phi\partial_{\mu}\phi$, ...
3
votes
0answers
87 views

Stationary 1-D Schrodinger equation for calculating energy of a -CH3 group quantum rotor in a metal organic framework

I am trying to calculate the energy of a quantum mechanical rotor by plugging a potential function predicted from DFT calculations in this paper: DOI:10.1039/C8CC02650E The potential can be ...
8
votes
2answers
150 views

Proper use of NDSolve in the context of the reduced 3 body problem

I am currently trying to solve the reduced three body problem in Mathematica. I have the equations of motion $\ddot{x}-2\dot{y}=-\frac{\partial\Omega}{\partial x } $ $\ddot{y}+2\dot{x}=-\frac{\...
1
vote
1answer
73 views

Contour Plot of planetary motion in Mathematica

I was trying to make the contour plot on $(v,r)$ axis for planetary motion for different orbits to check for bounded and unbounded motion. This is what I tried ...
0
votes
1answer
42 views

Syntax Error in NDSolve Code [closed]

I am trying to solve the motion equations for the Trojan Asteroids in Sun-Jupiter system. However, i am getting this error Syntax: '(' cannot be followed by 'x[t],y[t]' in this code ...
1
vote
0answers
26 views

How can I put the gradient of a scalar field in xAct? [closed]

[ for example the gradient of scalar field to square in the Gauss-Bonnet action?
1
vote
1answer
54 views

Integrating a incredibly long expression, whenever I try to use Monte Carlo I got complex answers

I am trying to integrate a recursion relation that is formulated via conformal invariance. The expression if copy and pasted from Mathematica to Word is over 20,000 pages long. Below is an ...
1
vote
0answers
64 views

Animating a 3D plot of electromagnetic waves

Could an expert on this site guide me in making an animated 3D plot of electromagnetic waves? I would like the user to be able to change the polarization interactively. Also, I would like to run ...
0
votes
1answer
112 views

What is wrong with this MonteCarlo? [closed]

I am making a trial for a MonteCarlo. In this code I simulate 10 protons hitting on a slab of gold: ...
3
votes
0answers
45 views

Sneg Library - Number operator simplify

I am trying to use the SNEG Library for evaluating some commutators. For instance I am trying to evaluate $$ \left[n_1^2,a^\dagger_1\right]$$ with the code in Mathematica ...
0
votes
1answer
72 views

Finding the limit of a function

I have the following code: ...
10
votes
3answers
333 views

DFT for Helium atom

I'm trying to solve this problem I'm not a Mathematica expert, but my program works perfect when vhartree={0,0,..,0} This is the program I wrote: ...
0
votes
1answer
35 views

Cannot set DownValues to ValueList while loading package

I have installed a package named HEP from Wolfram Library Archive which contains several .m files by Files -> Install (...
3
votes
2answers
195 views

How to numerically solve the Schrödinger equation for Lennard-Jones potential?

Hi I have a potential like below: V[x_]:= 102*(4343/x^12 - 650/x^6) + 33/x^2 Which is a kind of modified Lennard-Jones potential. Schrödinger equation is 1D ...
2
votes
1answer
58 views

How can NDSolve be used to get just the positive or just the negative energy solution to the Klein-Gordon equation?

The Crank-Nicolson technique below is obtained from: "http://reference.wolfram.com/language/tutorial/NDSolvePlugIns.html" ...
4
votes
1answer
242 views

NDSolve aborted

I'm trying to simulate the formation of vortices in a BEC condensate with Mathematica. This problem was solved a long time ago (see this paper). After making several experiments and changes in the ...
2
votes
1answer
78 views
0
votes
1answer
49 views

Filter out eigenvalues in NDEigenfunction

I am going to solve TISE for logarithmic potential in two dimensions. For bound state solution, the energy eigenvalues are to come negative. This is my code: ...
1
vote
0answers
68 views

Problem with Wick Contraction

I'm trying to compute wick contractions knowing that: $\langle a_a a_b \rangle = \delta_{ab}$. So far I've the following ...
0
votes
0answers
71 views

Need a method to solve a nonlinear PDE with gradients of the same order as the PDE's

I have a system of first order non-linear PDE's, but some of my boundary conditions are also of first order, so mathematica cannot solve it. When I looked online for similar problems , I found some ...
7
votes
1answer
333 views

Solving the Schrödinger Equation by exact diagonalization

I am solving the Schrödinger equation via finite difference, via the substitution where we are assuming $V_1 = V_N = \infty$. I solved this using Mathematica for the case that $V(x) = 0$ and get the ...
0
votes
0answers
97 views

FiniteElement and NDSolve won't work

I need to solve a system of DE's in 2 dimensions over time, The problem is that mathematica complains when I have a boundary condition of the same order as the differential order of the DE's, so I ...
1
vote
0answers
62 views

NDEigensystem works for 3-D Schrodinger Equation but not 4-D

NDEigensystem works fine for the following 3-D Schrodinger Equation code -- Clear["Global`*"] Rcube = ImplicitRegion[-1 <= x <= 1 && -1 <= y <= 1 && -1 <= z <= 1, {x,...
1
vote
0answers
59 views

Having trouble finding the path of a projectile with NDSolve [closed]

I have a system of differential equations that models throwing a projectile with air resistance. I want to find the value of $a$ that will maximize the distance of the throw. I don't know why, but I ...
7
votes
1answer
136 views

Suggestions to increase the speed of a fugacity calculation

I'm writing code to simulate a chemical reaction. This requires the calculation of the fugacity of a mixture of gases. The underlying model is the SRK equation of state. First the physical ...