Items tagged with ode ode Tagged Items Feed

I've been having trouble plotting in polar coordinates. My code is included below:

The ouput prints the 10 terms of the sum but the plot does not produce anything.

I also would like to know a method that I could use to plot with a going from zero to the size of the radius.

Thank you for any help.


I look for solving a DAE system i obtain after having determined the equations of a mechanical system with kinematic closed loops.

For that, thanks to the partitioning method, i could transform my DAE in ODE system.

But now, i don't manage to solve my ODE system.

The first issue was the calculation of big matrix with trigonometric functions. With your help in the post "Resolution of a big product of matrix with trigonometric function" ( , i could calculate the different matrix involved are calculated.

Now, the resolution with my differential system is very long and never finished.

@Carl Love 3670 gives me good advices. He asked me to try to avoid symbolic calculations of the matrix.

Do not use the output option for dsolve.

Then the following procedure evaluates the Matrix AA:

AA:= proc(S,t)
local Cu_inv:= eval(Cu, S(t))^(-1), tCu_inv:= eval(tCu, S(t))^(1);
     eval(Avv - Avu.Cu_inv.Cv + tCv.tCu_inv.Auu.Cu_inv.Cv - tCv.tCu_inv.Auv, S(t))
end proc:

           To use it, invoke AA(Sol, t) where t is an actual numeric value.

Unfortunately, i don't see how i can use this method for the moment? But, i think that there is a step i don't understand. For me, i have to make the calculation of the big matrix AA and QQ before solving my differentiel system because my differentiel system is composed with AA and QQ.

Here you can find the system i try to solve.


and here you can find the maple file without the steps leading to the setting of the equations



It should be simple, ...but results are wrong,
Please see for time above 4 hours.

What's wrong?






I would like to plot z(x(t)) with the odeplot function.

For the moment, i manage to plot x(t) and z(t).

But i don't manage to plot z(x(t)) ?

My last code lign is wrong.

Can you help me for this plotting ?

Thanks a lot


Here my code :





Cinit:=D(x)(0)=0,x(0)=0.99999999,D(z)(0)=0,z(0)=sqrt(l^2-0.99999999^2); D(x)(0) = 0, x(0) = 0.99999999, D(z)(0) = 0, z(0) = 0.0001414213562





I was trying to help someone solve this ODE in another forum. Can Maple solve it? I think the problem is not well formed, but I get these errors:


ode:=y(x)^2*diff( diff(y(x),x$2)/y(x),x$2);


The error is

Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead

The error message can be a little more clear. I had to...

Solve Differential Equation: y''-3y'-4=e^xsin4x

I might be doing something wrong here. But when I ask Maple 17 for the integrating factor of this ODE, it does not match the result if I find the integrating factor directly.

ode:=2*t*y(t)+t^2*(diff(y(t), t))+t^2*y(t)-2*y(t)-t*(diff(y(t), t)) = 0;
simplify(exp(int( (t^2+2*t-2)/(t^2-t),t)));

Why I am not getting the same result from the last 2 commands above?



Solve Differential Equation...

September 25 2013 yangtheary 65

Solve Differential Equation :(3x-y)*dy/dx=2x

Further tags : implicit form, Matlab codegen for GPOPS purposes

Hi there,

I would like to introduce my self and ask you for an advice. 

I have a four linked robot that i would really like to control by the meaning of the optimal control theory. The arm has 4 actuators (giving torques U) in corrispondence of 4 rotational joints. P parameters describe the system.

I got ht edynamic system with the Lagrangian method and now I have 4 2nd order...

Hi, I have a maple project and one of the questions reads: 

a. | Initially, a 100 – liter tank contains a salt solution with concentration 0.5 kg/liter. A fresher solution with concentration 0.1 kg/liter flows into the tank at the rate of 4 liter/min. The contents of the tank are kept well stirred, and the mixture flows out at the same rate it flows in.
i. Find the amount of salt in the tank as a function of time.

ii. Determine the concentration of salt in the tank at any time.

Below is my code for solving a solution of three first order ODEs using the 4th-order Runge-Kutta method.

I have been able to successfully plot the solutions of each of the ODEs (x,y,z) against time t, however I am struggling to produce a plot in the three dimensional phase domain of x,y,z. Could anybody suggest what commands to use as everything I have tried (plot, plot3d, implicitplot3d etc) has produced an error. 

h:= 0.01:
N:= 200:

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;
5 6 7 8 9 10 11 Last Page 7 of 19