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.

8
votes
2answers
1k views

Adjusting Density Plot Color Function for Diffraction Simulation

I'm trying to simulate Fraunhofer diffraction by a single slit using DensityPlot I run the code: ...
2
votes
1answer
50 views

center of mass, total momentum

Has someone an idea how to solve the 1. question for ANY number of mass points and a clue to the 2. question? center of mass system, momentum
0
votes
1answer
75 views

center of mass system, momentum

when I have systems with 3 mass points ($m_i, i=1,2,3$) to a time $t=t_0$ on positions $\vec r_i(t_0)$ and velocity $\vec v_i(t_0)$. How could a syntax look like to calculate 1) center of mass 2) ...
0
votes
0answers
57 views

Plotting the first Brillouin zone

I'm trying to plot the first Brillouin zone from an equation I solved for this case. This is the code I used: ...
1
vote
0answers
47 views

Decay chain browser

This https://demonstrations.wolfram.com/IsotopeBrowser/ used to be an excellent tool to demonstrate decay chains to my students. Unfortunately it does not work under newer versions of mma. Can anybody ...
4
votes
2answers
224 views

Solving a nonlinear system of ODE with DSolve

I have been trying to solve the following system of ODE with initial values using the function DSolve. My code is : ...
0
votes
1answer
65 views

trajectory of a thrown object [closed]

I have a equation of motion v(t), that is integrated (t=0) to x(t). This symbolizes a trajectory of a thrown object. I want to create compared Plots for x(t) with different values for beta. When I try ...
3
votes
2answers
100 views

Initial values of position (x) and speed (v) of a particle visualizing using Mathematica

$$\vec{F}(\vec{r})=-m\omega^2\begin{pmatrix}x\\4y\end{pmatrix}$$ I have the force $F$ shown above. How could I specify the initial values of position ($x$) and speed ($v$) in Mathematica using the <...
2
votes
0answers
38 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 ...
1
vote
1answer
70 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)}}$...
0
votes
1answer
75 views

Solving a difficult differential equation

I've the following DE, describing a physical phenomenon. And the prupose is to solve that DE using Mathematica $$x(t)\cdot r+x'(t)\cdot l+a\cdot\ln\left(1+\frac{x(t)}{b}\right)=0\space\...
10
votes
1answer
789 views

Calculating density of states from lists of momentum/energy data

I am trying to calculate the density of states for a 2D system given certain band structure data organized in a specific format. Below is an example of my procedure: Beginning with a simple 2 x 2 ...
12
votes
2answers
908 views

Boundary condition with spatial derivative is ignored by NDSolve

Consider the following differential equation: $$\begin{align*}&\rho C_p\left(\frac{\partial T}{\partial t}\right)=k\left[\frac{\partial^2 T}{\partial x^2}\right]+\dot{q}\\ &\text{at }x=0,\;\...
4
votes
3answers
107 views

Plotting an Equation Using ParametricNDSolve

I'm trying to plot the solution of a set of differential equations and see how the solution changes when the value of a certain variable de is changed. The equations have solutions to the values of de ...
3
votes
0answers
237 views

How can I improve the solution of my PDE?

I want to improve the last code to find a better solution for umi. For now I'm using only MaxStepFraction. Also, when I put no ...
1
vote
2answers
173 views

Time-dependent Schrödinger equation and density plot

I'm interested in the density plot of the solution of a 1D time-dependent Schrödinger equation with a given potential. So I have: ...
0
votes
0answers
72 views

Potential with two variables [duplicate]

How would a procedure look like to calculate a potential$$ V(r)=-\int_0^r F(s) \,\mathrm{d} s $$ with example data: ...
0
votes
1answer
53 views

Finding the minimum points of a discrete trigonometric equation

Basically I'm trying to solve the equation $$A\Big(\sin(\theta_a-\theta_{a+1}) + \sin(\theta_a-\theta_{a-1})\Big) + B\Big(n_a^z \sin(\theta_a) - n_a^x \cos(\theta_a)\Big) = 0$$ subjected to the ...
3
votes
3answers
197 views

Work of a force field [closed]

I have a parameter curve in 3d: r1[t_] := {Cos[2 Pi t], Sin[2 Pi t], t} r2[t_] := {1, 0, t} r3[t_] := {1 - 1/2 Sin[Pi t], 0, 1/2 - Cos[Pi t]} with a vector field:...
4
votes
1answer
143 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 ...
3
votes
1answer
86 views

Using ImageTransformation to implement relativistic aberration effect

****The desired effect should be images that look like something out of Star Wars like when you are boosting to high speeds in the Millennium Falcon.**** This problem was tackled by Daniel Weiskopf ...
4
votes
1answer
226 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 ...
1
vote
1answer
75 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 ...
1
vote
1answer
93 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$, ...
12
votes
6answers
631 views

Solving this challenging ODE

Consider the ODE: $$w^{(4)}(x) + (L-x)w''(x) - w'(x) = 0 $$ with some of the following boundary conditions: free: $w'' = 0$, $w'''=0$, clamped: $w = 0$, $w'=0$, pivot: $w = 0$, $w''=0$. Two such ...
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
1answer
118 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
44 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
36 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
49 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: ...
5
votes
2answers
192 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 - ...
2
votes
2answers
79 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 ...
0
votes
0answers
59 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 <...
7
votes
1answer
347 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
1answer
101 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. ...
0
votes
1answer
47 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
60 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). ...
5
votes
1answer
111 views

Get Isotope Data and Electron Mass in Same Units - kg and Kilograms

I'm trying to find the nuclear mass of $^{238}\text{U}$. To do this, I subtract the electron mass from the atomic mass. I'd like to find the final answer in kilograms. I'd also like to use Mathematica'...
0
votes
0answers
74 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 ...
22
votes
5answers
11k views

How do I plot a plane EM wave?

I would like to display an electromagnetic (EM) wave. I have written code that works, but it does not "shade" the area between the graph and the axes. Both the ...
15
votes
3answers
601 views

Gravitational potential created by a thin disc using FEM and NDSolve

Context I would like to compute the torque that a (thin) disc applies onto a ring. I.e. I would like to try to understand what is the impact of this outer ring on the inner disc in the simulation ...
1
vote
1answer
105 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
0answers
32 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. ...
0
votes
2answers
109 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 ...
6
votes
1answer
98 views

What's up with PauliMatrix with a string argument?

Looking at the definition of PauliMatrix (not the documentation), I realized that it is defined for arguments 0, ...
5
votes
1answer
231 views

A 1D numerical integral Mathematica cannot compute, from physics

A well know result in theoretical physics is that a sum over Matsubara fermionic frequencies, i.e.: $$ S = \sum_{n=-\infty}^{\infty} h(\omega_n) \hspace{32pt} \omega_n=(2n+1)\frac{\pi}{\beta} $$ can ...
26
votes
3answers
3k views

1D Euler equations (fluid dynamics) with NDSolve

Is it possible to accurately solve the 1D Euler equations in Mathematica using NDSolve? For example, let us consider the Sod shock tube problem. Introduction to ...
14
votes
1answer
901 views

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

Backslide introduced in 9.0, persisting through 11.3. Recently when I was learning differential equations, I noticed there is a shallow water wave equation to model the tsunami propagation. How to ...