MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

So I am brand new to using Maple and am trying to solve a system of ODE's. When I try and use dsolve however I reciever the error "function expected" and I am not sure why. The code I have is as follows

 

sys_ode := diff(A(t), t) = a*(A(t)+B(t))-b1*A(t)*(C(t)+D(t))-g1*A(t)*B(t), diff(B(t), t) = -b2*B(t)*(C(t)+D(t))+g1*A(t)*B(t), diff(C(t), t) = e*(b1*A(t)+b2*B(t))*C(t)-g2*b2*C(t)*B(t)-g3*C(t)*D(t), diff(D(t), t) = g2*b2*C(t)*D(t)-m*D(t)

dsolve([sys_ode])

 

I'm sure it is something simple, but I just can't seem to figure out where the issue is. Any help is much appreciated.

I'm trying to substitute one Differential equation into another differential equation.

 

eq1:=d*n(t)/dt = (rho(t)-beta)*n(t)/Lambda+lambda*C(t)+q

eq2:=diff(eq1, t)

resulting in -> eq2 := d*(diff(n(t), t))/dt = (diff(rho(t), t))*n(t)/Lambda+(rho(t)-beta)*(diff(n(t), t))/Lambda+lambda*(diff(C(t), t))

then I'm given that (diff(C(t), t)) is given by another equation: 

eq3:=d*C(t)/dt = beta*n(t)/Lambda-lambda*C(t)

 

At this point I'm trying to substitute equation 3 into equation 2 for diff(C(t),t)

eq4 := subs(diff(C(t), t) = rhs(eq2), eq5)

 

however no matter what way's I try this I get an error: 

Error, (in simpl/reloprod) invalid terms in product: (d*(diff(n(t), t))/dt = (diff(rho(t), t))*n(t)/Lambda+(rho(t)-beta)*(diff(n(t), t))/Lambda+lambda*(diff(C(t), t)))^-1

 

I then tried to map it but again i got an error specifically about the first parameter: 

Error, invalid operator parameter name

eq5:=map((d/dt C(t))->beta/Lambda*n(t)-lambda*C(t),eq2)

 

I'm just wondering if what I am trying to do is even possible in Maple? 

If anyone can help I would greatly appreciate it! 

Hello ..

 

I need codes bifurcation and cobweb for logistic map by maple ..

 

can you help me ?

 

 

 

Thanks ...

I am trying to recreate journal work for validating using another computer program so I am trying to use maple to solve the ODE, based on further research I found using laplace might be the best but I am having some trouble.

 

eq8:=d*(n(t)+C(t))/drho = -rho(t)/(l*alpha*K_c)

given the initial conditions of:

ICs:= n(0) = n_0, rho(0) = rho_0, C(0) = (beta-rho_0)*n_0/(l*lambda)

therefore: 

equation9 := dsolve({equation8, ICs}, {C(t), n(t)}, method = laplace)

 

Following this process I get the error: 

Error, (in dsolve) invalid initial condition

 

According to the journal work the solution I am looking for is: 

C(t)=-n(t)+(rho_0^2+rho(t)^2)/(2*l*alpha*K_c)+((Beta+l*lambda-rho_0)*n_0)/(l*lambda)

 

is there something that I'm doing wrong or missing? 

Any help would be greatly Appreciated! 

 

I want to simulate Inelastic collision

 

 

There has 2 ball which I can change  Quality and Radius.

 

 

 

one ball  move to another stirless ball with diferent angle

Hi

I need your help .. I solve a system and I get the error Warning, solutions may have been lost.

The maple code is attached.

testerror.mw

Thank you for your help.

 

hi everyone , i need your point of view in my question,any help would be appreciated in advance .

we have a discrete function named g(t) and a continous function f(t) in in convolution integral just like this :
int(f(t-x)*g(x),x=0..t) ; 
we have just g(x) in some special points int the interval (0..t) , thus i need to convert this integral to a series.
how should i do this ? can anyone help or any idea ? i need at first a mathematical solution or idea about how to do this and then, how to do this in a software ?
tnx again.

I am trying to define some functions by recursion relations but I get this error:

Error, (in type/realcons) too many levels of recursion

Please see the attached file for details:

File.mw

restart:

Eq2 := diff(T(y), y, y)+(diff(sigma(y), y))*(diff(T(y), y))+(diff(T(y), y))^2+(exp(-y)

+exp(y))^2 = 0;

Eq3 := diff(sigma(y), y, y)+(diff(T(y), y, y))= 0;

