0

Consider the list

P : [r * sin(%phi) * sin(%gamma), r * cos(%phi), r * sin(%phi) * cos(%gamma)];

when using the diff() function:

diff(P, %phi, 1);

and I get the error:

diff: second argument must be a variable; found

-- an error. To debug this try: debugmode(true);

Now if I remove the % percent sign before the Greek letters

P : [r * sin(phi) * sin(gamma), r * cos(phi), r * sin(phi) * cos(gamma)];

it works but it shows some Greek symbols as their capital:

                  

I would appreciate if you could help me know what is the problem and how I can solve it. Thanks for your support in advance.

Community
  • 1
  • 1
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
  • 3
    `%phi` is a built-in constant, similar to `%pi` in that respect; its numeric value is approximately 1.618. `%phi` is the so-called golden ratio, defined as (1 + sqrt(5))/2. Looks like `phi` works OK in place of `%phi`. – Robert Dodier May 24 '19 at 16:05
  • @RobertDodier my apologies for the late reply. Somehow I missed the notification. So you are telling me I should do `P : [r * sin(phi) * sin(%gamma), r * cos(phi), r * sin(phi) * cos(%gamma)];`? Doesn't it seem inconsistent? What is the correct what to include Greek letters in Maxima, with or without the `%`? – Foad S. Farimani May 27 '19 at 21:58
  • 1
    Yes, I agree it's inconsistent. The main problem here is that `gamma(x)` is the gamma function which is conventionally written with a big letter. So that makes it necessary to say `%gamma` to get a small letter. But note that `%gamma`, in addition to `%phi`, is a numerical constant; it is the Euler-Mascheroni number. My advice at this point is to change the display property for `gamma` and use only names without `%`. I don't remember exactly how to change display properties in wxMaxima, but it is pretty simple. You can ask on the wxMaxima user forum or issue tracker about how to do that. – Robert Dodier May 27 '19 at 23:40

0 Answers0