Items tagged with algebraic algebraic Tagged Items Feed

Hi,

can you please help me with the usage of applyrule? I have the following problem that I cannot isolate. I have a rule that I want to apply, but instead of applying the rule to the expression, the rule seems to be applied to itself. In an isolated worksheet everything is fine:

restart;

rule:=abs(''a''::algebraic)^2=''a''^2;

abs('a'::algebraic)^2 = 'a'^2

(1)

 

myexp:=abs(548.477146186283171377723+radius_motor*q_mot_vec_2(t)-l_wire_0[2])^2

abs(548.477146186283171377723+radius_motor*q_mot_vec_2(t)-l_wire_0[2])^2

(2)

applyrule(rule,myexp);

(548.477146186283171377723+radius_motor*q_mot_vec_2(t)-l_wire_0[2])^2

(3)

rule

abs(a::algebraic)^2 = a^2

(4)

 


Download applyrule.mw

What happens when I try to use this rule in my script is this:

restart;

#read "some_long_script.mpl":

rule:=abs(''a''::algebraic)^2=''a''^2;

abs('a'::algebraic)^2 = 'a'^2

(1)

applyrule(rule,abs(x)^2)

abs(x)^2

(2)

rule

a::algebraic^2 = a^2

(3)

 

>
 

I want to clarify, that the script that is read before applying those rules does not apply a similar rule. Also the variables rule and x were free. Can you please help me to locate the problem?

Thanks!

Honigmelone

Hello all,

I have an ODE system (please see bellow) where my unknowns are S(t) and K(t), all the the other symbols are known parameters. This system, by given the initial values for S and K, that is, S(0)=100 and K(0)=20, I can solve numerically.

sys:= diff(S(t), t) = -eta*K(t)*S(t)/(w*N*(S(t)+K(t))), diff(K(t), t) = eta*K(t)*S(t)/(w*N*(S(t)+K(t)))+S(t)*(-z*eta*alpha*K(t)^2+(-z*eta*alpha*S(t)-(eta*alpha^2*S(t)^2-2*N*C[max]*w*eta*alpha*K(t)+((-N*w+z)*alpha+N*C[max]^2*w*eta)*w*N)*upsilon)*K(t)+N*S(t)*w*alpha*upsilon*(N*w-z))/((K(t)^2*alpha*z+3*K(t)*S(t)*alpha*z+(2*S(t)*z*alpha+upsilon)*S(t))*w*N)

In addition, I have an algebraic equation:

eq1:= -c2 + (K(t2)*S(t2)+w*N*S(t2))*z=0,

where S(t2) and K(t2) are the solutions of my ODE sys in S and K at t=t2. The t2 is unknown time variable. 

My question is: how can I find t2 such that my algebraic equation (eq1) is satisfied.

Thanks in advance,

Dmitry

 

 

Is this deliberate or a bug?  If deliberate, what is the reason?

> Algebraic[GetAlgebraics]( 1*I );

                                        {I}

 

> Algebraic[GetAlgebraics]( 1.0*I );

                                        {}

 

Hello people in mapleprimes,

I hope you will give an answer to my following question.

This is a question of nonunit(algebraic) in patmatch.

In help page of maple this examples are on.

 

Case i)

>patmatch(a, A::(nonunit(algebraic))+B::(nonunit(algebraic)), 'la');

false

 

Case ii)

>patmatch(a,A::(nonunit(algebraic))+B::algebraic,'la'); la

ture

[A=a,B=0]

Is unit in the case of sum zero, so that in Case i) false is shown, though in Case ii) B=0 is returned?

 

Best wishes.

 

taro

 

 

 

How would one in Maple solve this, which is an inequality equation in some variables, which can be nonlinear, with constraints on range of each variable. I.e. I want to find conditions on the variables to make the inequality satisfied.

In Mathematica, I use the Reduce command

Clear[x, y];
eq = 1/2 - x + x^2 - y + y^2;
Reduce[{eq > 0, 0 < x < 1 && 0 < y < 1}, {x, y}, Reals]

How would one do the same in Maple? I tried solve, but can't give constraints.

restart;
eq:=1/2 -x+x^2-y+y^2:
solve(eq>0 , {x1, x2});

So I need to do the same as in the Mathematica command, but in Maple. I do not want numerical solution, but algebraic as shown above.

Using Maple 18.2 on windows.

I have a large system of linear algebraic equations that I want to solve (2005 Unknowns, 2005 Equations). I was wondering that what are the proper commands to use in maple for solving the system as fast as possible. Take a look at the files in the download link if you want to see the system of linear algebraic equations.

http://pc.cd/h79

Please provide me any suggesitons that you may think will be helpful like using other sofwares that are good in doing this work such as MATLAB or something else.


Thanks in Advance




I have a big expression with multiple terms. The expression is kind of :

expr = a*ln(u) + b*ln(u) + a*ln(v)+b*ln(v)

I want to factor ln(u) and ln(v) to get (a+b)*ln(u) + (a+b)*ln(v)

I tried factor(expr,ln(u)) but I get the error :
Error, (in factor) 2nd argument, ln(2*da+(4*da^2+4*d^2-4*da*Sigma[a]+Sigma[a]^2+Delta[b]^2)^(1/2)-Sigma[a]), is not a valid algebraic extension.

I tried without Delta[b] and Sigma[a] : deltab and sigmaa but it didn't work either.

Do you have an idea how to factor the many ln ?

Thanks,
Mathieu

Hi Everybody,

I'm having some problems simulating an algebraic system in Maple.  I want to do this for a larger system of equation (~20 equations/20 variables, with 3 inputs), but I'd like to get an idea of the form this should be in.

So, using an example out of Maple help:

with(DynamicSystems);

sys1:=AlgEquation([y=sin(x)],[x],[y],discrete=true,sampletime=0.001);

inp1:=Vector[column]([1,2,3,4,5,6,7]) * 0.1;

res:=Simulate(sys1,[inp1]);

Error, (in DynamicSystems:-Simulate) should never be here

 

I don't understand what this error means.  Reading the example in the help files, says the second argument should be a vector of input values.  What I would assume this would do is plugin x = 0.1, then solve y=sin(0.1), and output y.

Am I missing some syntax, or is my inputs wrong?  There are examples of how to set up an algebraic system in the help files, but no examples of how to simulate them.

 

Thanks in advance for any help!

 

 

 

 

why are the results of gcd(x^2+1,x+1) mod 2 and Gcd(x^2+1,x+1) mod 2 in maple  different ? 

I know the  `mod`(gcd(x^2+1, x+1), 2);
                               1
`mod`(Gcd(x^2+1, x+1), 2);
                             x + 1

but how do you explains this question? give me reason?

> find*a*polynomial*f;

 in F[7][x] ofdegree less than 4 solving the congruence(x^(2)-1)∗f≡x^(3)+2*x+5 mod x^(4)+2*x+1 inF[7][x] .;

show that the residue class ring F[343]=F[7][x]/is a field,and computer the inverse of x^(2) mod x^(3)+x+1in F[343].

Hi all,

I've just started learning Maple. I can't figure it out how to transform my problem into maple syntax.

My problem includes solving a simple algebraic equation, that is,

Y[k+1] = -10*Y[k]

I would like to solve this equation for different values of k, for example, k = 0,1,2,3.

and express my results in terms of Y[0], i.e,.

Y[1] = -10*Y[0];

Y[2] = -10*Y[1] = 100*Y[0]

Y[3] = -1000*Y[0]

I don't know...

Hello,

for my mechanical engineering studies we have to optimize an engine during a workshop. Therefore we have to use a numerical dsolve to solve the equation of motion. I have to get the maximum bearing reaction for a constant rpm. In order to get this I can't think of anything else but use the dsolve solution and use it in maximize.

 

ysk_2 := t -> -rc*cos(phi(t))-lp*cos(alpha(t))-lkb-y(t);
ysp_2 := t -> -rc*cos(phi(t))-lp2*cos(alpha(t))-y(t);

Does anyone here uses SemiAlgebraic or CylindricalAlgebraicDecompose commands often?

The following error (see file below) was not caused by a typo (with smaller polynomials, I do not get them). The system of polynomial inequalities is generated by a code so again there are no typos. Would any one know what this error means? Maple website has no information on it.

hi,

I am trying to make a custom on maple but when i get an error on dynamicSystems saying:

> sys := DynamicSystems[AlgEquation](eq, inputvariable = [Altura(t)], outputvariable = [Teste(t)]);
Error, (in DynamicSystems:-AlgEquation) algebraic equations cannot depend on past/future values of the input/output

But if i change AlgEquation to diffEquation i get no error. I dont have any diff equation on the system. This is happening with one of the "equations":

1 2 Page 1 of 2