next up previous
Next: About this document ...

Assignment III
Ordinary Differential equations
1.
Write a program to numerically integrate trajectories (using the Euler method) for a particle of unit mass moving in 1-D in the potenital $V(x)=(x^2-1)^2$. Test the accuracy of your program for different step sizes $h$ by calculating the energy along the trajectory. We expect the energy to be conserved. Show the phase trajectory for $0<t\le 10$ for the initial condition $x=2$,$p=-1$ at $t=0$ for different step sizes.
2.
Wite a program to numerically integrate the differential equation

\begin{displaymath}\frac{d x}{dt}=\cos t-\sin x+t^2\end{displaymath}

with the initial condition

\begin{displaymath}x(t=-1)=30\end{displaymath}

using the $4^{th}$ Order Taylor Series method. Use your program to integrate $x(t)$ to $t=1$ using stepsizes $h=0.02$, $h=0.01$ and $h=0.005$. Comment on how you expect the step size to scale with $h$. Can you verify if this actually holds in your results?
3.
Write functions to solve differential equations with more than one variables $i.e.$ $x_1(t),x_2(t),x_3(t),...x_n(t)$ using the $2^{nd}$ and $4^{th}$ Order Runge-Kutta methods using fixed step size $h$. Use these functions to repeat the exercise in Question I of this asignment sheet.




Somnath Bharadwaj 2002-01-16