# Runge-Kutta - That funny-looking symbol that looks like an 'f'...

This topic is 3336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Quite simply, how do you calculate that? Thanks for any and all help.

##### Share on other sites
Do you have an example? Could be a lot of things with that description.

##### Share on other sites
From this webpage

It's the only 'Funny looking symbol that looks like an 'f'' I saw when looking up Runge-Kutta. And yes, I did look it up on Wikipedia - Which is incredibly unhelpful with math, as it tends to be written for experts.

##### Share on other sites
it's not a funny looking symbol, it IS an 'f', it's just in italics like f

##### Share on other sites
Hmm, so it possibly is. I was thinking contour or closed line integral.

##### Share on other sites
It just represents some function.

k = f(x,y)

is the same as

type_k k = foo(x, y); in c++.

##### Share on other sites
Thanks.

This is why terms need to be defined.

##### Share on other sites
F stands for a two variable function f(t,y) which seems to return the slope (aka derivative) of y at time t (http://upload.wikimedia.org/math/7/3/6/73654ee739d62e6612a2357db9d044f6.png). I wouldn't know since I've got near the same level of knowledge as you.

I actually gave up on RK4 since I got charmed by the speed an simplicity of simplectic integrators such as Velocity Verlet. However, if you need help getting actual code, here's Gaffer on the subject: http://gafferongames.com/game-physics/integration-basics/

##### Share on other sites
Would this, then, be a generic Runge-Kutta?

        public static double RungeKutta4(double a, double b, double increment, double interval)        {            double h = increment * interval;            double k1 = h * MathExt.Lerp(a, b, interval);            double k2 = h * MathExt.Lerp(a + h / 2, b + k1 / 2, interval);            double k3 = h * MathExt.Lerp(a + h / 2, b + k2 / 2, interval);            double k4 = h * MathExt.Lerp(a + h, b + k3, interval);            return 1.0 / 6.0 * (k1 + k2 * 2 + k3 * 2 + k4);        }

##### Share on other sites
Quote:
 Original post by Narf the MouseFrom this webpageIt's the only 'Funny looking symbol that looks like an 'f'' I saw when looking up Runge-Kutta. And yes, I did look it up on Wikipedia - Which is incredibly unhelpful with math, as it tends to be written for experts.

The Wikipedia page has the same information as the Mathworld page, plus a thorough description of the derivation. And it tells you what f is.
Quote:
 Would this, then, be a generic Runge-Kutta?
No. How could it be? It doesn't even sample a provided function.

If memory serves, there is a generic RK4 integrator provided in Numerical Recipes in C, which should be available at any library with a reasonable CS collection.

1. 1
2. 2
3. 3
Rutin
25
4. 4
5. 5
khawk
14

• 11
• 11
• 23
• 10
• 9
• ### Forum Statistics

• Total Topics
633650
• Total Posts
3013119
×