# Tag Info

5

Another alternative is to package your constant vector parameters as DiscreteVariables. In the OP's case, it necessary only to chnage e since b occurs inside Cross, which will not evaluate until all its arguments are vectors. Note that in the equation we changed e to e[t] and set its value with e[0] == {0, 0, 1}. b = {1, 0, 0}; (*e={0,0,1};*) q = 1; m = 1; ...

7

Alternative method: b = {1, 0, 0}; e = {0, 0, 1}; q = 1; m = 1; sol = NDSolve[{e + Cross[pos'[t], b] == m/q pos''[t], pos[0] == {0, 0, 0}, pos'[0] == {0, 0, 0}}, pos, {t, 0, 10}, Method -> {"EquationSimplification" -> "Residual"}]; ParametricPlot3D[pos[t] /. sol, {t, 0, 10}, PlotRange -> All]

11

The main problem is that your pos is not seen as a 3D vector. The cross product is therefore interpreted as a scalar: q*Cross[D[pos[t], t], b] when adding this to the vector q.e this 'scalar' term is added to each of the vector components: q*e + q*Cross[D[pos[t], t], b] This won't work, instead do: b = {1, 0, 0}; e = {0, 0, 1}; q = 1; m = 1; ...

2

The phase portrait gives you $y'$ as a function of $y$ in multiple pieces (all those intervals where the former is actually a unique function). In each such piece, you can in principle find the functional form $dy/dt = y' = g(y)$ by inspection. Next, how to get the time? Use $$t-t_i = \int \frac{dy}{g(y)}$$ which is then solvable for $y(t-t_i)$ in ...

16

Why the original matrix approach fails The question originally showed an attempt at a solution based on converting the differential operator (the Hamiltonian) into a matrix (HMax) by forming a Table of overlap integrals. The functions used in these integrals were the bound-state eigenfunctions of the hydrogen radial equation. Although the matrix obtained in ...

3

You should try the following after restarting Mathematica to make sure that you don't run into conflicts with the Units package you had loaded. U238Mass = UnitConvert[IsotopeData["Uranium238", "AtomicMass"], "Kilograms"] electronMass = UnitConvert[Quantity["ElectronMass"], "Kilograms"] U238Mass - 92 electronMass (* Out: Quantity[3.952926*10^-25, ...

4

The $\theta(t-\Delta)$ makes it a Delay Differential Equation, which the documentation here shows how to solve. You have to specify a history function like this: u[t /; t <= 0] == f[t] For example: NDSolve[{u''[t] + u[t - 1] == 0, u[t /; t <= 0] == 1}, u, {t, 0, 10}] Plot[u[t] /. First[%], {t, 0, 10}]

10

I've now created https://github.com/barrycarter/bcapps/blob/master/MATHEMATICA/nearestPhysicalConstant.mx as a first cut at doing this. Important notes/caveats: This is not a professional/"real" package. To use, do math -initfile PhysicalConstant.mx on the command line or <<PhysicalConstant.mx after starting Mathematical. The function ...

Top 50 recent answers are included