sigh...
when i paste the text below into the "Mma input" part of the maplet's window and click "Translate" then I get a strange message:
Title reads: "Unable to translate" and the message is: "Invalid terms in product: 1"???
My question is: why is 1 an invalid term in a product?
entering 1*1 gives no error (but there are two terms equal to 1)
TIA,
Peter
P.S: the exact copy of the input:
df[a_?NumericQ, n_Integer] :=
Block[{n0 = Ceiling[a/Pi],
ak = (-1)^(#1 + Floor[n/2]) Piecewise[{{Sin, EvenQ[n]}}, Cos][
a/#]/#^n &},
Total[N[Array[ak[#, a] &, n0]]] +
NSum[ak[k, a], {k, n0 + 1, Infinity}]]
> sigh...
> when i paste the text below into the "Mma input" part of the maplet's window and click "Translate" then I get a strange
> message:
> Title reads: "Unable to translate" and the message is: "Invalid terms in product: 1"???
> My question is: why is 1 an invalid term in a product?
> entering 1*1 gives no error (but there are two terms equal to 1)
I am using Maple 15. For simple cases the translator works, but I
never used it for MMA programs (and do not know, which versions or
constructs are covered).
For the above example I get a different reply:
"(your stuff from above)"; # i.e. entred as string to Maple
convert(%, FromMma); # should do the translation
results in
Error, invalid terms in product: df(`a_?NumericQ`,n_Integer) := 1
When I remove your line breaks (but not caring for blanks),
then I get something different and readable, but nothing
that Maple understands.