steweb

35 Reputation

4 Badges

13 years, 346 days

MaplePrimes Activity


These are questions asked by steweb

Consider the following two functions, one of which is defined using a differential operator:

DO:=(f,x1,x2)->(sqrt(2)*x1+x2)*D[2](f)(x1,x2)-x2:

a:=(x1,x2,o)->1:
b:=(x1,x2,o)->simplify(DO((x1,x2)->a(x1,x2,o),x1,x2)):

b(x1,x2,o);

The Maple output is (D[2](f))(x1, x2)*sqrt(2)*x1+(D[2](f))(x1, x2)*x2-x2*D[2].

Why does this output contain the variable f, which should be substituted by a?

 

Consider the following function defined as an integral with parameters:

 

f:=a->int(a*x,x=0..1);

 

If one tells Maple to integrate this function int(f(x),x=0..1); evaluates to 1/3 although the correct answer would  be 1/4. This is because for Maple f(x)=int(x^2,x=0..1). (Isn't this quite a serious bug?) If one would rename one of the variables, the evaluation would work. My problem is that I want to define a sequence of functions...

Consider a function f depending on a parameter k and a variable y

f:=(k,y)->k*s(y);

where s:=y->add(sin(1/y^i),i=1..1000000) is just some nasty function.

Now, why does it take a long time to evaluate f(0,y)? And how could I speed this up?

 

More generally, I would like to plug (varying) parameters into a function, simplify and then do analysis on the resulting function. How could I do that?

Why does the following derivative vanish?

f:=k->(y->y^k);

h:=z->f(2)(z);

D(h);

 

Note: I am aware that setting h:=f(2) would give the correct result. However, I would like to use the arrow -> notation in a more complicated problem. Also, it seems odd that the plot(h) displays the graph of z->z^2, while D(h) gives 0.

Page 1 of 1