Items tagged with system system Tagged Items Feed

I have a problem solving a system of PDEs.

The system of PDEs are

PDE01 := -(l^2+1^2)*(diff(v(l, t), t))+(l^2+1^2)*(diff(R(l, t), l, l))+4*l*(diff(R(l, t), l))+4*l*v(l, t)/(l^2+1^2)^(1/4)-6*R(l, t)/(l^2+1^2)+(l^2+1^2)^(1/2)*(-1.1+sqrt(.1))^2*sqrt(24)*u(l, t) = 0

PDE02 := diff(R(l, t), t) = v(l, t)

PDE03 := diff(u(l, t), t)-sqrt((1.1^2-1)/1.1^2)*(diff(u(l, t), l))-2*l*sqrt(1.1^2-1)*u(l, t)/(l^2+1^2) = 0

the initial condisions are

v(l, 0) = 0, R(l, 0) = 0, u(l, 0) = sqrt((l^2+1^2)^(1/2))*10^(-5)*exp(-(l-10)^2/.5^2)

and the BCs are

bdry00 := {((30^2+1^2)/30^2)^(1/4)*v(-30, t) = -((30^2+1^2)/30^2)^(1/2)*(D[1](R))(-30, t), ((30^2+1^2)/30^2)^(1/4)*v(30, t) = -((30^2+1^2)/30^2)^(1/2)*(D[1](R))(30, t), u(-30, t) = sqrt(30^2+1^2)*10^(-5)*exp(-40000), u(30, t) = sqrt(30^2+1^2)*10^(-5)*exp(-10000)}

to solve the system,

I enter

pde := pdsolve({PDE01, PDE02, PDE03}, {bdry00, init00}, time = t, numeric, range = -30 .. 30, timesstep = 1/60, spaceste = 1/254)

then, I failed to get the result constantly.

I tried several cases changing the initial conditions...

Can you let me know what I am doing wrong?

 

Hi all,

 

It's been a while since I have used Maple. To be honest I haven't used it for over six years.

 

I am trying to solve simple differential equations, however I have many issues.

 

I am trying to simulate what author of this paper did 06421188.pdf

 

My file looks like this (Pendulum.mw)

 

Can someone help me to simulate this system? I simply can't remember how to do it.

 

Cheers,

Bart

I'm given the following two equations:

x^3-4x=y, y^3-4y=x

to solve the system, I've just used

eqns:={x^3-4x=y,y^3-4y=x};

vars:={x,y};

solns:=solve(eqns,vars);

and have obtained only four solutions when I should instead get 9. Is there a mistake in my approach?

Hi there,

I've got the following differential equation system:,

dU/dt = delta·dotD -lambda·U - kappa·U^2
dL/dt = (1-phi)·lambda·U + 1/4 ·kappa·U^2


being phi, delta, kappa, lambda, kappa some fixed parameters of the system, and where dotD (the derivative wrt time of a function D), which is defined a piecewise funtion:

dotD(t)=1/(3·T1)·DT for t in [0,T1]

dotD(t)=2/(3·(T2-T1-T))·DT for t in [T1+T,T2]

where T and DT are also known, and T1 approaches 0, and T2 approaches T1+T.

Setting the equation system in Maple and trying to solve it, gives a NULL result. However, trying to solve each piece separately seems to work fine.

Why is this?

 

Furthermore, taking limits for the [T1+T,T2] part (having solved each piece separately) yields an invalid limits point error. Ain't the possibility to take limits for both parameters at the same time?

Any ideas?

 

This is the Maple worksheet: MaplePrimes_LQ_model_solve.mw

Thank you.

jon

I'd like to know how to ask Maple to find numerical solutions to underspecified systems of nonlinear equations.  For example, suppose I had a system of equations like this:

eq1 := y1 = tanh(x1);

eq2 := y2 = cosh(x1 + x2);

eq3 := y1 + y2 = 2.0;

Typing this:

fsolve([eq1, eq2, eq3]);

results in the following error:

Error, (in fsolve) number of equations, 3, does not match number of variables, 4

In this situation I can easily artificially restrict the system to find a solution.  For example, I can do:

eq4 := x1 = 0.0;

fsolve([eq1, eq2, eq3, eq4]);

which will result in the following solution:

{x1 = 0., x2 = 1.316957897, y1 = 0., y2 = 2.000000000}

The issue here is that I pulled x1 = 0.0; out of thin air.  Setting a single variable to zero would not work to solve an arbitrary set of nonlinear equations.  How can I ask Maple to find a single (not necessarily unique) solution to an underspecified system of nonlinear equations?

Hi there,

