hi
I was wondering about the odeint function in scipy.
While I was solving the Van der pol equations, I found the function odeint
is not suitable. I know there are some differences between Rungekutta method and RKF method, and only the RKF method can be used to solve the Van der Pol system.
But what should I do by the scipy function 'odeint'?
Thanks a lot!
The python program is given as follow,
#! /usr/bin/python
# Filename:vaderp ol.py
from scipy import *
from pylab import *
u=0.1
deriv= lambda y,t :array([y[1],y[0]u*(y[0]**21)*y[1]])
start=0
end=20000
numsteps=100000
time=linspace(s tart,end,numste ps)
from scipy import integrate
y0=array([0.01,0.0])
y=integrate.ode int(deriv,y0,ti me,hmax=0.2,hmi n=0.0 01)
plot(time,y[:,0])
show()
0 1236 Sign in to post your reply or Sign up for a free account.
Similar topics 
by: Just 
last post by:
While googling for a nonlinear equation solver, I found
Math::Polynomial::Solve in CPAN. It seems a great little module, except
it's not Python... I'm especially looking for its poly_root()
functionality (which solves arbitrary polynomials). Does anyone know of
a Python module/package that implements that?
Just

by: FLChamp 
last post by:
I was wondering what numerical method the odeint function is based on.
I have checked the documentation but couldnt find anything. I would be
very grateful if someone could answer this question for me, I'm not
looking for a heavy mathematical answer!
Cheers!
Ben

by: Jinjun Xu 
last post by:
Hi,
I am programming with VC++ (6) in windows.
I am using LASPACK (anyone used it before?), which is a linear equation
solvers package containing many head files and source files. When I want to
call the functions from that package, I use "#include xxx.h" in my file. But
the problem is that then I need to add many related .c files into my...

by: John Salerno 
last post by:
Ok, here's a problem I've sort of assigned to myself for fun, but it's
turning out to be quite a pain to wrap my mind around. It's from a
puzzle game. It will help if you look at this image:
http://www.johnjsal.devisland.net/switches.jpg
Here's the situation: Each of the four rows in the diagram is considered
a single 'panel'. Each panel...

by: tonywinslow1986 
last post by:
I'm reading MIT's book "Introduction to Algorithms".
The following is one of the excercises from it:
<
10.28
Explain how to implement doubly linked lists using only one pointer
value np per item instead of the usual two (next and prev). Assume
that all pointer values can be interpreted as kbit integers, and
define np to be np = next XOR...
 
by: fdu.xiaojf 
last post by:
Hi all,
I have two questions about scipy.
1) When I was trying to solve a single variable equations using scipy, I
found two methods: scipy.optimize.fsolve, which is designated to find the
roots of a polynomial, and scipy.optimize.newton, which is used for Scalar
function root finding according to the help().
I have tried both, and it...

by: couge 
last post by:
Hi all,
I met a weird problem when using scipy.integrate.odeint(). It is followed as:
from scipy import *
y=integrate.odeint(lambda y,t:sin(y)*y,y0=random.rand(N),t=arange(0,100))
If N>= 73300 or N<=70400, it works well. Yet, within the range(70400,73300), it goes wrong with a error message "MemoryError".
I am very confused about...

by: purple 
last post by:
Could you guys do me a favor for solving a equation set?
Z=d/4*(1SIN(X)/X)
X=8q/(D^2*Y)+SIN(X)
Y=1/n*Z^(2/3)*i^(1/2)
In this equation set, X,Y&Z are the unkown parameters, the others say,
d, q, n&i are known. SO in python, how to program it to represent X, Y
and Z in the form of d, q, n and i?

by: marktang 
last post by:
ONU (Optical Network Unit) is one of the key components for providing highspeed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...

by: Hystou 
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...

by: jinu1996 
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
 
by: agi2029 
last post by:
Let's talk about the concept of autonomous AI software engineers and nocode agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...

by: isladogs 
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...

by: conductexam 
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...

by: TSSRALBI 
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LANtoLAN VPNs.
The last exercise I practiced was to create a LANtoLAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...

by: 6302768590 
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

by: muto222 
last post by:
How can i add a mobile payment intergratation into php mysql website.
 