| Author |
Comment/Response |
Tom
|
09/24/10 4:12pm
Hi,
What's the best way to graph a pendulum's motion (without using the approximation Sin[theta] ~= theta for small theta)?
The DE is given by http://upload.wikimedia.org/math/8/c/a/8cac81164940cc01c636c5c4d2592d48.png .
I've tried using
g = 9.80;
l = 2.0;
v0 = 5;
f = \[Theta] /.
First@Flatten@
NDSolve[\[Theta]''[t] + g/l Sin[\[Theta][t]] ==
0 && \[Theta][0] == 0 && \[Theta]'[0] == v0, \[Theta], {t, 0,
20}]
Plot[f[t], {t, 0, 20}]
But the plot increases instead of oscillating.
What should I do to get a better graph?
Thanks,
Tom
URL: , |
|