I am trying to maximize a function given a set of values to a parameter in the function. The function is an differential equation belonging to a system of two differential equations.

I have a for loop to state different values to the parameter.

Maple yields the error:

Error, (in Optimization:-NLPSolve) cannot evaluate the solution further right of 0.17757507e-4, probably a singularity

When trying to maximize the function.

Supposed that I was doing something wrong in the loop, if I reproduce the contents of the loop outside, and set a value for the parameter. If I plot the solution of the ordinary differential equation, I can see where the maximum lies.

Having plot it, the Optimizamtion:-Maximize works as expected.

However, omitting the plot has a weird effect: I only get the same result depending on the bounds I set for the Maximization:

de1 := diff(A(t), t) = r*m*(1-g)*A(t)-piecewise(t < 8, r*A(t), t >= 8, (r+k)*A(t));
de2 := diff(G(t), t) = r*m*g*A(t)-l*G(t);

ics := A(0) = 25.0, G(0) = 0.;
num := dsolve({de1, de2, ics}, {A(t), G(t)}, type = numeric, output = listprocedure, parameters = [g]);

num(parameters = [g = .15]);
val := eval(G(t), num);

# odeplot(val, [t, G(t)], t = 0 .. 100);


Maximize(val);
Error, (in Optimization:-NLPSolve) cannot evaluate the solution further right of 0.17757507e-4, probably a singularity

val2 := Maximize(val);

Error, (in Optimization:-NLPSolve) cannot evaluate the solution further right of 0.17757507e-4, probably a singularity

val3 := Maximize(val(t), t = 0 .. 60);

  [10267.824035766165, [t = 8.25727747134303]]

val4 := Maximize(val(t), t = 0 .. 100);

[6.863211343195069e-9, [t = 59.84184367042171]]

 

The right answer is [10267.824035766165, [t = 8.25727747134303]]: Why do I get two different answers even if in that range there is only one relative maximum?

I ignore whether the way I am specifying the arguments for the Maximize function is correct. val is a procedure.

 

What am I missing?

Attached is the worksheet: MaplePrimes_malaria_param_variation_2.mw

 

Thanks,

jon

Good day everyone, could you please help use Gauss Elimination method for these system of equations. See the worksheet here F1.mw

Thanks.


Hi there,
I have a set of differential equations whose solution, Jacobian matrix and its eigenvalues, direction field, phase portrait and nullclines, need to be computed.

Each of the equations has a varying parameter.

I know how to get the above for a single parameter value, but when I set a range of values for the parameters, Maple is not able to handle all cases as I would expect: solving the differential equation system:

eq1 := x*(1.6*(1-(1/100)*x)-phi*y)
eq2 := (x/(15+x)-0.3e-1*x-.4)*y+.6+theta
desys := [eq1, eq2];
vars := [x, y];
steadyStates := map2(eval, vars, [solve(desys)])

already yields an error:
Error, (in unknown) invalid input: Utilities:-SetEquations expects its 2nd argument, equations, to be of type set({boolean, algebraic, relation}), but received {-600*y+(Array(1..2, {(1) = 8400, (2) = 15900})), Array(1..5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0})}


The equations are the following:
de1 := diff(x(t), t) = x(t)*(1.6*(1-(1/100)*x(t))-phi*y(t));
de2 := diff(y(t), t) = (x(t)/(15+x(t))-0.3e-1*x(t)-.4)*y(t)+.6+theta

the parameters being:
phi:=[0 0.5 1 1.5 2]
theta:=[5. 10.]

How can I handle the situation so that Maple computes each of the above for each combination of the parameters?

I would like to avoid using two for loops and having to store all results in increasingly bigger and complicated arrays.

The worksheet at issue is this: MaplePrimes_Tumour_model_phi_theta_variation.mw


Thanks,
jon

Hi there,

I have an ODE system which apparently needs some initial conditions to have its vector field plotted.

I am giving Maple's dfieldplot function the following arguments:


dfieldplot([de1, de2], [A(t), G(t)], t = 0..1, [A(0) = 25, G(0) = 0], A = 0..900, G = 0..200)

But Maple yields an error that reads:

Error, (in DEtools%2Fdfieldplot) invalid use of initial points or option - see phaseportrait

 

I would say that the initial conditions are correctly stated, according to the documentation of the function.

This is the attempt: MaplePrimes_Malaria_infection_cont.mw

 

Any ideas on what's missing?

Thanks,

jon

 

Hello friends!

I 'm a student and I don't know a lot about Maple, so I would be really grateful if anyone could help me.

I want to solve a system of two equations and I have two unknowns, which are k and εα. However I don't know what I am doing wrong and I can't solve it.

