Tag Info

New answers tagged

1

This is not a direct answer to your problem, but rather a generalization of @Jens' code from double to n-tuple pendulums. Meaning you can also use it for double pendulums if you like. I'm providing it due to popular demand. Needs["VariationalMethods`"] n = 10; (* number of pendulum segments *) rate = 10; (* animation frame rate *) Clear[s, ϕ, t, g, m]; ...


3

A sample numerical solution is m = 1; a = 1; g = 1; k = 1; sol = NDSolve[{m x''[t] == m (a + x[t]) (θ'[t])^2 + m g Cos[θ[t]] - k x[t], m (a + x[t]) θ''[t] + 2 m x'[t] θ'[t] == -m g Sin[θ[t]], x[0] == 1, θ[0] == .2, x'[0] == 1, θ'[0] == 0}, {x, θ}, {t, 0, 10}]; Plot[Evaluate[{x[t], θ[t]} /. sol], {t, 0, 10}]


0

Specifying initial conditions (as per gwr) resolves matters: sol = ParametricNDSolve[{2*I*a'[t] == -0.1*w* b[t]*(Exp[I*(0.1*w)*t] + Exp[-I*(2.1*w)*t]), 2*I*b'[t] == -0.1*w*a[t]*(Exp[-I*(0.1*w)*t] + Exp[I*(2.1*w)*t]), a[0] == b[0] == 1}, {a, b}, {t, 0, 1000}, w]; f[w_] := a[w] /. sol Manipulate[Plot[Evaluate[Abs[f[w][t]]]^2, {t, 0, 1000}], ...


1

Here is a short sketch of how I would do it. Since I am not a physicist this is more or less simply a how to get a function plot advice. ;-) parSol = ParametricNDSolve[ { 2 I a'[t] == -0.1 w b[t] (Exp[ I (0.1 w) t] + Exp[-I (2.1 w) t]), 2 I b'[t] == -0.1 w a[t] (Exp[-I (0.1 w) t] + Exp[ I (2.1 w) t]), (* initial conditions *) a[0] == b[0] ...


1

Mathematica has logical symbols such as $\exists$, $\forall$, $\in$, $\wedge$, and so forth and can be used in statements such as ForAll[{a, b}, a > 0 && b > 0, (a + b)/2 >= Sqrt[a b]]. One performs simple logical resolution by Resolve[] applied to such an expression. I suspect Mathematica can simplify or resolve such logical and ...


2

By using the output of ListContourPlot3D and the new Mathematica 10.0 feature DiscretizeGraphics, one can nicely generate a meshed contour region which is suitable for NIntegrate. We can show this for the above example for energy contours from 1.0 to 2.0 with a step width of 0.1: Monitor[Table[ e = ListInterpolation[data, {{-1, 1}, {-1, 1}, {-1, 1}}]; f ...



Top 50 recent answers are included