## Problems from the textbook

These are from the 10th edition of the book; see the scans if you have another.

## Other problem

A third-order Runge–Kutta method that we have not seen during the lectures or in Kreyszig has the Butcher table

\[ \begin{array}{c|ccc} 0 & 0 & 0 & 0 \\ 1/2 & 1/2 & 0 & 0 \\ 1 & -1 & 2 & 0 \\ \hline & 1/6 & 2/3 & 1/6 \\ \end{array}. \]

Write down the full expressions for this method in the form \(y_{n+1}=y_n + \dots\) along with the relevant \(k_i\)'s.

Is the method explicit or implicit?

## Old exam problems

The following old exam problems are taken from TMA4135, a course that is almost identical to TMA4123/TMA4125. The problems could just as well have been from a TMA4123/TMA4125 exam.

## Programming problem 1

Write an RK4 solver for systems of first order ordinary differential equations in Matlab. Do *not* use the built-in solvers! ^{1)}

## Programming problem 2

Test your solver from programming problem 1 by re-doing problem 21.1.11, but now doing a lot of steps. Remember that you wrote a solver for *systems*, while 21.1.11 deals with a single ODE.

## Programming problem 3

Do Kreyszig's problem **21.3.11** (scan) using your solver.

## Voluntary extra programming problem

An ordinary pendulum (programming problem 3) is well and good, but your RK4 solver is really powerful and you can use it so solve something a lot less trivial! Try solving a double pendulum, which is a chaotic system with wild behavior. Wikipedia has the neccessary ODEs ready.

Since the double pendulum involves two unknown functions (the two angles), it is a bit hard to plot as a function of time unless you make its movement into a movie. If you are interested, figure out how to do this in Matlab. If you are lazy, you can check out a ready-made movie (alternative format) instead. It was made using exactly the same RK4 solver code that will appear in the solution suggestions.

## Voluntary repetition problems

**TMA4135, fall 2006:**2, 4

^{1)}