Skip to main content

Questions tagged [physics]

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

Filter by
Sorted by
Tagged with
3 votes
1 answer
76 views

How can I combine a selections of video frames into a composite using Mathematica?

I'd like to use Mathematica to be able to turn videos of my students dropping balls into a composit image of selected frames showing the path of the ball. Like a multiple exposure image. So far, I've ...
David Elm's user avatar
  • 415
0 votes
0 answers
49 views
+50

Improving accuracy of neural network for determining qubit rotation angle

The physics example problem (to illustrate the use of a basic neural network using Mathematica) I am looking at is a qubit rotated about the y-axis, where the rotation angle is discretized as $\...
John Doe's user avatar
  • 229
1 vote
0 answers
62 views

Why is NDSolve ignoring two PDEs out of three ones I am solving?

I am solving the following coupled system of 3 PDEs modelling a 1D membrane coupled to a 1D fluid flow field underneath. However, on putting them into NDSolveValue (and trying with FEM), it says the &...
Ariana Fenris's user avatar
0 votes
0 answers
48 views

Stabilise equations for motion of Inextensible string subject to spatially non-uniform forces

I would like to simulate the motion of an inextensible membrane in 1D as an inextensible string subject to spatially-dependent body forces. For now, I would like it to be constrained at both ends. I ...
Ariana Fenris's user avatar
1 vote
0 answers
35 views

How to simplify the results of squared amplitude calculations in FeynCalc?

I want to calculate the squared amplitude of the Feynman diagram of double-pion photoproduction using FeynCalc package. Here is the code I created: ...
Albert Copperfield's user avatar
3 votes
2 answers
117 views

Plot of Density of States Using DiracDelta Function [duplicate]

I am trying to plot the density of states $$ N(E)= \frac{1}{N}\Sigma_{k} (\delta{(E - \epsilon_{k}))} $$ where $\epsilon_{k} = -2t*[cos(k_x)+cos(k_y)]$ and $k$ goes from $-\pi$ to $\pi$. For this plot,...
CuriousMind's user avatar
0 votes
1 answer
99 views

Need explanation on data[[i]][[1]]

I am trying to train a physics model and then check its profile. For this model, data for physics model is defined with: ...
Dean's user avatar
  • 655
2 votes
2 answers
138 views

How to solve a matrix differential equation $\frac{d X}{dt} = i(X Y- Y^\dagger X)$?

In eq (21) on page-5 of this article, we have matrix HEP = (\[Omega]/2)*{{-2*I, 1}, {1, 0}}; and I am interested in finding matrix ...
User101's user avatar
  • 613
0 votes
0 answers
37 views

Covariant derivative of a Riemann tensor [migrated]

I'm trying to calculate the covariant derivative of a Riemann tensor, and I'm using the following way, but there is some problem in my calculations because my calculations do not match with the ...
MMS's user avatar
  • 87
1 vote
0 answers
81 views

How to decrease the computation timing while using NIntegrate?

I'm trying to calculate the $A$ and $F$ values by using this code, ...
Entangled Quark's user avatar
0 votes
1 answer
48 views

Trying to use NIntegrate and my code works intermittently - Throws one error consistently, but only gives me a partial result [closed]

I'm trying to do some calculations/simulations of pulse autocorrelations of non-integer orders and when I try to use NIntegrate it only works intermittently, and when it does work it only gives me a ...
UltrashortGiraffe's user avatar
1 vote
2 answers
88 views

How to demonstrate the acceleration using spherical coordinates and spherical unit vectors?

I've been trying to use Mathematica to demonstrate using spherical coordinates and unit vectors the acceleration for a particle moving in a sphere. Nevertheless, I'm actually not that skilled in ...
not_aphysicsdr's user avatar
0 votes
1 answer
96 views

Components of Faraday tensor

Maybe it's a very basic physics question but I'm confused and not sure if I should ask my question here. From this paper, I have the potential vector $$ A=A_t d t+A_\phi(d \phi-\omega d t) $$ where $$ ...
Dayzk's user avatar
  • 147
1 vote
0 answers
94 views

Implementation of a cavitation model

Problem formulation Hi, I'm following this reference and I am trying to reproduce Fig. 19: The problem concerns an underwater shockwave, which hits the water-surface and produces a cavitation region. ...
MOOSE's user avatar
  • 169
2 votes
0 answers
77 views

How to effectively substitute variables in xAct?

I am trying to find the gauge field equation by varying the Born-Infeld Action with the help of xact package. I use the following ...
codebpr's user avatar
  • 2,253
2 votes
1 answer
115 views

Graph of an ergoregion

I'm trying to graph the region defined by the following equation (which comes from the $g_{00}$ element of the metric (2.1) in this paper) $$ g_{00}=-f H+H^{-1} \omega^2 r^2 \sin ^2 \theta $$ which in ...
Dayzk's user avatar
  • 147
3 votes
1 answer
109 views

Varying Einstein-Hilbert action through xAct gives extra terms

