Items tagged with ode ode Tagged Items Feed

The damped driven pendulum is modeled using :

d2(x)/d(t2) + b*d(x)/d(t) + sin(x) = F*cos(x).  (4)

Numerically simulate (4) with b=0.22 and F=2.7

a) Starting from any reasonable initial condition, perform a phase portrait analysis. Show that the time series has an erratic appearance, and interpret it in terms of the pendulum's motion.

b) Plot the Poincare section by sampling the system whenever  t=2*pi*k, where k is an integer.

 d^2(x)/d(t^2) + sin(x)=0  (1)

d^2(x)/d(t^2) + x = 0 (2)

d^2(x)/d(t^2) + ( x - (x)^3/6) = 0 (3)

1) Compare the results of numerical simulations of (1), (2), (3) to see how closely the period of the periodic orbits relate.

a) Perform a phase portrait ( (x)'(t) vs. x ) analysis for (1), (2), and (3).

b) Consider the initial conditions x(0)= x0 and x'(0)=0. For what intervals of x0 do the periodic orbits of (2...


I am trying to plot solution of ode0 together with the maximum and minimum values but I am having difficulty since the first plot is a solution and second is values. I should have a plot with two line one represent the solution of ode0 and second (the max an min). Any advise or suggestion?

This is the code:

> restart;
with(DEtools); with(plots); Nsols := 5; Ntstep := 10;
 k := 0; A := 0.37e-1; B := 0.2e-6;
ode0 := diff(U(t), t) = -(A+B*U(t))*U(t);

part of my codes are:
func[1] := (1/2)*(c+s)*x[1]+s*x[3]+(s-c)*x[1]*x[2];
func[2] := (1/2)*(c-s)*x[1]+s*x[3]+(s+c)*x[1]*x[2];
func[3] := -b*x[2]-x[1]^2;
They are just three ODE , how to fix the error?Where is the so-called recursive assignment...?
The program works well when:
"func[1] := x[2] + (x[1]^2 - x[1]*x[3]);
func[2] := - x[1] +  (x[2]^2 + x[1]*x[4]) + x[2]^3;

I was trying to solve for the equilibrium points for a system of differential equations.  Solving for the last equation, I encountered an error that I can't seem to find anywhere else.  "Error, (in Engine:-Dispatch) not implemented yet: 13". The code is below if anyone wants to take a go a figuring what's up.  Thanks!




I am trying to get a shaded area in my plot but I could not.

First we solve ODE without randomness:

ode := diff(U(t), t) = -(A+B*U(t))*U(t);

Then we add randomness to ODE and solve:

ode2 := diff(U(t), t) = -(A+r(t)+B*U(t))*U(t);

A with randomness for r in R=( - 0.0001/365, 0.0001/365) is:

A(t,r)= A+r

Where A is constant =  0.0001/365

We plot both solution. For the plot I...

Hi all I have the following ODE

ODE_1:=diff(w(r),r)+R*(diff(w(r), r))^3=K/r;

ODE_T_1:=collect(algsubs(w(r)=u(r)+(r-1)*(U-0)/(delta-1), ODE_1),diff(u(r), r)) ;


 and when I try to do the following integration,

eq1:=int(phi[i](r)*ODE_T_1, assuming delta > 1;

it gives the following error


Error, (in assuming) when calling 'int'. Received: 'wrong number (or type) of arguments:

The system of ODEs i am trying to analyse is just a 3d model of a ball in motion with gravity and air resistence acting upon it.



eq1 := diff(x(t), t, t) = -k*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2)^(n-1)*(diff(x(t), t))

eq2 := diff(y(t), t, t) = k*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2)^(n-1)*(diff(y(t), t))

eq3 := diff(z(t), t, t) = -g-k*sqrt((diff(x(t), t))^2+(diff(y(t), t...



I have two separate procedures, one which solves a series of ODE's using the midpoint runge-kutta method, and one which solves using the Taylor expansion.

I am able to graph the two results (Q1 vs time) on separate graphs within the procedure, however after "end proc" I can't retrieve the figure or plot the two seperate results on the same graph to compare the values.

Is there an easy way of doing this or do I have to rewrite the procedure to include both methods?

Hi, I am trying to plot a solution curve on a vector field with an initial condition of y(0)=0 and I keep getting error messages. This is what I have so far:


with(DEtools); dfieldplot(diff(y(x), x) = x^2+y(x)^2-1, y(x), x = 0 .. 5, y = -1 .. 5, arrows = line, title = 'Slope*Field');


Thank you. 


After upgrading to Maple 16.02, the Maple code:


produces the directions field but fails to produce the solution curves.

I have tried the same code on two different machines running Maple 16.02 with identical results.  I have also tried the code on Maple 16.01.  In this case the solution curves are produced.


I have already solved my ODEs and used odeplot to analyse the change over time (0 to 10).

Below is my ODE,

d(a(t))/dt = x - y*(a(t))

d(b(t))/dt = m*a - n*(b(t))


My query here is,

I need to substitute a(t) and b(t) in a seperate equation,

h(t) = 60/0.98 * (a(t))*(b(t))

and i need to plot 'h' over time (0 to 10)

How do I go about doing this?

Please help.



Hey guys..

I need some help on determining the correlation coefficient between my data points for an Influenza epidemic and the SIR model, with my estimated parameters Beta and Alpha. The initial conditions for the equations are defined at the beginning of my worksheet:

Hope someone can help me ;)




Hey guys

I am currently working on my final project in high school. This project is about mathematical modelling within epidemology, and i am currently working on the mathematical models based on the SIR model.

The basis models for the SIR model were pretty easy, but i cant figure out how to fit data to my models. My first idea was to use the method of Leastsquare and/or Nonlinearfit, but i cant figure out how to do this in maple.

Suppose X with two dots on the top +2*x with one dot on the top +3*x=4*t;x(0)=1; x with one dot on the top =2. using maple and Euler method approximate x(3.0) and x with one dot on the top (3.0) using a step size of h = 0.01. Edit your output to fit on one side of a single sheet of paper. Include Maple source code and circle the values for x(3.0) and x with one dot on the top (3.0).

5 6 7 8 9 10 11 Last Page 7 of 18