taro

505 Reputation

12 Badges

11 years, 155 days
Maple is to me difficult. The first version I bought was Maple9, and it was more than 15 years ago. But, I couldn't use it, feeling it too difficult. But, three years ago, I thought Maple might be helpful to my study, and since then, I have continued to learn Maple. As I got able to read the Maple help, I think that I could get to use maple better now than before. But, I feel that I am a beginner yet.

MaplePrimes Activity


These are replies submitted by taro

@Markiyan Hirnyk 

Thank you. Now I did it.

taro

@Mac Dude 

If there are times you feel coefficients complicated, you can use changevar in Student package, as

>bb:=-2*P1*A[Q1]+A[0]^2+A[Q1]^2-2*A[0]*rho*P2/(rho+Q1)+A[Q3]^2-2*P3*A[Q3]+P1^2+rho^2*P2^2/(rho+Q1)^2+P3^2+m^2*c^4;
                       2        2   2 A[0] rho P2        2
     -2 P1 A[Q1] + A[0]  + A[Q1]  - ------------- + A[Q3]
                                      rho + Q1            

                                 2   2                
                         2    rho  P2        2    2  4
        - 2 P3 A[Q3] + P1  + ----------- + P3  + m  c
                                       2              
                             (rho + Q1)               
>with(student):
>p:=changevar(rho*P2/(rho+Q1)=t,bb);
   4  2     2                  2                 2           
  c  m  + P1  - 2 P1 A[Q1] + P3  - 2 P3 A[Q3] + t  - 2 t A[0]

           2        2        2
     + A[0]  + A[Q1]  + A[Q3]
>with(Student[Precalculus]):
>q:=CompleteSquare(p,A[Q1]);
            2    2  4     2                 2                  2
(A[Q1] - P1)  + m  c  + P3  - 2 P3 A[Q3] + t  - 2 A[0] t + A[0]

          2
   + A[Q3]
>r:=CompleteSquare(q,A[Q3]);
             2               2    2  4    2                  2
 (A[Q3] - P3)  + (A[Q1] - P1)  + m  c  + t  - 2 A[0] t + A[0]
>s:=CompleteSquare(r,A[0]);
                2               2               2    2  4
      (A[0] - t)  + (A[Q3] - P3)  + (A[Q1] - P1)  + m  c
>w:=changevar(t=rho*P2/(rho+Q1),s);
                    2                                        
   /        rho P2 \                2               2    2  4
   |A[0] - --------|  + (A[Q3] - P3)  + (A[Q1] - P1)  + m  c
   \       rho + Q1/                                         

taro

@Markiyan Hirnyk 

Thank you

from taro, a beginner.

@Carl Love 

Thank you for your reply.

I don't know well about the use of plex, as I only read a pdf for high school students about Groebner basis.

But, as the error occurs when multiple siderels are included, I have only to limit it to only one siderel, with 

writing another line after then.

These work fine.

C1)

simplify(x1=a-y1-d*y2, {a-y2-d*y1= x2},plex(y2,y1));
simplify(%,{ 1-d^2= b, a-a*d= c});

C2)

simplify(x1=a-y1-d*y2, {a-y2-d*y1= x2},plex(y1,y2));

simplify(%,{ 1-d^2= b, a-a*d= c});

Thank you.

 

taro

 

@Carl Love 

Thank you for your reply and for teaching me a lot.

x1:= a-y1-d*y2;x2:= a-y2-d*y1;x3:=x1-d*x2;x4:=collect(x3,{y1,y2});algsubs(a-a*d=c,%);algsubs(1-d^2=b,%);

brings that the result of x3, which is x1-d*x2, is -b*y1+c. So, x1=d*x2-b*y1+c.

I could understand at last that your code is simple and nice for it: there is no need to algsubs twice. And, there is no need to solve an equation.

 

On the other hand, I have another question. Is it possible to eliminate y1 instead of y2, with your code?

For example

Both of the followings work;

A1)

restart;
simplify(a-d*y2-y1=x1,{3-d*y1-2*y2=5},plex(y1,y2));
A2)

restart;
simplify(a-y1-d*y2=x1,{3-2*y2-d*y1=5},plex(y2,y1));

But, the followings return an error that "Error, (in simplify/siderels:-simplify/siderels) invalid side relations:  Groebner basis contains the element 1"

B1)

restart;
simplify(x1=a-y1-d*y2, {a-y2-d*y1= x2, 1-d^2= b, a-a*d= c},plex(y2,y1));
B2)

restart;

simplify(x1=a-y1-d*y2, {a-y2-d*y1= x2, 1-d^2= b, a-a*d= c},plex(y1,y2));

taro

 

 

 

 

 

I'm glad to read your explanation for beginners.

As difficult problems and their solutions are posted into mapleprimes, easy explanations like yours help

beginners like me a lot.

By the way, as for the original problem of SY G, to me it seems that he wanted just to make a new expression 

