Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 337 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

Axel, You know, when a person asking a question doesn't even reply to our posts, I am losing interest to continuing a topic. That seems to happen with almost all of my blog posts. Recently - < a href="http://www.mapleprimes.com/blog/alec/matrix-algebra-over-finite-fields">Matrix Algebra over Finite Fields, Simulation of Brownian Motion, 1d phase portrait in Classic Maple, as well as this one, Numerical Inverse Laplace Transform. __________ Alec Mihailovs http://mihailovs.com/Alec/
K doesn't need resetting. It is still the same K, and values of x could be found either as
solve({K,y=6}),solve({K,y=-6});

  {y = 6, x = 3}, {y = 6, x = 3}, {y = -6, x = -3}, {y = -6, x = -3}
or if you want to use substitution, as
solve(subs(y=6,K));
                                 3, 3
solve(subs(y=-6,K));
                                -3, -3
The way that I showed in an earlier post is more efficient though. __________ Alec Mihailovs http://mihailovs.com/Alec/
K doesn't need resetting. It is still the same K, and values of x could be found either as
solve({K,y=6}),solve({K,y=-6});

  {y = 6, x = 3}, {y = 6, x = 3}, {y = -6, x = -3}, {y = -6, x = -3}
or if you want to use substitution, as
solve(subs(y=6,K));
                                 3, 3
solve(subs(y=-6,K));
                                -3, -3
The way that I showed in an earlier post is more efficient though. __________ Alec Mihailovs http://mihailovs.com/Alec/
In your worksheet, click Ctrl+A, then Ctrl+C. That would copy it to the clipboard. Then here, in your post, type <pre> then click Ctrl+V and type </pre> after that. __________ Alec Mihailovs http://mihailovs.com/Alec/
In your worksheet, click Ctrl+A, then Ctrl+C. That would copy it to the clipboard. Then here, in your post, type <pre> then click Ctrl+V and type </pre> after that. __________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
solve({A,B});

                    {x = 0, y = 0}, {x = 0, y = 0}
I don't download worksheets and neither some other people who could help you. I meant pasting it here in your post. __________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
solve({A,B});

                    {x = 0, y = 0}, {x = 0, y = 0}
I don't download worksheets and neither some other people who could help you. I meant pasting it here in your post. __________ Alec Mihailovs http://mihailovs.com/Alec/
Nested verification can be done in Maple using the following command,
VerifyTools:-AddVerification(nested=proc(x,y,ver::verification)
if whattype(x)=whattype(y) then 
if x::Vector then verify(x,y,'Vector'('nested'(args[3..-1])))
elif x::Matrix then verify(x,y,'Matrix'('nested'(args[3..-1])))
elif x::Array then verify(x,y,'Array'('nested'(args[3..-1])))
elif x::array then verify(x,y,'array'('nested'(args[3..-1])))
elif x::set then verify(x,y,'set'('nested'(args[3..-1])))
elif x::list then verify(x,y,'list'('nested'(args[3..-1])))
elif x::relation then verify(x,y,'relation'('nested'(args[3..-1]))) 
elif x::range then verify(x,y,'range'('nested'(args[3..-1]))) 
else verify(x,y,args[3..-1]) fi 
else verify(x,y,args[3..-1])
fi end);
It works as follows,
verify(expr1,expr2,nested(some_verification));
For example,
A:=<<[[exp(I*x),x-x^2],{sin(x)^2,3}],(x-x^2<0)>|
<(5=y-z),{{[[1..2,3..x^2+x],5],3},(y-1)^2}>>;

  A :=

        [                 2             2              ]
        [[[exp(x I), x - x ], {3, sin(x) }] , 5 = y - z]

        [     2                            2                   2 ]
        [x - x  < 0 , {{3, [[1 .. 2, 3 .. x  + x], 5]}, (y - 1) }]

B:=<<[[cos(x)+I*sin(x),x*(1-x)],{2+sin(x)^2+cos(x)^2,1-cos(x)^2}],(x<x^2)>|
<(z=y-5),{y^2-2*y+1,{3,[[cosh(x)^2-sinh(x)^2..2.,3.0..x*(x+1)],5.0000]}}>>;

  B :=

        [
        [[[cos(x) + sin(x) I, x (1 - x)],

                   2            2         2              ]
        {1 - cos(x) , 2 + sin(x)  + cos(x) }] , z = y - 5]

        [     2     2
        [x < x  , {y  - 2 y + 1,

                     2          2
        {3, [[cosh(x)  - sinh(x)  .. 2., 3.0 .. x (x + 1)], 5.0000]}}

        ]
        ]

verify(A,B,nested(testeq));

                                 true
Another example,
verify([[2,3],{1,5}],[[2.,3.0],{1.,5.00}],nested);

                                 true
