Kitonum

21435 Reputation

26 Badges

17 years, 30 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Preben Alsholm  

Thanks for the detailed explanation.

I decided to once again carefully check everything. Your version works in a Standard Interface 32 bit Maple 2015.2 (under Windows 8) when we first start. But if, for example, remove the line of code  Expr := 'Expr'; , and then re-insert the code stops working. In Standard Interface  Maple 16  your code does not work.

In the Classic Interface  Maple 2015.2  your code (and my last version too) works without any limitation.

@Preben Alsholm  Brilliant solution!

Here's another version ( slightly shorter), based on the same idea:

Expr:=a*diff(x(t),t)+b*x(t)+r*diff(x(t),t,t)+a*diff(y(t),t)+b*diff(y(t),t,t)+c*y(t);

S1:=op~([selectremove(s->has(s, diff), [op(Expr)])]);

Expr:='Expr':

gc():

Expr:=add(i, i=S1);

 

Unfortunately your code (and mine too) does not work in the standard interface Maple 2015.2.  Only in classic one.

 

@Jenser  Perhaps you have an older version of Maple. Replace the line of code 

``(add(select(s->has(s,diff), L)))+add(select(s->not has(s,diff), L));

by the line

``(`+`(op(select(s->has(s,diff), L))))+`+`(op(select(s->not has(s,diff), L)));

@Bendesarts  The equation  eq_liaison  can be simplified by one-lined code:

eq_liaison:=sin(gamma0(t))*cos(beta0(t)) = -(sin(gamma[1](t))*sin(psi[1](t))*sin(theta[1](t))-sin(gamma[1](t))*cos(theta[1](t))*cos(psi[1](t))+cos(gamma[1](t))*sin(psi[1](t))*cos(theta[1](t))+cos(gamma[1](t))*cos(psi[1](t))*sin(theta[1](t)))*cos(beta[1](t));

lhs(eq_liaison)=1/2*(trigsubs(2*combine(rhs(eq_liaison))))[];

      

 

 

I do not understand your desire maximally to automate the task of fairly particular. I believe that the most effective way to work in Maple - is a reasonable combination of manual and automatic operation. The criteria of effectiveness - is the most quick and easy solution to a specific problem.

@Carl Love  Good solution! Unfortunately, I do not know much English and for me often easier to write new code than to understand the capabilities of the existing built-in commands.

@vv  I agree, but I understand the OP's question as finding the exact value  N(epsilon)

@Age  The quotes in  'deriv'(x)  exclude the premature  calculation. Without quotes  x  in  deriv(x)  should be a constant.

See

deriv(x);

Error, (in deriv) invalid input: fdiff expects its 2nd argument, N, to be of type {integer, name, list(integer), list(name), list(name = constant), set(name), set(name = constant), name = constant}, but received t = x

 

 

@Bendesarts 

plots[sparsematrixplot](Phi, matrixview, tickmarks=[[seq(i=q||i, i=1..3)], [seq(-i=Eq||i, i=1..3)]], scaling=constrained);

                                 

 

 

 

@Earl  I do not have Maple 15, but in the standard interface Maple 16 this is working properly.

@Bendesarts   I think that there is no single simplifying commands for all occasions. Your last expression can easily be simplified in a similar manner, applied to the right side:

-cos(gamma0(t))*cos(beta0(t)) = -(sin(psi[1](t))*cos(theta[1](t))*sin(gamma[1](t))-sin(psi[1](t))*sin(theta[1](t))*cos(gamma[1](t))+cos(theta[1](t))*cos(psi[1](t))*cos(gamma[1](t))+cos(psi[1](t))*sin(theta[1](t))*sin(gamma[1](t)))*cos(beta[1](t));

lhs(%)=(trigsubs(-2*combine(rhs(%)))/2)[];

 

 

 

@Leinad  What you asked about:

k:=4+f*I:

evalc(abs(k)-2=0) assuming f::real;

                                            (f^2+16)^(1/2)-2 = 0

@vv  Thank you, I didn't know before about  trigsubs  command.

@Bendesarts  Automatically you can do so:

S:=indets(eq_liaison);

S1:=indets(select(t->has(t, sin) or has(t, cos), S));

S minus S1 ;

 

 

 

@Bendesarts  Substitution  T  replaces more complex names with  simple names. I do not know why without these changes  the simplification is not fully implemented.

@acer  Thank you for your attention! Of course should be  s^(11/2)   instead.

First 82 83 84 85 86 87 88 Last Page 84 of 132