I have attached my file.

Thank you very much in advance!agogos_2.mw

 

Hi all!

 

I do a small calculation and get a system of 6
nonlinear equations.
And "n" is the degree of the equation is float.

Here are the calculations that lead to the system.

 

restart;
 with(DirectSearch):
 B:=1: 
 q:=1: 
 l:=1: 
 n:=4.7:
 V:=0.05:
 N:=1200:
 
 
 kappa:=Vector(N+1,[]):
 theta:=Vector(N+1,[]):
 u:=Vector(N,[]):
 M:=Vector(N,[]):
 Z:=Vector(N,[]):
 
 M_F:=q*(6*l*(z-l)-z^2/2):
 M_1:=piecewise((z<l), l-z, 0):
 M_2:=piecewise((z<2*l), 2*l-z, 0):
 M_3:=piecewise((z<3*l), 3*l-z, 0):
 M_4:=piecewise((z<4*l), 4*l-z, 0):
 M_5:=piecewise((z<5*l), 5*l-z, 0):
 M_6:=6*l-z:
 M_finish:=(X_1,X_2,X_3,X_4,X_5,X_6,z)->M_1*X_1+M_2*X_2+M_3*X_3+M_4*X_4+M_5*X_5+M_6*X_6+M_F:
 
 
 kappa_old:=0:
 theta_old:=0:
 u_old:=0:
 M_old:=0:
 
 
 step:=6*l/N:
 u[1]:=0:
 kappa[1]:=0:
 theta[1]:=0:
 
 
 
 
 for i from 2 to N do
 
 z:=i*step:
 kappa_new:=kappa_old+B/V*(M_finish(X_1,X_2,X_3,X_4,X_5,X_6,z))^n*step:
 
 theta_new:=theta_old+1/2*(kappa_old+kappa_new)*step:
 
 u_new:=u_old+1/2*(theta_old+theta_new)*step:
 
 Z[i]:=z:
 kappa[i]:=kappa_new:
 theta[i]:=theta_new:
 u[i]:=u_new:
 kappa_old:=kappa_new:
 theta_old:=theta_new:
 u_old:=u_new:
 
 end do:
 
 So,my system:


 u[N/6]=0;
 u[N/3]=0;
 u[N/2]=0;
 u[2*N/3]=0;
 u[5*N/6]=0;
 u[N]=0;

 

I want to ask advice on how to solve the system.
I wanted to use Newton's method, but I don't know the initial values X_1..X_6.

Tried to set the values X_1..X_6 and to minimize the functional
Fl:=(X_1,X_2,X_3,X_4,X_5,X_6)->(u[N/6])^2+(u[N/3])^2+(u[N/2])^2+(u[2*N/3])^2+(u[5*N/6])^2+(u[N])^2:

with the help with(DirectSearch):
GlobalOptima(Fl);
But I don't know what to do next

Please, advise me how to solve the system! I would be grateful for examples!

 

Hi i 2 questions. all pertaining to solving a systems of equations mod 2

First if i have a large set of equations, 11^3 equations in 11 unknowns and i want maple to give me ALL solutions mod 2 how can i do that? Maples msolve is loosing solutions.

Second suppose i want all unique solutions that say 6 of the variables can have but dont care what the solution to the other variables are as long as it is a solution. 

mini example:

say x=1,y=1,z=1 is a solution as well as x=1,y=1,z=0, i just want to know about x=1,y=1.

 

Hello I wonder if there any good solution for linear manipulation of sytem of equations(like sum, substract mulpiplication and etc. of equations). But main thing I want to find is there any demonstrative solution?

Something like a built-in equation manipulator but which serves system of equations.

I have been having problems with using the BodePlot function with units:

 

R1 := 18.2*10^3*Unit('Omega');

R2 := 10^3*Unit('Omega');

C1 := 470*10^(-12)*Unit('F');

C2 := 4.7*10^(-9)*Unit('F');

# wo is in hertz

wo := 1/sqrt(R1*R2*C1*C2);

# Q is unitless

Q := wo*R1*R2*C2/(R1+R2)

 

with(DynamicSystems);

sys := TransferFunction(wo^2/(s^2+wo*s/Q+wo^2));

 

This is the error message I got:

Error, (in Units:-Standard:-+) the units `1` and `Hz` have incompatible dimensions

 

I think the problem is that the BodePlot function doesn't expect 'wo' to have units.  

So I tried to work around the issue by using the loglogplot but it doesn't seem to like 

complex function even when I used abs to find the magnitude (with or without units).

 

 Any workaround is appreciated.

1 2 3 4 5 6 7 Last Page 1 of 15