bcs2:=T(h1)=0,T(h2)=1,sigma(h1)=0,sigma(h2)=1;

dsolve({Eq2,Eq3,bcs2});

This give me nothing. Please help me out. 

 

 

Dear all:

hello everybody;

I need your help to solve the system f(x,y)=0, and g(x,y)=0, such that there some parameter in the system, also all the parameter are positive and also our unkowns  x and y are also positive.

I try to write this code. I feel that under some condition we can have four solution or three or two. I need your help. Many thinks.

 

Systemsolve.mw

follow Computing non-commutative Groebner bases and Groebner bases for modules

in maple 12

Error, (in Groebner:-Basis) the first argument must be a list or set of polynomials or a PolynomialIdeal

 

then i find in maple 15 help file is changed from module M := [seq(Vector(subsop(i+1 = 1, [F[i], 0, 0, 0])), i = 1 .. 3)]

to array M := [seq( s^3*F[i] + s^(3-i), i=1..3)];

though it can run, but when apply other example can not run

such as

 

restart;
with(Groebner):
F := [x+y+z, x*y+y*z+z*x, x*y*z-1];
M := [seq( s^3*F[i] + s^(3-i), i=1..3)];
M := [[x*y,y,x],[x^2+x,y+x^2,y],[-y,x,y],[x^2,x,y]];
with(Ore_algebra);
A := poly_algebra(x,y,z,s);
T := MonomialOrder(A, lexdeg([s], [x,y,z]), {s});
G := Groebner[Basis](M, T);
Error, (in Groebner:-Basis) the first argument must be a list or set of polynomials or a PolynomialIdeal

G1 := select(proc(a) evalb(degree(a,s)=3) end proc, G);
[seq(Vector([seq(coeff(j,s,3-i), i=0..3)]), j=G1)];
C := Matrix([seq([seq(coeff(j,s,3-i), i=1..3)], j=G1)]);
GB := map(expand, convert(C.Vector(F), list));
Groebner[Basis](F, tdeg(x,y,z));

follow Computing non-commutative Groebner bases and Groebner bases for modules

using LeadingMonomials(f, lexdeg([s],[x,y]));

f:=[y^2+2*x^2*y, y^2];
f1:=[x*y-y,x^2];
f2:=[x,y^2-x];

g:=[f1,f2];

 

LeadingMonomial(g[1], lexdeg([s],[x,y]));
LeadingMonomial(g[2], lexdeg([s],[x,y]));
LeadingMonomial(g[1], lexdeg([s],[y,x]));
LeadingMonomial(g[2], lexdeg([s],[y,x]));

 

no result is (0,y^2)

where is wrong?

 

I`ve written this program:



It determines the power of the Ithfactor, only one problem. When I try to compute the factor of 512 I get 2_2 (subscript) which is extremly stupid. I want to know how I can change my program so that it can give the power of every ith factor. Thanks!

If I want to make a display of data, say 2 columns of data, with a heading on top of each column, how would one go about this in Maple? This will be for display purposes only (say for final result of a homework result, etc..)  

In Mathematica, I use the Grid command. I am not sure how to do this in Maple. I could not find Grid like command in Maple.

I can generate the data in 2 sequences  in Maple, but need to insert a heading, and also need to insert frame around eveything.

Here is an example:

f:=x->x^2;
g:=x->x^3;
data=[seq([i,f(i),g(i)],i=0..5)];
    #data = [[0, 0, 0], [1, 1, 1], [2, 4, 8], [3, 9, 27], [4, 16, 64], [5, 25, 125]]

The above data has 3 columns, 6 rows. I need to insert first row also called {"index","f","g"} and then display all in nice table form. This is how I would do the above in Mathematica to give idea of what I looking for

f[x_] := x^2;
g[x_] := x^3;
data = Table[{i, f[i], g[i]}, {i, 0, 5}]
    (* {{0, 0, 0}, {1, 1, 1}, {2, 4, 8}, {3, 9, 27}, {4, 16, 64}, {5, 25, 125}} *)

And this is below the part I do not know how to emulate in Maple:

data = Insert[data, {"i", "f(i)", "g(i)"}, 1]
    #   {{"i", "f(i)", "g(i)"}, {0, 0, 0}, {1, 1, 1}, {2, 4, 8}, {3, 9, 27}, {4, 16, 64}, {5, 25, 125}}
    # now use Grid to format with frame around everything
Grid[data, Frame -> All]

2 3 4 5 6 7 8 Last Page 4 of 1084