Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'NDSolve a pendulum's DE' topicStudent Support Forum > General > Archives > "NDSolve a pendulum's DE"

Next Comment >Help | Reply To Topic
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: ,

Subject (listing for 'NDSolve a pendulum's DE')
Author Date Posted
NDSolve a pendulum's DE Tom 09/24/10 4:12pm
Re: NDSolve a pendulum's DE yehuda ben-s... 09/26/10 03:46am
Re: Re: NDSolve a pendulum's DE Tom 09/26/10 8:29pm
Next Comment >Help | Reply To Topic