Justme303

36 Reputation

2 Badges

16 years, 134 days

MaplePrimes Activity


These are answers submitted by Justme303

It appears as if the problem magically disappeared which it should according to a more simplistic example:

> x0 := 1;

> x1 := 5;

> solx5 := solve({x5 = 4+2});

> if `and`(x0 = 0, x1 > 0) then assign(solx5) end if;

> value(x5); x5

while x0:=0 provides x5 with the value of 6, change of question therefore and that is how to use a clean startup of the worksheet, since i use restart at the top of my worksheet like restart: it seems however that this is not sufficient?

 


 

Wonder why I only get a solution (and doubt its the right one) when I use [ ], and the same error remains when using ( ) or no brackets for the last part of the expression -2*delta*x3, anyone? 

at least my line of thought is clear for this post;), thanks for checking

 

 

 

After adding brackets to the formula (depicted in bold at the end of the first line[ ]), the error is gone and I get a solution for the diff. equation.

> diff(x3, t) = 2*lambda*a*(1-p)*[x1*(x1-1)+x2*(x2-1)]-2*a*p*x3*[x2+2*(x3-1)]+[-2*delta*x3];
print(`output redirected...`); # input placeholder
         0 = [-0.10 x3 + 0.00300 x1 (x1 - 1) + 0.00300 x2 (x2 - 1)]

            - 0.00100 x3 [x2 + 2 x3 - 2]

> dsolve(diff(x3(t), t) = 2*lambda*a*(1-p)*[x1*(x1-1)+x2*(x2-1)]-2*a*p*x3(t)*[x2+2*(x3(t)-1)]+[-2*delta*x3(t)]);

which results in:

Intat(1/[-(1/1000)*x2*_a-(1/500)*_a^2-(49/500)*_a+(3/1000)*x1^2-(3/1000)*x1+(3/1000)*x2^2-(3/1000)*x2], _a = x3(t))+_C1 = 0
 

so I guess that's figured out, right?

Thanks Jean-Marc, for it works perfectly now, except for the following equation:

diff(x3, t) = 2*lambda*a(1-p)*[x1*(x1-1)+x2*(x2-1)]-2*a*p*x3*[x2+2*(x3-1)]-2*delta*x3

which I seek to solve using:

dsolve(diff(x3(t), t) = 2*lambda*a(1-p)*[x1*(x1-1)+x2*(x2-1)]-2*a*x3(t)*p*[x2+2*(x3(t)-1)]-2*delta*x3(t));

Somehow the following error keeps coming back:

"Error, (in tools/sign) invalid argument for sign, lcoeff or tcoeff"  which i cannot find in maple help,

any suggestions?

Kind Regards

 

 

 

 

 

 

 

 

Page 1 of 1