of x1 -d*x2, just having a typo of x2 in x1 = c - b*y1+d*x2. As for it, x1:= a-y1-d*y2;x2:= a-y2-d*y1;x3:=x1-d*x2;x4:=collect(x3,{y1,y2});algsubs(d*a-a=c,(d^2-1)*y1-d*a+a);algsubs(d^2-1=b,%);

works.

taro

 

I hope that the title of spam messages will be deleted also

from the lists of Recent Question and Active Conversations.

 

@Alex Smith

@tomleslie 

 

Thank you for your teaching.

I could understand well that what appeared was caused by incompletely choosing part in copying.

I think that things written in Calling Sequence of Help are not complete maple inputs, so this strage thing 

occurred.

 

Best wishes.

taro

 

 

@tomleslie 

Sorry, I edited what I had written.

I know how to change the way expressions are displayed, 1-D math or 2-D, and how to create a worksheet with contents of a help page.

 

@Axel Vogt

@Markiyan Hirnyk 

Thank you for your kindly teaching me about my question.

From exp(x + Complex(1)*y)=exp(x) * (cos(y) + Complex(1)*sin(y));

x and y in

exp(ln(2) + (1/3*Complex(1))* Pi) (**)

are

ln(2) and (1/3)*Pi, respectively.

So, (**) is written as exp(ln(2))*(cos((1/3)*Pi) + Complex(1)*sin((1/3)*Pi),

which is written to be 2*(1/2 + (sqrt(3)/2)* Complex(1)).

 

This is a problem of mathematics, isn't it, rather than maple itself.

But, your answers helped me a lot.

Thank you for showing me how to use evalc to me, Markiyan.

 

Best wishes

taro

 

@Carl Love

@Preben Alsholm

 

Thank you for two of yours' kindness of spending time in explaining your answer enough to me.

I could understand well i) what (x->1+x)(3) means, ii) how h1:=1+x; proc(x) h1 end proc works,

and especially iii) the level of evaluation, owing to you.

I feel maple is a difficult tool to learn, and I think if Carl had explained only the rule of thumb relating to

direct and indirect reference, that feeling for maple had strenthed more. So, I appreciate him very much

for explaining the logics.

Great thanks.

taro

 

@Carl Love 

Owing to you and Preben, I could understand the evaluation in procedure.

And, I think now that the sentence which I quoted "This means that using a variable in an expression will yield the current value of that variable, rather than first evaluating that value" is quite confusing.

When the procedure is called, f1 is evaluated only by one level which makes f1 be 1+x.

If this level is by two level, 1+x would be evalated to be 3 with procedure call of g(2), but in procedure,

evaluation is only single level, which is explained in the introductory programming guide of maple9 as "maple evaluates

 the local variable a to one level."

But, I don't know whether f1 can be regarded as local variable in the context

of the following:

restart;

f1:=1+x;

g:=proc(a)

option operator, arrow;

f1 end proc:

g(2);

In the introductory programming guide of maple 9, two cases where variables are regared as local variable are

listed, but those are the case of b where b:=a is written in a procedure and the case of t where t is in "if" or "while"

clauses. As for f1 in my example, there are no mention in the guide.

 

 Preben explains in a little more detail about the actual evaluation in my example being done, and you explains at some great lenght how evaluation is done generally.

Thanks a lot to two of you.

 

 

 

 

 

Thank you all of you,

@Markiyan Hirnyk

@Carl Love

@Preben Alsholm 

Thanks to you, I could think of and learn arrow(->), evaluation of procedure, and unapply.

In the end, as Carl explains, arrow means the sentence with it is procedure.

And, as Preben explains, variables in procedures has unique way of being evaluated.

Besides, I found that in the explanation of help there are some places a little more explanation should be needed.

But, owing to Markiyan's pointing out the part in help, I could understand what it means.

And, I found in help page of "Procedures," there is the following description:

"Within a procedure, during the execution of its statementSequence, local variables have single level evaluation. This means that using a variable in an expression will yield the current value of that variable, rather than first evaluating that value. This is in contrast to how variables are evaluated outside of a procedure, but is similar to how variables work in other programming languages."

I think that this is what Preben is explaining.

But, why can't I find the meaning of the "single level evaluation" or the difference between current value of that

variable and first evaluating that value, in help of Maple?

 

In the end, Thank Carl for remembering me of operators such as `&->`, `+` can be placed at the midposition, 

and in front of sequence, like in Lisp. And, as for unapply, it is written as works like lambda function in Lisp,

but, as I just began to learn elisp recently, I think I can deepen my understanding of it later.

@itsme 

 

Thank you for teaching me about how I can use emacs when I use it along with maple.

I could understand the ways you suggested. I will try them and find a way suitable to me.

 

Best wishes.

taro

 

 

If there is any answer to me, it would be the following link.

https://github.com/JoeRiel/maplev 

So, what I need to do is to think about installing files there to the folders relating tp emacs.

Thanks anyway.

 

First 15 16 17 18 19 20 21 Page 17 of 23