Solve DiffEq for Runge-Kutta 4th Order Input

In summary, someone is asking how to enter differential equations into a Runge-Kutta 4th order spreadsheet, and suggests defining y = vx in order to get the required form. If y' is equal to dy/dt then it is as simple as saying y' = -FDy/mv.
  • #1
andyfive
13
0
Hi,

Hi. I am trying to enter some differential equations into a Runge-Kutta 4th order spreadsheet which requires input in the form y' = ...? My differential equations are in the form :
dvx/dt = -FDvx/mv (i.e relate velocity derivative with respect to time to acceleration).
Can anyone please help or point me in the right direction as to how to convert this to to y' = ...? format?

Many Thanks
 
Physics news on Phys.org
  • #2
Hi andyfive, welcome to PF! :smile:

Perhaps if you define y = vx you have the required form?

Or possibly y = (vx, vy)?
 
  • #3
Many Thanks for your reply I like Serena. If I understand correctly, by defining y = ax I get :

dy/dt = -FDy/mv

If y' is equal to dy/dt then it is as simple as saying y' = -FDy/mv. Is this correct?

Thanks
 
  • #4
andyfive said:
Many Thanks for your reply I like Serena. If I understand correctly, by defining y = ax I get :

dy/dt = -FDy/mv

If y' is equal to dy/dt then it is as simple as saying y' = -FDy/mv. Is this correct?

Thanks

Basically, yes!

However, you also have a "v" in your expression.
I suspect this should actually be sqrt(vx2+vy2), but I'm guessing here, since I think you did not list all your variables and equations.
If it is, "y" would come back into the expression for "v".
 
  • #5
I like Serena said:
Basically, yes!

However, you also have a "v" in your expression.
I suspect this should actually be sqrt(vx2+vy2), but I'm guessing here, since I think you did not list all your variables and equations.
If it is, "y" would come back into the expression for "v".

Thanks again I like Serena. Yes, you are absolutely correct, the v will need to be defined actually as sqrt(vx2+vy2+vz2) - this is a model for a 3 dimensional ball flight. The initial velocity(v) at time(t) = 0 is known and hence the three initial velocity vectors are known. Not sure what happens though when other derivatives are part of the expression (ie vy & vz)?

Regards
 
  • #6
andyfive said:
Thanks again I like Serena. Yes, you are absolutely correct, the v will need to be defined actually as sqrt(vx2+vy2+vz2) - this is a model for a 3 dimensional ball flight. The initial velocity(v) at time(t) = 0 is known and hence the three initial velocity vectors are known. Not sure what happens though when other derivatives are part of the expression (ie vy & vz)?

Regards

In this case you would have y = (y1, y2, y3) as a vector.

And you would effectively have 3 equations, the first being:

[tex]\frac {dy_1} {dt} = \frac {-F_D y_1} {m \sqrt{y_1^2+y_2^2+y_3^2}} [/tex]
 
  • #7
I like Serena said:
In this case you would have y = (y1, y2, y3) as a vector.

And you would effectively have 3 equations, the first being:

[tex]\frac {dy_1} {dt} = \frac {-F_D y_1} {m \sqrt{y_1^2+y_2^2+y_3^2}} [/tex]

Brilliant. Many Thanks I like Serena. You really have helped clarify things for me. I'll get back to the spreadsheet and see what results I now obtain.
 
  • #8
andyfive said:
Brilliant. Many Thanks I like Serena. You really have helped clarify things for me. I'll get back to the spreadsheet and see what results I now obtain.

Cheers! :smile:
 

What is the Runge-Kutta 4th Order Method?

The Runge-Kutta 4th Order Method is a numerical algorithm used to solve ordinary differential equations (ODEs). It is a higher order method, meaning it is more accurate than simpler methods such as Euler's method. It is a popular choice for solving ODEs in various scientific fields.

How does the Runge-Kutta 4th Order Method work?

The Runge-Kutta 4th Order Method works by using a series of calculations to approximate the solution of an ODE at discrete time steps. It takes into account multiple points within each time step to improve the accuracy of the approximation.

What are the advantages of using the Runge-Kutta 4th Order Method?

The Runge-Kutta 4th Order Method is more accurate than simpler methods, making it a more reliable choice for solving ODEs. It also has a relatively simple calculation process, making it easy to implement in computer programs.

What are the limitations of the Runge-Kutta 4th Order Method?

While the Runge-Kutta 4th Order Method is more accurate than simpler methods, it can still produce errors in certain situations, such as when the ODE has a singularity or when the time step is too large. It also requires more computational resources compared to simpler methods.

How do I use the Runge-Kutta 4th Order Method in practice?

To use the Runge-Kutta 4th Order Method, you will need to first set up the ODE in a specific form called the initial value problem. Then, you can use a computer program or calculator to apply the Runge-Kutta 4th Order Method to solve the ODE at different time steps. There are also many online tools and libraries available that can perform this method for you.

Similar threads

  • Differential Equations
2
Replies
40
Views
547
  • Differential Equations
Replies
6
Views
2K
Replies
7
Views
2K
  • Differential Equations
Replies
4
Views
6K
Replies
2
Views
2K
Replies
5
Views
1K
  • Differential Equations
Replies
4
Views
3K
  • Atomic and Condensed Matter
Replies
3
Views
1K
  • Programming and Computer Science
Replies
15
Views
2K
  • Differential Equations
Replies
4
Views
3K
Back
Top