A basic ODE where Runge Kutta doesn't work?

  • Context: Graduate 
  • Thread starter Thread starter h1a8
  • Start date Start date
  • Tags Tags
    Ode Runge kutta Work
Click For Summary

Discussion Overview

The discussion revolves around a specific ordinary differential equation (ODE) derived from a cubic function, focusing on the behavior of various Runge Kutta methods when applied to this equation. Participants explore the discrepancies between expected real solutions and the complex results produced by computational software.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant presents a separable differential equation and notes that computational methods yield complex solutions for y(1), despite the expectation of real values.
  • Another participant suggests that the presence of negative numbers in the root leads to complex results, as the software defaults to the principal root for negative inputs.
  • A different approach is proposed, where the argument to the power (1/3) is made non-negative by squaring the term before applying the root, which is claimed to align with the intended outcome.
  • Participants discuss the implications of fractional powers of negative numbers and how they can lead to unexpected results in computations.
  • One participant expresses surprise at the software's handling of complex roots, indicating a lack of awareness regarding the default behavior of these programs.

Areas of Agreement / Disagreement

Participants generally agree on the issues arising from the handling of negative numbers in the context of fractional powers, but there is no consensus on the best approach to resolve the discrepancies in the computational results.

Contextual Notes

There are limitations regarding the assumptions made about the behavior of fractional powers and the definitions used in the context of the ODE. The discussion highlights unresolved mathematical steps related to the application of the Runge Kutta methods.

h1a8
Messages
86
Reaction score
4
From a cubic function where y(0)=1, y(1)=0, and where there is a local max at y(5/13) I created a basic separable differential equation problem. I wanted to analyze how well different ordered Runge Kutta methods works in an interval [0,1]. Here it is:

dy/dt=-6(6/13)1/3(y-343/468)2/3 , y(0)=1

This ODE yields the cubic solution of

y=1/468(-12t+5)3+343/468

Now it is clear that y(1)=0

But using the several Runge Kutta programs with various computer software (mathematica, ti-nspire cas, mathstudio, etc.) yields a complex solutions for y(1). For example, using the classical RK4 with h=.1 yields
y(1)=0.718779+.005811i.

I don't see how the programs get a complex solution when all the functions have no even roots. Does anyone what is going on with these programs?
 
Physics news on Phys.org
You have negative numbers in that root for y<343/468. All of the mentioned programs are won't to go to complex numbers ASAP. Those programs will take the principal root. For example, the principal root of (-1)2/3 is (-1+i√3)/2, not 1.
 
Last edited:
Yep.

Try dy/dt=-6 (6/13)1/3 ((y-343/468)(y-343/468))1/3 instead.

By multiplying (y-343/468) with itself first, you make sure that the argument to the power (1/3) is non-negative.
This way it will do what you intended.
 
I like Serena said:
Yep.

Try dy/dt=-6 (6/13)1/3 ((y-343/468)(y-343/468))1/3 instead.

By multiplying (y-343/468) with itself first, you make sure that the argument to the power (1/3) is non-negative.
This way it will do what you intended.

Thanks that works. I tried ((y-343/468)2)1/3 and that works too.
Didn't know the programs calculated the principle cube root of negatives by default even if they were complex.
 
Well, basically they don't have a choice.

What do you think (-1)^0.667 is?
 
I like Serena said:
Try dy/dt=-6 (6/13)1/3 ((y-343/468)(y-343/468))1/3 instead.
Nice trick.

h1a8, this works because of the identity (ab)c=abc.

This identity is valid if a is positive and b and c are real. It is not valid in general. (The same goes with a lot of other exponentiation identities.)
 
Last edited:

Similar threads

  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
8K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 14 ·
Replies
14
Views
3K