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

learn more… | top users | synonyms

5
votes
2answers
146 views

Multidimensional integral to compute the end-to-end distribution of a FENE ideal chain

How do I evaluate the mean end-to-end squared distance of a FENE ideal chain at fixed inverse temperature $\beta$ in the canonical ensemble? This quantity is defined as the mean value ...
5
votes
2answers
114 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 ...
0
votes
0answers
38 views

Simulation of navier-stokes equation in mathematica [closed]

I want to simulate a situation where there is a container full of water and another stream of water falls into it. I read http://blog.wolfram.com/data/uploads/2013/07/FlowInABox.cdf, and tried to ...
0
votes
0answers
88 views

Simulate fluid flow in 2D or 3D

I want to simulate a waterfall in 2D or 3D. I started by reading the following article and changed the following code ...
6
votes
2answers
483 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: ...
3
votes
1answer
119 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 ...
8
votes
1answer
455 views

NDSolve::ndcf: Repeated convergence test failure. How to solve?

I am trying to simulate a system of $n$ pendulums with some friction in Mathematica 9. This is the code I am using: ...
5
votes
3answers
183 views

Numerically Simulating a Simple Differential Equation: RC Circuit

I need to learn to simulate a differential equation in Mathematica. The differential equation that I need to simulate is complicated, without an analytical solution. However, I am brand new to ...
1
vote
0answers
67 views

1D FDTD lens simulation [closed]

Ok finally last question on the topic. I have made a working 1D FDTD propagator and now I would like to make it work with lens. The code that does that is simple enough: ...
1
vote
0answers
63 views

Lens profile in a grid

So I have a FDTD code which works and its all good the propagator of the code it self is: ...
0
votes
0answers
78 views

Solving for a Transfer Matrix

I am currently working on a program that will solve a transfer matrix and extract several elements. Particularly, the transfer matrix is characterized by four elements in a ...
14
votes
1answer
1k 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 ...
24
votes
4answers
4k 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 ...
1
vote
0answers
64 views

Maxwell propagator problem 2D [closed]

