Group Abstract Group Abstract

Message Boards Message Boards

0
|
11.8K Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Runge-Kutta Method, stiffness occur, how to solve it?

Posted 11 years ago
POSTED BY: Thai Kee Gan
6 Replies
Posted 11 years ago
POSTED BY: Thai Kee Gan
Posted 11 years ago
POSTED BY: Thai Kee Gan

Your function has a square root term of negative value:

In[182]:= Clear["Global`*"]

In[183]:= Simplify[
 y[x]^3 (1 - y[x]) x^2 - (1 - y[x])^3 x^2 + 3/8 y[x] (1/2 y[x]^(-1/2))]

Out[183]= 
x^2 (-1 + y[x])^3 + (3 Sqrt[y[x]])/16 - x^2 (-1 + y[x]) y[x]^3

In[184]:= s = 
 NDSolve[{y'[x] == 
    x^2 (-1 + y[x])^3 + (3 Sqrt[Abs[y[x]]])/16 - 
     x^2 (-1 + y[x]) y[x]^3, y[0] == 0}, y, {x, 0.000, 1}, 
  Method -> Automatic]

Out[184]= {{y -> InterpolatingFunction[{{0., 1.}}, <>]}}

It works if I take absolute value underneath the square root. I also used Automatic as the integration method.

POSTED BY: Kay Herbert
Posted 11 years ago

Hello guys, thanks for the replies. My equation is:

NDSolve[{y'[x] == 
   y[x]^3 (1 - y[x]) x^2 - (1 - y[x])^3  x^2 + 
    3/8 y[x] (1/2 y[x]^(-1/2)), y[0] == 0.`}, y, {x, 0, 1`}, 
 Method -> "ExplicitRungeKutta", "StartingStepSize" -> 1/1000]

Is there any mistake on how I load the Runge-Kutta Package? Or is there any mistake in the equation?

POSTED BY: Thai Kee Gan
POSTED BY: Ulrich Mutze
POSTED BY: David Mackay
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard