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

In summary, the conversation discusses using the RK4 method to solve differential equations with different variable notations and functions, and the limitations of using this method in certain scenarios. The conversation also includes a link to a helpful thread on a related topic.
  • #1
gofightwin
5
0
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. :smile:

Thanks.
 
Physics news on Phys.org
  • #2
Sorry, I don't understand your notation.

R-K algorithms are for solving differential equations, is that what you have?
 
  • #3
Sorry, how about something like the following?

[itex]\frac{du}{dt} = x^2 + sin(y)[/itex]
 
  • #4
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 :eek:
 
  • #6
^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
gofightwin said:
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)?
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.
 

1. What is the Runge-Kutta method for solving ut = f(x,y)?

The Runge-Kutta method is a numerical method used to solve ordinary differential equations, specifically the initial value problem ut = f(x,y). It is an iterative process that uses a weighted average of several slope estimates to approximate the solution at the next time step.

2. How does the Runge-Kutta method work?

The Runge-Kutta method works by using a series of intermediate calculations to estimate the slope of the solution at different points in time. These slope estimates are then combined using a weighted average to determine the approximate solution at the next time step. This process is repeated until the desired accuracy is achieved.

3. What are the advantages of using the Runge-Kutta method?

The Runge-Kutta method is a very versatile and efficient numerical method for solving differential equations. It is accurate, stable, and can handle a wide range of initial value problems, including stiff systems. It also allows for easy adjustment of the step size, making it a flexible choice for different types of problems.

4. How accurate is the Runge-Kutta method?

The accuracy of the Runge-Kutta method depends on the order of the method used. The higher the order, the more accurate the approximation will be. The most commonly used version, the 4th order Runge-Kutta method, has a local truncation error of O(h^5) and a global error of O(h^4), where h is the step size.

5. What are some applications of the Runge-Kutta method?

The Runge-Kutta method is widely used in various fields, such as physics, engineering, and economics, to model and solve differential equations. It is particularly useful for simulating systems that are too complex to be solved analytically. Some common applications include modeling population growth, predicting weather patterns, and analyzing chemical reactions.

Similar threads

Replies
46
Views
574
  • Differential Equations
Replies
6
Views
2K
  • Differential Equations
Replies
6
Views
3K
  • Differential Equations
Replies
4
Views
2K
Replies
9
Views
2K
Replies
18
Views
12K
  • Differential Equations
Replies
4
Views
3K
Replies
2
Views
2K
  • Programming and Computer Science
Replies
15
Views
2K
Replies
1
Views
9K
Back
Top