Items tagged with ode ode Tagged Items Feed

Hi,

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

What's wrong?

 

 

wzel

HT_one_layer_barrie.mw

 

Hello,

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 :


M:=1;                               

1l:=1;

g:=9.81; 

sys:=diff(z(t),t,t)=-1/z(t)*diff(x(t),t)^2-1/z(t)*diff(z(t),t)^2-x(t)/z(t)*diff(x(t),t,t),M*(-l^2/(x(t)*z(t)))*diff(x(t),t,t)=M*g-M*(-1/z(t)*diff(x(t),t)^2-1/z(t)*diff(z(t),t)^2);  

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

sol:=dsolve({sys,Cinit},numeric);

tx:=odeplot(sol,[t,x(t)],0..10,numpoints=200,color=blue,legend="x"):display(tx);

 tz:=odeplot(sol,[t,z(t)],0..10,numpoints=200,color=blue,legend="z"):display(tz); 

txz:=odeplot(sol,[x(t),z(x(t))],0..10,numpoints=200,color=blue,legend="z"):display(tz);(x)

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:

restart;

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

dsolve({ode=1,y(0)=0,y(1)=0,D(y)(0)=0,(D@D)(y)(1)=0},y(x),numeric);

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.

restart;
with(DEtools):
ode:=2*t*y(t)+t^2*(diff(y(t), t))+t^2*y(t)-2*y(t)-t*(diff(y(t), t)) = 0;
intfactor(ode);
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?

thanks,

--Nasser

Solve Differential Equation...

September 25 2013 yangtheary 60

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:
x:=Vector(N+1):

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...

Hello

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!

 

A:=Asource/muA;
Asource
-------
muA

Hello,

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...

4 5 6 7 8 9 10 Last Page 6 of 17