Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 341 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

If you are interested in my publications, the list of them (with links) can be found in my vita. Some Maple related stuff, beside my posts here, can be downloaded from my old Maple page (don't use Firefox for accessing it - use IE). __________ Alec Mihailovs http://mihailovs.com/Alec/
If you are interested in my publications, the list of them (with links) can be found in my vita. Some Maple related stuff, beside my posts here, can be downloaded from my old Maple page (don't use Firefox for accessing it - use IE). __________ Alec Mihailovs http://mihailovs.com/Alec/
Well, the integrand is not always 0. It equals 0 if tan(x)>0 and it equals 2*Pi*I if tan(x)<0. So the integral shouldn't be always a constant. If you want to get a constant, you can simplify the integrand before integrating it, with some assumptions. For example,
f:=log(cot(x))+log(tan(x)):
simplify(f, symbolic);

                                  0

simplify(f) assuming x>0,x<Pi/2;

                                  0
Note, however, that as I said,
simplify(f) assuming x>Pi/2,x<Pi;

                                2 I Pi
__________ Alec Mihailovs http://mihailovs.com/Alec/
Congratulations with finishing your project and Happy Thanksgiving! I actually wrote a couple of Maple manuals and taught a Maple lab. __________ Alec Mihailovs http://mihailovs.com/Alec/
Congratulations with finishing your project and Happy Thanksgiving! I actually wrote a couple of Maple manuals and taught a Maple lab. __________ Alec Mihailovs http://mihailovs.com/Alec/
1. For example,
a:=[1, 1, 1, 3, 4, 7, 3.2, -1, -1, 5, 1, -1]:
select(x->abs(a[x])=1,[$1..12])[];

                        1, 2, 3, 8, 9, 11, 12

seq(a[i],i=%);

                        1, 1, 1, -1, -1, 1, -1
2. The maximal size of an array displayed inline can be specified using interface(rtablesize). For example,
interface(rtablesize=infinity):
a:=Array([$1..12]);

             a := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
And, as I said earlier, nops gives the number of elements of a list or a set, but for Arrays the following command should be used,
ArrayNumElems(a);

                                  12
or
Statistics:-Count(a);

                                  12
Also, if you clicked right mouse button on the output, you would see many operations available including the number of elements. __________ Alec Mihailovs http://mihailovs.com/Alec/
1. For example,
a:=[1, 1, 1, 3, 4, 7, 3.2, -1, -1, 5, 1, -1]:
select(x->abs(a[x])=1,[$1..12])[];

                        1, 2, 3, 8, 9, 11, 12

seq(a[i],i=%);

                        1, 1, 1, -1, -1, 1, -1
2. The maximal size of an array displayed inline can be specified using interface(rtablesize). For example,
interface(rtablesize=infinity):
a:=Array([$1..12]);

             a := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
And, as I said earlier, nops gives the number of elements of a list or a set, but for Arrays the following command should be used,
ArrayNumElems(a);

                                  12
or
Statistics:-Count(a);

                                  12
Also, if you clicked right mouse button on the output, you would see many operations available including the number of elements. __________ Alec Mihailovs http://mihailovs.com/Alec/
1. Yes, using op(a) plots [-5,-3,1,2,4], but it is not what you originally wanted - you wanted to plot positive peaks. Every number m gives 2 peaks - at m and at -m. So positive peaks in this example will be at [1,2,3,4,5]. The last procedure f in my post does that. 2. Yes, it can be done by using view option. Note however that in that case it is more likely that the tickmarks will overlap. 3. Using numboccur,
a:=[1, 1, 1, 3, 4, 7, 3.2, -1, -1, 5, 1, -1]:
numboccur(a,{1,-1});
                                  7
4.(1) For example,
a:=[1,2,3,4,1,5,2,2]:
f:=a->evalb(nops(a)<>nops({op(a)})):
f(a);

                                 true
(2)
ListTools:-FindRepetitions(a);

                              [1, 2, 2]
5. As I said a few times earlier, don't use arrays or tables; use lists or Arrays. The corresponding operations are op(2,eval(a)) for arrays - that gives a range, something like 1..5, and if you know that the first index is 1, then the number of elements can be obtained as op([2,2],eval(a)). For tables that can be done as nops(op(op(t))). For lists it's much more simple - just nops(a). For Arrays, ArrayNumElems(a) - one can easily see that the command was created during a transition period from old Maple names, short but cryptic, to new Maple names, similar to Mathematica names; if it was created earlier, it would be named nels; if it was created now, it would be, probably, named ArrayTools:-Main_AT:-ArrayInformation:-Main_AI:-BasicArrayInformation:- `www.maplesoft.com/NumberOfArrayElements`. 6. It is not only pos, it is both pos and neg. It's not that simple. One way is to sort [op(a),-op(a)] and then choose the 5 top elements, but that doesn't work in this case, because the order can not be determined uniquely, mainly because of the closest to 0 element that can be either positive or negative. It is much easier to do for numerical values - using pos and neg and the same sequence constructed from them as in f (the last procedure in my post with plotting procedures.) _________ Alec Mihailovs http://mihailovs.com/Alec/
1. Yes, using op(a) plots [-5,-3,1,2,4], but it is not what you originally wanted - you wanted to plot positive peaks. Every number m gives 2 peaks - at m and at -m. So positive peaks in this example will be at [1,2,3,4,5]. The last procedure f in my post does that. 2. Yes, it can be done by using view option. Note however that in that case it is more likely that the tickmarks will overlap. 3. Using numboccur,
a:=[1, 1, 1, 3, 4, 7, 3.2, -1, -1, 5, 1, -1]:
numboccur(a,{1,-1});
                                  7
4.(1) For example,
a:=[1,2,3,4,1,5,2,2]:
f:=a->evalb(nops(a)<>nops({op(a)})):
f(a);

                                 true
(2)
ListTools:-FindRepetitions(a);

                              [1, 2, 2]
5. As I said a few times earlier, don't use arrays or tables; use lists or Arrays. The corresponding operations are op(2,eval(a)) for arrays - that gives a range, something like 1..5, and if you know that the first index is 1, then the number of elements can be obtained as op([2,2],eval(a)). For tables that can be done as nops(op(op(t))). For lists it's much more simple - just nops(a). For Arrays, ArrayNumElems(a) - one can easily see that the command was created during a transition period from old Maple names, short but cryptic, to new Maple names, similar to Mathematica names; if it was created earlier, it would be named nels; if it was created now, it would be, probably, named ArrayTools:-Main_AT:-ArrayInformation:-Main_AI:-BasicArrayInformation:- `www.maplesoft.com/NumberOfArrayElements`. 6. It is not only pos, it is both pos and neg. It's not that simple. One way is to sort [op(a),-op(a)] and then choose the 5 top elements, but that doesn't work in this case, because the order can not be determined uniquely, mainly because of the closest to 0 element that can be either positive or negative. It is much easier to do for numerical values - using pos and neg and the same sequence constructed from them as in f (the last procedure in my post with plotting procedures.) _________ Alec Mihailovs http://mihailovs.com/Alec/
That can be also done in Maple,
with(Student:-Calculus1):
J:=Int(1/(1+x^2)^2,x):
infolevel[Student]:=1:
while nops(Hint(J))>0 do J:=Rule[Hint(J)](J) od:

Integrals involving expressions of the form (x^2+a^2)^n or sqrt(x^2+a^2)^n 
can often be simplified using the substitution x = a*tan(u).

Applying substitution x = tan(u), u = arctan(x) with dx = (1+tan(u)^2)*du, 
du = 1/(1+x^2)*dx

Reduce the power on cos(u) using the double-angle formula.

Applying substitution u = 1/2*u1, u1 = 2*u with du = 1/2*du1, du1 = 2*du

Reverting substitution using u1 = 2*u

Reverting substitution using u = arctan(x)

ShowSteps();

                  /                  /
                 |      1           |       1
                 |  --------- dx =  |  ----------- du
                 |        2 2       |            2
                /   (1 + x )       /   1 + tan(u)


                                /
                               |     1
                            =  |  ------- du
                               |        2
                              /   sec(u)


                                /
                               |        2
                            =  |  cos(u)  du
                               |
                              /


                          /
                         |
                      =  |  1/2 + 1/2 cos(2 u) du
                         |
                        /


                       /            /
                      |            |
                   =  |  1/2 du +  |  1/2 cos(2 u) du
                      |            |
                     /            /


                                /
                               |
                      = u/2 +  |  1/2 cos(2 u) du
                               |
                              /


                                    /
                                   |
                      = u/2 + 1/2  |  cos(2 u) du
                                   |
                                  /


                                  /
                                 |
                    = u/2 + 1/2  |  1/2 cos(u1) du1
                                 |
                                /


                                    /
                                   |
                      = u/2 + 1/4  |  cos(u1) du1
                                   |
                                  /


                          = u/2 + 1/4 sin(u1)


                          = u/2 + 1/4 sin(2 u)


                                            x
                      = 1/2 arctan(x) + ----------
                                                2
                                        2 (1 + x )
In Standard Maple that can be also done in a maplet by clicking Tools - Tutors - Calculus-Single Variable - Integration Methods... and clicking All Steps in the maplet. In both Classic and Standard Maple the maplet can be also activated by executing
Student:-Calculus1:-IntTutor(1/(1+x^2)^2);
__________ Alec Mihailovs http://mihailovs.com/Alec/
That can be also done in Maple,
with(Student:-Calculus1):
J:=Int(1/(1+x^2)^2,x):
infolevel[Student]:=1:
while nops(Hint(J))>0 do J:=Rule[Hint(J)](J) od:

Integrals involving expressions of the form (x^2+a^2)^n or sqrt(x^2+a^2)^n 
can often be simplified using the substitution x = a*tan(u).

Applying substitution x = tan(u), u = arctan(x) with dx = (1+tan(u)^2)*du, 
du = 1/(1+x^2)*dx

Reduce the power on cos(u) using the double-angle formula.

Applying substitution u = 1/2*u1, u1 = 2*u with du = 1/2*du1, du1 = 2*du

Reverting substitution using u1 = 2*u

Reverting substitution using u = arctan(x)

ShowSteps();

                  /                  /
                 |      1           |       1
                 |  --------- dx =  |  ----------- du
                 |        2 2       |            2
                /   (1 + x )       /   1 + tan(u)


                                /
                               |     1
                            =  |  ------- du
                               |        2
                              /   sec(u)


                                /
                               |        2
                            =  |  cos(u)  du
                               |
                              /


                          /
                         |
                      =  |  1/2 + 1/2 cos(2 u) du
                         |
                        /


                       /            /
                      |            |
                   =  |  1/2 du +  |  1/2 cos(2 u) du
                      |            |
                     /            /


                                /
                               |
                      = u/2 +  |  1/2 cos(2 u) du
                               |
                              /


                                    /
                                   |
                      = u/2 + 1/2  |  cos(2 u) du
                                   |
                                  /


                                  /
                                 |
                    = u/2 + 1/2  |  1/2 cos(u1) du1
                                 |
                                /


                                    /
                                   |
                      = u/2 + 1/4  |  cos(u1) du1
                                   |
                                  /


                          = u/2 + 1/4 sin(u1)


                          = u/2 + 1/4 sin(2 u)


                                            x
                      = 1/2 arctan(x) + ----------
                                                2
                                        2 (1 + x )
In Standard Maple that can be also done in a maplet by clicking Tools - Tutors - Calculus-Single Variable - Integration Methods... and clicking All Steps in the maplet. In both Classic and Standard Maple the maplet can be also activated by executing
Student:-Calculus1:-IntTutor(1/(1+x^2)^2);
__________ Alec Mihailovs http://mihailovs.com/Alec/
You, probably, didn't try using f procedure. It plots positive parts. Choosing only op(a) as you did, doesn't do that. Just an example, a=[-5,-3,1,2,4]. Choosing op(a) does nothing with it. Originally I used both op(a) and op(-a) to include all positive and negative parts. then I used pos and neg to separate positive values from negative, leave positive values unchanged and change the sign of negative values. Another option would be to use abs for that, but then we would need another procedure for handling symbolic values, and using pos and neg avoids that. If you see numbers on the x-axis, that means that you assigned your variables. You can restart (either click the restart button, or enter restart; ), and execute needed commands again. I see symbolic values on both axes. __________ Alec Mihailovs http://mihailovs.com/Alec/
You, probably, didn't try using f procedure. It plots positive parts. Choosing only op(a) as you did, doesn't do that. Just an example, a=[-5,-3,1,2,4]. Choosing op(a) does nothing with it. Originally I used both op(a) and op(-a) to include all positive and negative parts. then I used pos and neg to separate positive values from negative, leave positive values unchanged and change the sign of negative values. Another option would be to use abs for that, but then we would need another procedure for handling symbolic values, and using pos and neg avoids that. If you see numbers on the x-axis, that means that you assigned your variables. You can restart (either click the restart button, or enter restart; ), and execute needed commands again. I see symbolic values on both axes. __________ Alec Mihailovs http://mihailovs.com/Alec/
First, solve is a better command than solvefor. Second, if you use it as sol:=solve(...) and it gives the answer looking like {x=..., y=..., z=...}, then there are 2 more or less standard ways to obtain the solutions instead of using op that is as you mentioned, unreliable, because the order of equations may be changed. One way is assign(sol); . that assignes x, y, and z to the solutions. Another (in many cases better) way is to use something like eval(x,sol);. In your example that can be used as
soll1Mod:=simplify(abs(eval(soll1,sol)));
Next, assuming doesn't seem necessary. It seems as if solve doesn't use it anyway. If you used output=string option in the VisualBasic command, then you would be able to use StringTools package for modifying the output, specifically WrapText for wrapping long lines, and then SubstituteAll for substituting end of line symbols \n with line continuation and end of line symbols (that has to be done carefully though, the manual editing may be better.) Also, SubstituteAll can be used for such things as replacing sqrt with sqr. __________ Alec Mihailovs http://mihailovs.com/Alec/
First, solve is a better command than solvefor. Second, if you use it as sol:=solve(...) and it gives the answer looking like {x=..., y=..., z=...}, then there are 2 more or less standard ways to obtain the solutions instead of using op that is as you mentioned, unreliable, because the order of equations may be changed. One way is assign(sol); . that assignes x, y, and z to the solutions. Another (in many cases better) way is to use something like eval(x,sol);. In your example that can be used as
soll1Mod:=simplify(abs(eval(soll1,sol)));
Next, assuming doesn't seem necessary. It seems as if solve doesn't use it anyway. If you used output=string option in the VisualBasic command, then you would be able to use StringTools package for modifying the output, specifically WrapText for wrapping long lines, and then SubstituteAll for substituting end of line symbols \n with line continuation and end of line symbols (that has to be done carefully though, the manual editing may be better.) Also, SubstituteAll can be used for such things as replacing sqrt with sqr. __________ Alec Mihailovs http://mihailovs.com/Alec/
First 144 145 146 147 148 149 150 Last Page 146 of 180