I am trying to find the associated field equation by varying this action: $$S=\int d^4x \sqrt{-g}(\kappa \mathcal{R}+\Lambda)$$ This should give me the below field equation when I vary above w.r.t the ...
codebpr's user avatar
  • 2,253
4 votes
1 answer
136 views

Embedding plot of Minkowski

I am trying to obtain the embedding diagram of Minkowski space. I took the metric: $$ d s^{2} = - d t^{2} + d r^{2} + r^{2} \left( d \theta^{2} + \sin^{2} \theta d \phi^{2}\right) $$ for $t =$ cte and ...
Dayzk's user avatar
  • 147
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}}\...
Yu-Sen Zhou's user avatar
3 votes
1 answer
69 views

Peak Appearances in Plot Outputs from Optimization Routines

Dear fellow researchers and Mathematica enthusiasts, I've been working on a computational physics problem and encountered an interesting issue regarding the appearance of peaks in my plots, which I ...
Everlin Martins's user avatar
1 vote
1 answer
237 views

Differential complex equations in cosmological problem

I want to solve a differential equation of second order with complex initial conditions. Despite I have wrote all the code with detail, I am still facing some problems I might want to review here. The ...
Julian Yussef's user avatar
9 votes
4 answers
458 views

Poincaré section of the particle motion near the black hole horizon

I am trying to recreate the Poincaré sections given in Figure 2 of this paper. For this purpose, I use the following two methods: Method1: Using ResourceFunction["ClickPoincarePlot2D"] <...
codebpr's user avatar
  • 2,253
2 votes
1 answer
113 views

NDSolveValue is unable to provide a solution because of boundary conditions

