Runge-Kutta method for ut = f(x,y)?

1. Apr 22, 2013

gofightwin

Hi,

I am trying to solve something similar to ut = f(x,y), and ut = f(t,x,y) using RK4. I asked a few friends, and nobody knew for sure how to go about it. I've also looked online, without much success. Can anyone give me a hint on this one?

In reality, it is probably preferable to derive a scheme from the first principle, but if I could avoid this, that would be nice.

Thanks.

2. Apr 22, 2013

Integral

Staff Emeritus
Sorry, I don't understand your notation.

R-K algorithms are for solving differential equations, is that what you have?

3. Apr 22, 2013

gofightwin

Sorry, how about something like the following?

$\frac{du}{dt} = x^2 + sin(y)$

4. Apr 23, 2013

maistral

Isn't this solved by using simultaneous RK4's?

I think it's supposed to be u'(t) = f(x,y) and u'(t) = f(t,x,y)? I don't understand the question clearly

5. Apr 23, 2013

Staff: Mentor

6. Apr 23, 2013

gofightwin

^Thanks, I think that is probably what I was looking for!

One bonus question, while we're at it. Is there still value to using the RK method for the differential equation I listed in my previous post? That is, one with f(x,y), rather than f(t,x,y)?

7. Apr 23, 2013

Redbelly98

Staff Emeritus
If u, x, & y are all functions of t, then I'm pretty sure you need 3 differential equations to solve it. So additionally you need expressions for dx/dt and dy/dt. You can't solve a single differential equation with all those variables, by RK4 or any other means -- unless there is some relation between u, x, & y that you have omitted, or x and y are specified functions of t.

And if x and y are being treated as dependent variables, so u is supposed to be a function of x, y, & t, then RK4 won't work there either. In that case you need to go to a multivariable method, such as using difference equations or perhaps finite element methods.