AlexeyK

15 Reputation

One Badge

3 years, 184 days

MaplePrimes Activity


These are replies submitted by AlexeyK

@Carl Love 

Thank you for the explanations and illustrations! I can grasp most of them now, but I will need to go through them step by step.

Concerning passing n: it's really a minor issue, but I caught myself on the thought that once you have evaluated the number of variables in the main procedure, it could be worth just assigning it to a variable and then passing it everywhere it is needed (thus, you don't need to evaluate the length again - a kind of optimality in terms of a number of operations). What do you think?

@Carl Love 

Thanks a lot once more! The code is neat, but I feel I have to go a bit deeper into Maple programming. The expression I'm having trouble with comprehending is 

(evalc@[Re,Im]@f@op@(Complex@op)~)(XY)

Maple help provides some trivial examples of using the composition operator, and I've never used it before. Could you please give some comments/explanation of using @ in non-trivial cases? It seems like it is another option of shrinking code length like map, zip, ~

@Carl Love 

Thanks a lot! I'll study your answer and code (it requires some "digesting" :) ) and let you know if everything has been successfully solved.

Thanks a lot for the concise code for the decomposition!

Let me explain where I have the main difficulty. I have the main procedure that receives two lists as arguments: a list of variables and a list of functions of these variables:

MainFunc := proc(Z, F)

This is how I intend to call it:

MainFunc([z1, z2], [z1 + z2, z1 - z2]);

Inside I have computations with partial derivatives, etc. At some point, I need to compute real and imaginary parts of say f1:=z1+z2 as a complex-valued function of complex variables z1, z2.

For this purpose, I need either to switch from lists [z1, z2], [z1 + z2, z1 - z2] to the list defining functions [(z1, z2) -> z1+z2, (z1, z2) -> z1+z2] or to implement the decomposition f(z) = u(x,y) + i*v(x,y) without defining functions (i.e., working with initial lists [z1, z2], [z1 + z2, z1 - z2]). This is my main trouble here.

PS. BTW, how do you format window with Maple code?

Page 1 of 1