473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

A question about using odeint to solve Van der Pol equation

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 Runge-kutta 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:vaderpol.py


from scipy import *
from pylab import *
u=0.1
deriv= lambda y,t :array([y[1],y[0]-u*(y[0]**2-1)*y[1]])

start=0
end=20000
numsteps=100000
time=linspace(start,end,numsteps)
from scipy import integrate
y0=array([0.01,0.0])
y=integrate.odeint(deriv,y0,time,hmax=0.2,hmin=0.0 01)
plot(time,y[:,0])
show()
Mar 1 '08 #1
0 1233

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Just | last post by:
While googling for a non-linear 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()...
5
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...
4
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...
27
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: ...
8
by: tonywinslow1986 | last post by:
I'm reading MIT's book "Introduction to Algorithms". The following is one of the excercises from it: < 10.2-8 Explain how to implement doubly linked lists using only one pointer value np per...
0
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...
0
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>=...
2
by: purple | last post by:
Could you guys do me a favor for solving a equation set? Z=d/4*(1-SIN(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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.