New answers tagged

3 votes
Accepted

Convergence plot of Lyapunov exponents

I uncovered an unexpected little bug in LyapunovExponents that caused those errors. If you use the updated version from here, it now seems to work. Wrangle into ...
user avatar
  • 17.6k
7 votes
Accepted

Error in Metropolis-Hastings with three states?

Disclaimer: I am not a physicist... :) ... but I know how Metropolis-Hastings works. So let's got about this with the following idea: We will use a simple proposal distribution that selects one of ...
user avatar
  • 12.3k
1 vote
Accepted

Using Loop to find a specific Energy

If you just want a set of solutions that satisfy your initial condition, you could use FindInstance: ...
user avatar
2 votes

Using Loop to find a specific Energy

Let's first fix your approach. I have slightly changed the naming of the variables, but the main difference is in using SetDelayed (:=) instead of ...
user avatar
  • 6,642
4 votes
Accepted

Finding Hamiltonian from a perturbative Action

The procedure is basically what you would do by hand, $ \mathcal{H} = \pi \dot{\phi} - \mathcal{L} $ So just define the momentum $\pi$ as usual ...
user avatar
  • 5,314
6 votes

Neglecting higher order terms in a Lagrangian

Another approach to insert the "smallness" parameter is: Normal[ Series[n /. C[i_] :> Function[m C[i][#]], {m, 0, 3}] ] /. m->1 -ωsq[0] C[0][t]...
user avatar
  • 123k
4 votes

Neglecting higher order terms in a Lagrangian

Another way to do this is to "tag" the expressions in the original code with some formal parameter $\epsilon$: ...
user avatar
4 votes
Accepted

Neglecting higher order terms in a Lagrangian

If I understand correctly you just have to include the derivatives in the vars ...
user avatar
  • 5,684

Top 50 recent answers are included