Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

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

Social Networks and Content at Maplesoft.com

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 answers submitted by Alec Mihailovs

The first question,
solve({K,afg1});

                   {y = 6, x = 3}, {y = -6, x = -3}

solve({K,1/afg1});

                   {y = 3, x = 6}, {x = -6, y = -3}
I don't exactly understand the second question. What result would you like to get? __________ Alec Mihailovs http://mihailovs.com/Alec/
The intersection can be calculated by either solve, or fsolve. If you copied your worksheet and posted it here (between <pre> and </pre>), you might get the answer faster. __________ Alec Mihailovs http://mihailovs.com/Alec/
For example, for the first job,
f:=unapply(round(CurveFitting:-Spline(
[[75,7843],[80,11314],[90,17820],[95,21431]],x)),x):

f(85);
                                14541
f(106);
                                28693
(salary in 2006) __________ Alec Mihailovs http://mihailovs.com/Alec/
It seems as if that required converting sin(x)/cos(x) to tan(x), as in the following examples,
simplify(convert(arctan(sin(theta)/cos(theta)),tan),symbolic);

                                theta

simplify(convert(arctan(sin(theta)/cos(theta)),tan)) assuming theta>0,theta<Pi/2;

                                theta

SolveTools:-CancelInverses(convert(arctan(sin(theta)/cos(theta)),tan));

                                theta
P.S. < and > signs can be typed as &lt; and &gt; __________ Alec Mihailovs http://mihailovs.com/Alec/
In this particular example, the verification can be done as
a:={exp(I*x)=0, x^2-x}:
b:={cos(x)+I*sin(x)=0, x*(x-1)}:
verify(a,b,set({testeq,relation(testeq)}));

                                 true
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);
I posted a command for nested verification in my blog, Nested Verification. Using it, the verification in the first example in this comment can be done as
verify(a,b,nested(testeq));

                                 true
__________ Alec Mihailovs http://mihailovs.com/Alec/
I wrote a procedure for drawing a 1d phase portrait of an equation
                        `x′`=f(x)
in Classic Maple,
phase:=proc(f,r)
local a,b,bn,bs,U;
a:=op([1,1],plot(args));
bn:=-`-`(op([2,1..2],r));
bs:=[a[1,1],seq(`if`(
(a[i-1,2]-0.0001*bn*signum(a[i-1,2]))*(a[i,2]-0.0001*bn*signum(a[i,2]))<0,
`if`(a[i-1,2]*a[i,2]<0, (a[i-1,1]*a[i,2]-a[i-1,2]*a[i,1])/(a[i,2]-a[i-1,2]),
fsolve(f,subsop([2,1]=a[i,2]-0.02*bn,[2,2]=a[i,2]+0.02*bn,r))),NULL),
i=2..nops(a)),a[-1,1]];
b:=bs/bn;
U:=remove(x->abs(x[2,1])<0.04,
[seq([[b[i]+0.01,0],[b[i+1]-b[i]-0.02,0]],i=`if`(a[1,2]<0,2,1)..nops(b)-1,2),
seq([[b[i+1]-0.01,0],[b[i]-b[i+1]+0.02,0]],i=`if`(a[1,2]<0,1,2)..nops(b)-1,2)]);
plots[display](plots[arrow](
U,width=0.02,head_length=0.04,view=[b[1]..b[-1],-1..1],color=blue),
plots[pointplot](map(x->[x,0],b[2..-2]),symbol=circle,symbolsize=19),
plots[textplot](map(x->[x/bn,-0.07,sprintf("%.2f",x)],bs[2..-2])),
axes=none)
end:
It works as in the following example for f(x)=sin(x),
phase(sin(x),x=-8..8);
For discontinuous functions coordinates of some singularities may be printed not very precisely. That can be fixed by increasing numpoints. For example,
phase(1/sin(x),x=-8..8,numpoints=200);
produces the same picture as above. For very large intervals some of singularities may be missed, that can be also fixed by increasing numpoints, as in the following example,
phase(-x^2,x=-1000..1000,numpoints=3000);
For Standard Maple some numbers have to be adjusted, in particular symbolsize can be set to 10 instead of 19, and something like head_width=0.05 can be added to the arrow command. Still, it doesn't produce the same picture in Standard Maple, because arrows in Standard Maple are not centered vertically - their body is located higher than it should. Finally, I would like to thank Gerald A. Edgar for inspiring me to extend the original version of the procedure that I wrote for continuous functions, to piecewise continuous functions. __________ Alec Mihailovs http://mihailovs.com/Alec/
You can use isolate,
isolate(A=B*x^2+C*x+D,B);
                                
                          B = -(-A+C*x+D)/x^2
__________ Alec Mihailovs http://mihailovs.com/Alec/
If 30 digits are good enough, then the following can be used,
Digits:=30:
f:=tanh(sqrt(x))/sqrt(x):
p:=normal(eval(convert(numapprox:-chebyshev
(f,x=1..10000),ratpoly,13,14),T=orthopoly[T]));
The maximal error is
numapprox:-infnorm(f-p,x=1..10000);
                                                   -6
                0.191506333263502389880497476433 10
__________ Alec Mihailovs http://mihailovs.com/Alec/
The problem is not in the accuracy. These 2 plots are different. In Maple, in plot3d in ellcylindrical coordinates, the command looks like
plot3d(r(theta,z),theta=a..b,z=c..d,coords=ellcylindrical);
In other words, it plots not points1, but
points2:={seq(seq([MathieuCE(0,Omega[0,1],2*Pi*S/100)*
MathieuCE(0,Omega[0,1],I*T/100), 2*Pi*S/100, T/100],
T=0..100), S=0..100)}:
If you want to plot a surface looking like the plot of points1, then the parametric plot can be used,
plot3d([r,theta,MathieuCE(0,Omega[0,1],r*I)*
MathieuCE(0,Omega[0,1],theta)],
theta=0..2*Pi,r=0..1,coords=ellcylindrical,axes=FRAMED);
_____________ Alec Mihailovs http://mihailovs.com/Alec/
Eigenvalues work though.
The answer is 2/cosh(theta)^2. Maple can do that after performing some substitutions. I believe I already answered in great detail to that question that you asked earlier at least twice in other Maple forums (about a year or two ago). __________ Alec Mihailovs http://mihailovs.com/Alec/
No.
The difference can be seen if the worksheet is opened in a text editor. Probably, it can be corrected in the text editor, too. That reminded me an old joke:
Mother to daughter advice:

Cook a man a fish and you feed him for a day.

But teach a man to fish and you get rid of him for the whole weekend
Works OK in my Maple,
g:=y+exp(2*t):

y2:=subs([y=3,t=0.1],g);

                          y2 := 3 + exp(0.2)

subs([y=y2,t=0.1],g);

                        4.221402758 + exp(0.2)

%;

                             5.442805516

y2:=eval(g,[y=3,t=0.1]);

                          y2 := 4.221402758

eval(g,[y=y2,t=0.1]);

                             5.442805516
It is called semilogplot. __________ Alec Mihailovs http://mihailovs.com/Alec/
First 66 67 68 69 70 71 72 Last Page 68 of 76