Hi folks I`m trying to turn certain matlab code to mathematica but for some reason it doesnt really want to do it could you please assist me a bit. Thanks The matlab code is as follows: ...
3
votes
1answer
118 views

Interpolation function rejected by ParametricPlot3D

I was playing around with the bouncing ball example, and decided to make a 3d version. I decided to use ParametricPlot3D for a simple independent 3D ...
0
votes
1answer
65 views

Plotting and Analysing derivatives of solution of differential equation [closed]

Using NDSolve I found the solution for the differential equation that governs the dynamics of a simple pendulum. How do I plot the derivatives of the solution? Also, I would like to find the ...
1
vote
0answers
56 views

Creating an orrery

I am interested in creating an orrery, ideally with SystemModeler. I have been experimenting with the MultiBody library since that allows you to do animations. The most relevant example seems to be ...
2
votes
2answers
317 views

draw part of parabola using graphics

today I was doing my physics homework. one of the questions was draw velocity-time and position-time graphs from the acceleration-time graph. So for the first step I draw acceleration-time using ...
0
votes
0answers
40 views

SetDelayed::write is Protected error on Linux not PC

I have 2 computers, a PC and an Ubuntu computer both with Mathematica 10. I am running the exact file with the exact support files on both computers, but just on the Ubuntu I get the following error ...
1
vote
0answers
94 views

Finding the point of best focus for a ball lens

This is my project (simulation): A set of parallel rays goes trough a ball lens (circular lens). Because of spherical aberration, refracted rays will not meet in a single point. Find the distance ...
9
votes
1answer
913 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 ...
10
votes
2answers
374 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 ...
2
votes
1answer
126 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 $$ ...
8
votes
1answer
156 views

Calculate inertia tensors

Moments of inertia and inertia tensors are well-known characteristics of rigid bodies in physics and applied mathematics. How to calculate them in Mathematica? Is possible to use regions which was ...
34
votes
8answers
5k 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 ...
2
votes
0answers
720 views

Kramers-Kronig Mathematica code [closed]

I'm trying to write Mathematica code to use Kramers-Kronig on a csv file with 2 columns. Column 1 is h(eV). It goes from 0 to 6, in increments of 0.1. Column 2 is alpha (cm^-1). For some reason, ...
1
vote
2answers
608 views

Trying to graph trajectory function in Mathematica? Won't Graph?

The exercise is: Define the trajectory function y(x) in Mathematica. Pick the initial speed (in meters per second) equal to ...
5
votes
1answer
156 views

NDSolve and Piecewise functions

I want to clarify upfront, This is not a please help me get the answer to my homework question. I know what I need to do I just do not know how to get mathematica to do it. I am working on an ...
4
votes
2answers
722 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 ...
7
votes
1answer
241 views

How to draw quantum circuit with mathematica?

How to draw quantum circuit as the following one with mathematica? I only find the quantum package which is designed for MMA 7.0 as the author said. But the version of my Mathematica is 9.0 and when ...
-1
votes
1answer
191 views

Navier–Stokes equations [closed]

how write Stokes equation in mathematica? the Stokes equation is in in this link http://en.wikipedia.org/wiki/Navier-Stokes_Equations
7
votes
3answers
157 views

Substituting values in 3j symbols

I believe these three expressions should give the same answer of -1/Sqrt[3], but the first gives +1/Sqrt[3] whereas the second ...
1
vote
0answers
78 views

Solving PDEs with complicated boundary conditions

The system I'm trying to solve is $$\nabla^2 C_{(r,\theta)} =0$$ $$C_{(\infty,\theta)}=C_0$$ $$ [ \frac{\partial C_{(r,\theta)}}{\partial r} \cos(\theta)+\frac{1}{r}\frac{\partial ...
1
vote
1answer
55 views

How to make a discretized NMinimize more precise

I am using Mathematica for physics research and I want to minimize a Hamiltonian equation with respect to two variables (I have also discretized the problem). I have a single constraint. When I plot ...
0
votes
1answer
94 views

Help with Computation-heavy triple integration

I'm Trying to use Mathematica to symbolically integrate a function with respect to x, y, and z. For some reason, this computation either takes about, 60s and returns the input, or takes many hours ...
0
votes
2answers
75 views

Numerical simulation - getting slower the more data I have [closed]

I'm simulating the trajectory of a charged particle. I have the coordinates saved in the list $coor$ ({{0,0,0},{0.1,0.1,0.003}, etc}) as the time goes on this array is getting bigger and the ...
1
vote
0answers
86 views

Help wanted in evaluating an integral

Trying to evaluate an integral. To be specific, I'm trying to find the expectation value of $x^2$ for the ground state of hydrogen. Here is the code I used: ...
0
votes
1answer
162 views

Solving for the time-evolution operator in a periodically driven system

I am looking at the Hamiltonian $$H(t)=\begin{pmatrix} 0 & e^{i\Omega t}\\ e^{-i\Omega t}& 0\end{pmatrix}$$ I am trying to solve for the unitary operator $U(t,0)=\mathcal{T}\exp(-i\int_0^t ...
3
votes
1answer
114 views

How to simulate the 1-D motion of a particle under constant acceleration? [duplicate]

I am trying to represent the position of an object under freefall, but am completely lost. Here is my attempt so far: ...
2
votes
2answers
577 views

Circular Orbit Velocity in Vector Components

I'm trying to find out how to calculate the initial velocity needed to keep a spacecraft in a circular orbit around the Earth given its initial position and an initial angle theta in a Cartesian ...
1
vote
1answer
265 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$, ..., ...
1
vote
0answers
68 views

Solving for a charge distribution from a dipole moment [closed]

I've been looking around but I haven't been able to find any way of solving this conceptually simple problem. In short I am trying to find the charge density in a dielectric in an external electric ...
1
vote
2answers
146 views

Making mathematica do regulated integrals

Consider the integration, $\int _0 ^\infty dx\ x \tanh( \pi x) \sqrt {x^2 + a^2 } $ where $a$ is a real number. This integral is divergent. We note that an asymptotic expansion of the integrand ...
1
vote
1answer
93 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
2answers
144 views

How to fit exponential function which is not converging

I performed an experiment where I measured diffusion in a lipid bilayer. I performed the measurement by fluorescently labeling some molecules in the bilayer, and the irradiating them with light ...
12
votes
3answers
561 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 ...
0
votes
0answers
142 views

Boundary Value Problem- using NDSolve or another method

I am trying to solve a set of coupled partial differential equations, with defined boundary conditions using mathematica. Here are the equations and the boundary conditions. ...
2
votes
0answers
273 views

Visualising Special Relativity

Mathematica newbie learning by doing (or not so far, in this case). Problem: Special Relativity - consider two inertial frames $A$ & $A'$ in relative motion. At a time $t0$ as measured in $S$, ...
2
votes
2answers
389 views

Physics based Mathematica project ideas? [closed]

I am looking to make a physics based Mathematica project. Ideally the project would take around 12 hours, gathering any experimental data and analyse the findings. I'd have full access to university ...