______________ Alec Mihailovs http://mihailovs.com/Alec/
  1. It seems as if one should use type instead of hastype in your procedures.
  2. convert/listlist doesn't work with sets, so convertAMVStolist(eq) would give an error if eq is a set. It could be written as
    clist:=eq->if eq::{array,rtable} then convert(eq,listlist) 
    elif eq::set then convert(eq,list) else eq fi:
    but it may be not a good idea to convert sets to lists, because converted lists may be not equal (they may be ordered differently) for equal sets.
__________ Alec Mihailovs http://mihailovs.com/Alec/
I already posted that in the forums, but I repost it here just so that it could be found more easily. A new verification procedure can be added as in the following example,
VerifyTools:-AddVerification(example=proc(x,y) evalb(x=y^2) or evalb(y=x^2) end);

verify(1,3,example);
                                false
verify(2,4,example);
                                 true
A series of examples of verification procedures can be found through
kernelopts(opaquemodules=false):
interface(verboseproc=2):
print(VerifyTools:-VerifyTab);
__________ Alec Mihailovs http://mihailovs.com/Alec/
Thank you. Your comment made me to extend the procedure for piecewise continuous functions. Alec
That happened earlier with my blog entry Numerical Inverse Laplace Transform. I think I forgot to specify Content type and Content categories at the top. So I posted it again, that time with specifying Content type and Content category. This time it appeared in blogs, with -0 added at the end of the html link to it. __________ Alec Mihailovs http://mihailovs.com/Alec/
Well, one of r, U, or ω has to be added to t[3] and t[5] -because of the restriction that I mentioned - solutions exist only if rωU/(12π) is an integer. Otherwise, solve won't give an answer. _________ Alec Mihailovs http://mihailovs.com/Alec/
It seems as if your system can be solved without tricks,
t[1],t[2],t[4],t[6]:=0,delta,t[3]+delta,t[5]+delta:
u1:=(t[2]-t[1])+(t[4]-t[3])+(t[6]-t[5])=U/2:
delta:=solve(u1,delta):
eq1:=expand(add((-1)^(i+1)*cos(omega*t[i]),i=1..6)=0):
eq2:=expand(add((-1)^(i+1)*sin(omega*t[i]),i=1..6)=0):
eq3:=expand(add((-1)^(i+1)*cos(r*omega*t[i]),i=1..6)=0):
eq4:=expand(add((-1)^(i+1)*sin(r*omega*t[i]),i=1..6)=0):
_EnvAllSolutions:=true:
_EnvExplicit:=true:
s:=solve({eq1,eq2,eq3,eq4},{t[3],t[5],r});

            12 Pi _Z1~         2/3 Pi + 2 Pi _Z4~
  s := {r = ----------, t[5] = ------------------,
             omega U                 omega

               -2/3 Pi + 2 Pi _Z6~        12 Pi _Z1~
        t[3] = -------------------}, {r = ----------,
                      omega                omega U

               -2/3 Pi + 2 Pi _Z4~         2/3 Pi + 2 Pi _Z6~
        t[5] = -------------------, t[3] = ------------------}
                      omega                      omega
Note, that both solutions satisfy condition r*ω*U/12/Pi = an integer,
about(_Z1,_Z4,_Z6);

Originally _Z1, renamed _Z1~:
  is assumed to be: integer

Originally _Z4, renamed _Z4~:
  is assumed to be: integer

Originally _Z6, renamed _Z6~:
  is assumed to be: integer
Substituting integer values for _Zs, we obtain 2 series of solutions, for example,
s1:=eval(s,[_Z1=1,_Z4=1,_Z6=1]);

              12 Pi           8 Pi            4 Pi
  s1 := {r = -------, t[5] = -------, t[3] = -------},
             omega U         3 omega         3 omega

              12 Pi           4 Pi            8 Pi
        {r = -------, t[5] = -------, t[3] = -------}
             omega U         3 omega         3 omega

eval([eq1,eq2,eq3,eq4],s1[1]);

                     [0 = 0, 0 = 0, 0 = 0, 0 = 0]
__________ Alec Mihailovs http://mihailovs.com/Alec/
Debugger can be used,
stopat(Student:-Calculus1:-AntiderivativeTutor):
Student:-Calculus1:-AntiderivativeTutor();
Debugger starts, type at the debugger prompt
showstat(AntiderivativeMaplet);
After the procedure has been displayed, type stop at the debugger prompt, or, if Standard Maple is used, copy the output (maplet is located on line 32) and click Quit. For the second question, sin(x) is located under the 3rd button in the palette and ln(x) and ex are under the 4th button. I would use a TextField for the expression input and a MathMLViewer to see it. __________ Alec Mihailovs http://mihailovs.com/Alec/
First 154 155 156 157 158 159 160 Last Page 156 of 180