Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

Take F(x) = x^2*sin(1/x) for x<>0 and F(0) = 0. Then F is  differentiable everywhere. The derivative at zero is zero by a direct application of the definition of differentiability.

However, F'(x) = 2*x*sin(1/x) -cos(1/x) doesn't have a limit at 0. 

Edited: This a counterexample to Axel Vogt's argument.

@Axel Vogt It seems that you are right. I'm glad that I said, "If Maple is right .. ".

eq:=(-t)^5=abs((t^2+t+1)/(-t));
eq2:=eval(eq,t=x+I*y) assuming x::real,y::real;
expand(%);
sys:={Re(lhs(%))=rhs(%),Im(lhs(%))=0} assuming real;
sol:=solve(sys,{x,y}):
evalf(sol):
L:=remove(has,[%],I);

Here Maple finds 3 solutions, but clearly if t is a solution then conjugate(t) is a solution, thus 5 solutions.

@Axel Vogt It seems that you are right. I'm glad that I said, "If Maple is right .. ".

eq:=(-t)^5=abs((t^2+t+1)/(-t));
eq2:=eval(eq,t=x+I*y) assuming x::real,y::real;
expand(%);
sys:={Re(lhs(%))=rhs(%),Im(lhs(%))=0} assuming real;
sol:=solve(sys,{x,y}):
evalf(sol):
L:=remove(has,[%],I);

Here Maple finds 3 solutions, but clearly if t is a solution then conjugate(t) is a solution, thus 5 solutions.

Since we are in the complex plane, abs(z) is not just either z or -z.

Since we are in the complex plane, abs(z) is not just either z or -z.

Not knowing the constants I just picked some, and did the following with no problem:

E_horiz := sqrt(E_theta^2 + E_phi^2):

param:={W=1, h=2, k0=3, kx=3, ky=4, l=5, epsr=6, seq(JX[i]=1/(1+i),i=1..80),epsre=7}:
res:=eval(E_horiz,param):
plot(res,theta=0..2*Pi);

Not knowing the constants I just picked some, and did the following with no problem:

E_horiz := sqrt(E_theta^2 + E_phi^2):

param:={W=1, h=2, k0=3, kx=3, ky=4, l=5, epsr=6, seq(JX[i]=1/(1+i),i=1..80),epsre=7}:
res:=eval(E_horiz,param):
plot(res,theta=0..2*Pi);

There is an obvious syntactical error in the statement E_horiz := subs(theta := Pi/2, E_horiz):

The assignment operator ':=' should be replaced by '=' of course.

What do you mean by

"I am looking for E_phi(theta), E_theta(theta), E_horiz(phi)."

?

When you say

'Maple cannot solve this line: "E_phi_magnitude := sqrt((Re(E_phi))^2 + (Im(E_phi))^2):".'

what do you mean by solve? There is no equation.

Since there are lots of names involved having no numeric values there is not much simplification that can be done.

There is an obvious syntactical error in the statement E_horiz := subs(theta := Pi/2, E_horiz):

The assignment operator ':=' should be replaced by '=' of course.

What do you mean by

"I am looking for E_phi(theta), E_theta(theta), E_horiz(phi)."

?

When you say

'Maple cannot solve this line: "E_phi_magnitude := sqrt((Re(E_phi))^2 + (Im(E_phi))^2):".'

what do you mean by solve? There is no equation.

Since there are lots of names involved having no numeric values there is not much simplification that can be done.

An example would help tremendously.

An example would help tremendously.

@asfn In y appear 3 square roots: sqrt(12.25 - b^2), sqrt(2.1025-b^2), and sqrt(1-b^2). This reveals where changes are likely.

Without attempting a proof that my statement about y being purely imaginary between 1 and sqrt(2.1025) you can test the validity by evaluating y at points chosen randomly:

y:=subs(`&beta;b`=b,y);
rnd:=RandomTools:-MersenneTwister:-GenerateFloat;
#Testing rnd
rnd();

#Now evaluating y at 10 points chosen randomly in the strip mentioned:

to 10 do evalf(eval(y,{b=1+rnd()*(sqrt(2.1025)-1),lambda=1+rnd()})) end do;

Similarly, you can test the claim that y is real for sqrt(2.1025) < b < sqrt(12.1025) by

to 10 do evalf(eval(y,{b=sqrt(2.1025)+rnd()*(sqrt(12.25)-sqrt(2.1025)),lambda=1+rnd()})) end do;

Now the disturbing question is: What did implicitplot actually do? It should have painted the whole strip 1 < b < sqrt(2.1025) red, but produced some nice looking curves!

@asfn In y appear 3 square roots: sqrt(12.25 - b^2), sqrt(2.1025-b^2), and sqrt(1-b^2). This reveals where changes are likely.

Without attempting a proof that my statement about y being purely imaginary between 1 and sqrt(2.1025) you can test the validity by evaluating y at points chosen randomly:

y:=subs(`&beta;b`=b,y);
rnd:=RandomTools:-MersenneTwister:-GenerateFloat;
#Testing rnd
rnd();

#Now evaluating y at 10 points chosen randomly in the strip mentioned:

to 10 do evalf(eval(y,{b=1+rnd()*(sqrt(2.1025)-1),lambda=1+rnd()})) end do;

Similarly, you can test the claim that y is real for sqrt(2.1025) < b < sqrt(12.1025) by

to 10 do evalf(eval(y,{b=sqrt(2.1025)+rnd()*(sqrt(12.25)-sqrt(2.1025)),lambda=1+rnd()})) end do;

Now the disturbing question is: What did implicitplot actually do? It should have painted the whole strip 1 < b < sqrt(2.1025) red, but produced some nice looking curves!

G1:=Matrix(101,93,(i,j)->evalf(sin(i/7)+cos(j/5)),datatype=float[8]):

plots:-surfdata(convert(G1,listlist));

plots:-surfdata(Array(G1));

G1:=Matrix(101,93,(i,j)->evalf(sin(i/7)+cos(j/5)),datatype=float[8]):

plots:-surfdata(convert(G1,listlist));

plots:-surfdata(Array(G1));

First 209 210 211 212 213 214 215 Last Page 211 of 231