Linked Questions

2
votes
1answer
4k views

4th-order Runge-Kutta method to solve a system of coupled ODEs [duplicate]

I am a beginner at Mathematica programming and with the Runge-Kutta method as well. I'm trying to solve a system of coupled ODEs using a 4th-order Runge-Kutta method for my project work. I have ...
2
votes
1answer
823 views

Solve the following differential equation using the fourth-order Runge-Kutta method [duplicate]

I need to use Mathematica to solve the following DE by the fourth-order Runge-Kutta method and find $y(10)$: $$y'(x)=\frac{1}{2y}, y(0)=1$$ The following is the code I have so far (with step size h=0....
1
vote
1answer
187 views

Solving ODE with Runge-Kutta method [duplicate]

I am trying to solve y''+4y'+3y=0; y[0]=1, y'[0]=-1 with Runge-Kutta method and I have a problem that its DSolve gives the ...
0
votes
0answers
174 views

Runge Kutta 4th order for system coupled equations-how to do? [duplicate]

I have system of coupled differential equations: $x_0 x_0'=\dfrac{32}{(r^4-2r^2)}$ $(x_o x_1)'=a x_0'$ $(x_o x_2)'=-x_1x_1'-a (-x_1'-\dfrac{x_0'}{x_0})$ $(x_o x_3)'=-(x_1x_2)' +a( x_2'+\dfrac{x_1'}...
0
votes
0answers
22 views

Use RK4 method to solve an initial value problem [duplicate]

I have tried: DSolve[{y'[x] == x^2 + y^3, y[1] == 1}, y[x], x] and did not work, and I have not figured out how to use RK4 order method to find y(2.2), using h = ...
4
votes
1answer
653 views

Runge-Kutta-2 on System

After spending some time using the Mathematica documentation and this Mathematica.SE answer, I implemented the Runge-Kutta-2 routines. I am hoping someone can validate what I did and tell me that it ...
3
votes
1answer
378 views

Numerical solution using RK4 to solve nonlinear ODE?

I am trying to use the Runge-Kutta 4 method to solve the nonlinear ODE, using the following Mathematica code: ...
1
vote
1answer
900 views

System of Four First Order Equations for Double Pendulum using RK-4 - Code Improvements

I have spent quite a bit of time implementing the double pendulum equations at the bottom of this web site using Runge-Kutta-4. I am also quite aware of the built-in Runge-Kutta methods, but I need ...
3
votes
1answer
447 views

Integrate equations of motion when force depends on position

I'm fairly new to Mathematica. I'm trying to test my C++ implementation of a fourth order Runge Kutta method for Newton's equations of motion. I want to test my integrator when the applied force is ...
1
vote
1answer
584 views

How to pass arguments in NIntegrate and NDSolve

I am solving PDEs with NDSolve and NIntegrate, but I do not know how to pass arguments correctly. My orignial code is very ...
1
vote
1answer
175 views

Plot column using some list as x values? [closed]

I've got a mathematica notebook that uses RK4 to successively approximate solutions to a vector valued DE. The output is a nested list similar to: ...
0
votes
0answers
246 views

Solving coupled differential equations of second order using Euler's method [duplicate]

I want to solve the following differential equations numerically using Euler's Method. $\qquad \frac{d^2s_x}{dt^2}= \frac{dv_x}{dt} = -kv_x\sqrt{v_x^2+v_y^2}$ $\qquad \frac{d^2s_y}{dt^2}= \frac{dv_y}...
1
vote
0answers
101 views

Runge-Kutta methods in Mathematica for systems of first order Differential Equations

The algorithm isn't given any output, the graph is unidentifiable. The systems of Differential Equations considered: $$ x'[t]=-x[t]+y[t]\\ y'[t]=-x[t]-y[t]\\ x[0]=0, y[0]=4, h=0.1$$ Please ...
0
votes
0answers
100 views

Runge-Kutta on coupled equations

I'm still pretty new to Mathematica and I'm having a few issues solving these coupled equations. I've attempted using NDSolve with method "ExplicitRungeKutta" as well as with no method, and have had ...
0
votes
0answers
90 views

Runge-Kutta method freezes or takes too much time

I want to solve differential equations iteratively to know better how algorithms work. From this discussion Problems with Runge-Kutta methods for different functions I know that the working Runge-...