I have the following Mathematica code for solving a partial differential equation, which I took from this paper (page 6, 10) for B = 0 (which has ...
codebpr's user avatar
  • 2,253
0 votes
0 answers
43 views

How to get rid of division by zero errors in a vector field?

Im currently learning Mathematica and have little to no expirence. What im trying to do is plotting certain Fieldlines of a Dipol-Vectorfield. I found a Method that works as long as no line aproaches ...
uncreativ's user avatar
2 votes
3 answers
134 views

Issue in the calculus of inverse of terms from a list

to begin i want to warn you that i am a beginner in mathematica. I have to create a function that calculates the impedance total of an association of n (electronical) components. So the formula is 1/Z(...
ShoupinouZz's user avatar
3 votes
2 answers
116 views

Color issue with Plot

I would like to print different graphs, and print them in different colors. However, when I use the common way to write it, it doesn't work. For my project (physics electronic), I have created two ...
ShoupinouZz's user avatar
3 votes
1 answer
203 views

How to create an interactive Poincare section from the given code?

Here we discussed Poincare section for perturbed string model taken from the paper Chaotic dynamics of a suspended string in a gravitational background with magnetic field. We try to reproduce some ...
codebpr's user avatar
  • 2,253
1 vote
1 answer
75 views

Integrating Over a Conditional Time-Dependent Region

I'm experimenting with integrating over regions so I can check some physics simulations. Here's the rundown of what I'm attempting to do. I have a rectangle that I'm rotating with a parameter: ...
AelMinor's user avatar
3 votes
1 answer
149 views

Dirac equation for a Coulomb potential in 2D with NDEigensystem

I want to numerically solve the ground state wave function of the hydrogen atom with the Coulomb potential using the NDEigensystem. Here is the code to get the ground state wave function from the ...
AminD's user avatar
  • 51
2 votes
1 answer
130 views

Solving a ODE (Peeble's Equation) with initial condition a the maximum input range

I have a differential equation which is, $$ \frac{d X_e}{dz} = \frac{C_r(z)}{H(z)}\times \frac{1}{(1+z)}\Big[\frac{38\eta T^3}{25\pi^2}\alpha (T)X_e^2 - b(T)(1 - X_e) \Big] $$ Where $$ \alpha(T) = \...
Kazi Abu Rousan's user avatar
1 vote
1 answer
86 views

Metric tensor coordinate transformation with off-diagonal components

I know there is already an answer for this type of question given here: Computing the metric tensor under a coordinate transformation but the answer is not satisfactory as it is not clear to me how I ...
MathZilla's user avatar
  • 123
6 votes
2 answers
1k views

Numerically solving radial Schrödinger equation with Yukawa potential

I am trying to solve the radial Schrödinger equation using NDEigensystem but I am running into some issues. There are posts about doing this (see here for example), ...
MarcosMFlores's user avatar
0 votes
0 answers
29 views

Manual updating of function in Do loop

Previously I had asked a question about solving Maxwells equations with boundary conditions, here Machine overflow when defining boundary conditions. I have managed to successfully run the code ...
Jole Stock's user avatar
0 votes
1 answer
134 views

A code to calculate Einstein tensor [duplicate]

I use the following MA code to calculate Einstein’s tensor. I’m asking about the zero component of the Einstein’s tensor, is it correct? Because I think $G_{00}$ should contains the terms in the zero ...
Dr. phy's user avatar
  • 287
0 votes
0 answers
53 views

Calculating and collecting the terms of the zero component of the Einstein’s tensor

I try to calculate the $G_{00}$ of the Einstein tensor $G_{\mu\nu}= R_{\mu\nu} -\frac{1}{2} g_{\mu\nu} R$ for the metric: $g_{00}=-a^2(\tau)\left( 1+2 \phi^{(n)}\right),$ $g_{0i} = a^2(\tau)\left( \...
Dr. phy's user avatar
  • 287
4 votes
3 answers
405 views

How to fit function with data?

I have ...
Sale Gauss's user avatar
1 vote
1 answer
82 views

Value of a function over permutations of two lists

I want to do the sum (in Ising lattice gauge theory) ...
QFTheorist's user avatar
1 vote
1 answer
53 views

Sum on a lattice where variables can only take two values (Ising lattice gauge theory)

I want to study the Ising Gauge Theory which has the Hamiltonian \begin{equation} \mathcal{H} = -J \sum_{n,\mu,\nu} \sigma_3(n,\mu)\sigma_3(n+\mu,\nu)\sigma_3(n+\mu+\nu, -\mu)\sigma_3(n+\nu, -\nu) \...
QFTheorist's user avatar
0 votes
0 answers
75 views

How to calculate Einstein tensor components for this metric?

I try to calculate the Einstein tensor compenents from the eqution: $ G_{\alpha\beta} = \frac{\nabla_\beta (\partial_\alpha \phi)}{\phi} - \frac{1}{2\phi^2} \left[ \frac{\partial_4 \phi \partial_4 g_{\...
Dr. phy's user avatar
  • 287
1 vote
1 answer
104 views

Plot after applying NIntegrate

I'm trying to integrate and graph $I$ vs $b$ the following integral (eq. 24 in this paper) in wolfram mathematica $$ I = \int_{2}^{\infty} \frac{g_i^3 \mathcal{K}_t \mathrm{~d} r}{r^2\left|\mathcal{K}...
Soliton-104's user avatar
2 votes
1 answer
198 views

Numerical ground state wavefunction of Schrödinger equation with a Coulomb potential in 2D from NDEigensystem

I want to numerically solve the ground state wave function of the hydrogen atom with the Coulomb potential using the NDEigensystem. Here is the code to get the ground state wave function from the ...
AminD's user avatar
  • 51
1 vote
1 answer
156 views

Animating a double spring spherical pendulum

I want to make an animation of a double spring spherical pendulum. The first mass is connected to the ceiling with a spring, and the second mass is attached to the first one with a spring too. The ...
Denis D. Bavrin's user avatar
0 votes
1 answer
101 views

Change of variable of a numerically solved integral

I have the following function that numerically integrates a function on the interval $\left[ 2, 100 \right]$ ...
Soliton-104's user avatar
0 votes
1 answer
93 views

Writing a function that sorts by low powers while ignoring higher powers of various variables

I'm writing a Mathematica code with the aim of automating operator mixing calculations in QCD (at least at one-loop order). So far, it can generate Feynman rules and all graphs, assign the rules, call ...
y9QQ's user avatar
  • 11
1 vote
0 answers
82 views

Intensity pattern [closed]

I'm trying to get the following intensity pattern from this paper In the Newtonian case, the equations for the intensity (eq. 9 and 10 in the article), I put them in Mathematica with the change $b^2 =...
Soliton-104's user avatar
0 votes
0 answers
71 views

How do you create a program to calculate the spectrum of a pulse of arbitrary shape?

Develop a program designed to compute the spectrum of a pulse with an arbitrary shape. My current program might not suitable for solving this problem. ...
Iра Сотник's user avatar
1 vote
1 answer
179 views

Animation of double pendulum with a spring (3DOF)

I've got a problem with animating a double pendulum where the first mass is connected with a ceiling with a bar and the second mass is connected with the first one with a spring. Below is my code ...
Denis D. Bavrin's user avatar
1 vote
1 answer
262 views

Plot solution of an integral with parameter

In this article, they solve the following integral $$ \mathcal{I}_{o b s}\left(\nu_0\right)=\int_{\gamma_i} \frac{(A(r))^{3 / 2}}{r^2} \sqrt{\frac{1}{A(r)}+r^2\left(\frac{d \varphi}{d r}\right)^2} d r ...
Soliton-104's user avatar
4 votes
1 answer
349 views

Animation of a spring pendulum

I would like to animate a spring pendulum. Below is my piece of code. The Lagrangian and equations are correct, in which I am sure, but the animation looks terrible and non-realistic. Could someone ...
Denis D. Bavrin's user avatar
1 vote
2 answers
147 views

Making the timestep of Euler method integration a variable

I am fairly new to Mathematica, and I've been trying to implement the Euler method of integration for a fluid velocity field. I can't work out how to make the timestep a variable of my Euler method ...
Feneb's user avatar
  • 13

1
2 3 4 5
20